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

ID: Q241347


The information in this article applies to:
  • Microsoft ODBC for JDBC (Build 5.00.3591)


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, 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.


CAUSE

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


RESOLUTION

Microsoft has confirmed this to be a bug in the JDBC-ODBC bridge (msjdbc10.dll). A build that fixes this problem has not yet been officially released.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

This problem happens when you use the latest JDBC-ODBC bridge and Microsoft Data Access Components (MDAC) 2.1 GA, Service pack 1 (SP1), or Service pack 2 (SP2). Uninstalling MDAC 2.1 and re-installing MDAC 2.0 SP2 seems to fix the problem.

Additional query words: msjdbc10.dll, datetime binding

Keywords : kbJDBC kbODBC
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: October 12, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.