PRB: Checking Version of Driver Manager from an ApplicationLast reviewed: October 14, 1997Article ID: Q115881 |
1.50
WINDOWS
kbusage kbfile
The information in this article applies to:
- Microsoft Open Database Connectivity, version 1.5 - Microsoft Open Database Connectivity, version 2.0
SYMPTOMSAn ODBC version 2.0 application needs to have a version 2.0 ODBC driver manager (ODBC.DLL). One way to verify the version of the driver manager is to make a call to SQLGetInfo with fInfoType= SQL_ODBC_VER. An application must connect to a specific driver before calling SQLGetInfo as that function requires a valid connected hdbc (connection handle). Note, for certain post-1.0 and pre-2.0 versions of ODBC.DLL (actual file version 1.5.xxxx), the return value for the SQLGetInfo call with InfoType=SQL_ODBC_VER, is "02.00.0000" or "02.00". For example, the driver manager ODBC.DLL that shipped with Microsoft Word version 6.0 for Windows returns "02.00" for the above call. Similarly, the driver manager ODBC.DLL that shipped with Microsoft Visual C version 1.5 for Windows, returns the version as "02.00.0000". Therefore, a 2.0 ODBC application which uses SQLGetInfo to confirm it is using a true 2.0 driver manager may fail against one of these earlier versions.
WORKAROUNDIn order to correctly distinguish a true 2.0 driver manager from one returning an incorrect version (referenced above), a version 2.0 application should incorporate one of the following checks to ensure that an incorrect version of driver manager is not loaded:
MORE INFORMATIONGETVER.EXE is a sample program that uses the version functions in Microsoft Windows version 3.1 Software Development Kit (SDK) to get the file version of ODBC driver manager (ODBC.DLL).
You can find GETVER.EXE (size: 90348 bytes) , a self-extracting file, on the following services: On the www.microsoft.com home page, click the Support icon. Click Knowledge Base, and select the product area. Enter kbfile GETVER.EXE (size: 90348 bytes) , and click GO! Open the article, and click the button to download the file. ftp ftp.microsoft.com Change to the Softlib/Mslfiles folder. Get GETVER.EXE (size: 90348 bytes) On the Edit menu, click Go To, and then click Other Location. Type "mssupport" (without the quotation marks). Double-click the MS Software Library icon. Find the appropriate product area. Locate and Download GETVER.EXE. Dial (425) 936-6735 to connect to MSDL Download GETVER.EXE (size: 90348 bytes) For additional information about downloading, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q119591 TITLE : How to Obtain Microsoft Support Files from Online Services |
Additional reference words: 1.50 2.00 C++ Excel Word Desktop Database DM
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |