Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

BUG: Inserting/Updating Dates Before "01-01-1900" Into SQL Using JDBC-ODBC Creates Errors


View products that this article applies to.

This article was previously published under Q241347

↑ Back to the top


Symptoms

When using the Java Database Connectivity (JDBC) - Open Database Connectivity (ODBC) bridge to insert or update dates prior to "01-01-1900" into SQL server (version 6.5 and 7.0), the following error occurs consistently:
22008 [Microsoft][ODBC SQL Server Driver]Datetime field overflow.
For those inserts or updates that are successful (for dates after 01-01-1900), truncation (of the datetime columns) occurs. So, when displaying the row in the database, the seconds and milliseconds portion of the datetime columns are always 0 (zero) even though the date/time fields that are bound have non-zero values for seconds and milliseconds.

↑ Back to the top


Cause

The JDBC-ODBC bridge (msjdbc10.dll) is binding the datetime column incorrectly.

↑ Back to the top


Resolution

Microsoft has confirmed this to be a bug in the JDBC-ODBC bridge (Msjdbc10.dll, version 5.00.3155). This bug has been fixed in Microsoft VM for Java, builds 3234 (which shipped with Microsoft Internet Explorer version 5.01 and Windows 2000) and later.

↑ Back to the top


Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

This problem happens when you use the latest JDBC-ODBC bridge (Msjdbc10.dll version 5.00.3155) and Microsoft Data Access Components (MDAC) 2.1 GA and later. Uninstalling MDAC 2.1 and re-installing MDAC 2.0 SP2 seems to fix the problem.

You can use Microsoft Component Checker to uninstall any version of MDAC in a computer running Windows 95, Windows 98, or Windows NT.

For detailed information on Component Checker see the following Microsoft Web site:

↑ Back to the top


Keywords: KB241347, kbpending, kbjdbc, kbbug

↑ Back to the top

Article Info
Article ID : 241347
Revision : 7
Created on : 12/5/2003
Published on : 12/5/2003
Exists online : False
Views : 333