Operational Range for Data: Dependent on Data Source
Release Date: 1995
Product: Microsoft ODBC core components (Driver manager, Cursor library, ODBC Administrator)
ODBC is a Data Access application programming interface (API) that exposes data from a variety of Data Sources.
How the product handles dates:
ODBC standard date syntax and escape formats disallow the use of anything but 'YYYY' for the year portion of a date or a TIMESTAMP/DATE structure.
Two-digit shortcut handling:
The product does not handle dates in 2-digit formats. Please note that although not recommended, application developers may pass a 2-digit date as a literal to the server, in which case the interpretation is left up to the server.
Common date usage errors:
ODBC is neutral in this regard. Date usage errors are data source dependent, not ODBC dependent.
Testing guidelines and recommendations:
Since there is some "windowing" inherent in the date interpretation features of most backend data stores, Microsoft recommends using 4-digit year formats in dates, particularly when placing data into a store and querying that store.
Platforms applicable:
x86 and Alpha machines.
Power PC and MIPS were not tested, as support for these platforms has been discontinued.
Known Issues:
In ODBC 2.x , there are two installer APIs with year 2000 issues. The APIs in question are: SQLInstallDriver and SQLInstallODBC. These APIs were used to write custom setups for ODBC drivers.
SQLInstallODBC was discontinued after ODBC 2.5.
SQLInstallDriver still exists in later versions of ODBC, but the option to use an INF (the source of the problem), was removed in ODBC 3.0. In addition, ODBC 3.0 added a new preferred API, SQLInstallDriverEx.
Under what circumstances would the problem occur?
If someone wrote a setup using SQLInstallDriver or SQLInstallODBC from ODBC 2.5,
AND they used an INF,
THEN during install, the date evaluation may not be done properly, resulting in wrong files version being installed, or files being installed with incorrect filedates.
The installer APIs are in odbccp32.dll for 32bit apps, and in odbcinst.dll for 16bit apps.
Remediation:
The remediation is to use ODBC 3.0 or higher. ODBC 3.x does not support SQLInstallODBC, and does not support SQLInstallDriver with INFs, so the application would get a warning during setup, instead of possibly installing wrong bits.
To determine which version of ODBC is installed, look at the fileversion of odbc32.dll (right click/properties). If it is 2.50.xxxx, it is ODBC 2.5. If it is 3.00.0000 or higher, it is ODBC 3.0 or greater.