PRB: 16-bit Installer May Create Bad ODBCINST.INI & ODBC.INI

ID: Q141596


The information in this article applies to:
  • Microsoft Open Data Base Connectivity, version 2.10


SYMPTOMS

When a 16-bit Installer, that is, ODBCINST.DLL, is used to install 16-bit drivers on a Windows NT computer without any ODBC components, SQLInstallODBC will fail and a bad ODBCINST.INI file will be created.

If the ODBC.INF file contains data source information, SQLInstallODBC fails with one more bad ODBC.INI file.

If SQLConfigDataSource is called after SQLInstallODBC, instead of specifying data source information in the ODBC.INF, SQLConfigDataSource will fail with the same result.

One symptom is that, after the installation, driver information will not be available when you click "About," and no data source is listed in the data source window in the 16-bit ODBC Administrator.


WORKAROUND

  1. Manually modify the ODBC.INI and ODBCINST.INI files after the installation.

    -OR-


  2. Use a resource editor to modify the comment lines in the ODBCINST.DLL file directly.



If you have Visual C++ version 1.5x, follow the instructions below for modifying ODBCINST.DLL:
  1. Launch App Studio.


  2. From the File menu, click Open ODBCINST.DLL.


  3. Double-click "String Table" in the Type window.


  4. Double-click "String Segment:144" in the Resource window.


  5. Locate ";WARNING: Do not make changes to this file without using the ODBC.." comment line;


  6. Modify the last comment line from
    ";--------------------------------------------"
    to:
    ";------------------------------------------\r\n"


  7. From the File menu, click Save.


You will now get a correct version of ODBCINST.DLL.


MORE INFORMATION

The following are examples of bad ODBCINST.INI and ODBC.INI files. You can see that newline characters are missing from the last comment line:


++++++++++++ Beginning of ODBCINST.INI +++++++++++++++++++++
;-------------------------------------------------------------------------
; WARNING:Do not make changes to this file without using the ODBC Control
;         panel device or other utilities provided for maintaining data
;         sources.
;
;         Incorrect changes to this file could prevent ODBC from
;         operating or operating correctly.
;-------------------------------------------------------------------------
[Microsoft Access Driver (*.mdb)]

Driver=C:\WINNT35\SYSTEM\odbcjt16.dll
Setup=C:\WINNT35\SYSTEM\odbcjt16.dll
SQLLevel=0
FileExtns=*.mdb
FileUsage=2
DriverODBCVer=02.01
ConnectFunctions=YYN
APILevel=1
.
.
.
++++++++++++ End of ODBCINST.INI +++++++++++++++++++++

++++++++++++ Beginning of ODBC.INI +++++++++++++++++++++
;-------------------------------------------------------------------------
; WARNING:Do not make changes to this file without using the ODBC Control
;         panel device or other utilities provided for maintaining data
;         sources.
;
;         Incorrect changes to this file could prevent ODBC from
;         operating or operating correctly.
;-------------------------------------------------------------------------
[ODBC Data Sources]

MyAccess=Microsoft Access Driver (*.mdb)
[MyAccess]
Driver=C:\WINNT35\SYSTEM\odbcjt16.dll
DriverId=25
FIL=MS Access;
JetIniPath=odbcddp.ini
UID=admin
++++++++++++ End of ODBC.INI +++++++++++++++++++++ 

Additional query words: odbc vc SQLInstallODBC SQLConfigDataSource

Keywords : kbprg ODBC
Version : 2.0 2.1
Platform : WINDOWS
Issue type : kbprb


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