Microsoft KB Archive/141596

{|
 * width="100%"|

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

 * }

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-
 * 1) 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"
 * 1) 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 +++++++++++++++++++++ [Microsoft Access Driver (*.mdb)]
 * 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.
 * Incorrect changes to this file could prevent ODBC from
 * operating or operating correctly.

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 +++++++++++++++++++++ [ODBC Data Sources]
 * 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.
 * Incorrect changes to this file could prevent ODBC from
 * operating or operating correctly.

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 : kbprogramming

Issue type : kbprb

Technology :