How to find where ODBC driver setup info is stored on your NT system

By: Borland Staff

Abstract: This document covers finding out where information about ODBC drivers is stored on the computer once it is setup or modified using ODBC Administrator.

Problem:
This document covers finding out where information about ODBC drivers is stored on the
computer once it is setup or modified using ODBC Administrator.   The text files ODBC.INI ,
OBDCINST.INI are discussed.  A high level overview of the sections of the ODBC.INI and 
ODBC.INST files is then given.  Simple versions of  the INI files are then used to show how 
these features are used.

The registry keys that control ODBC driver information under Windows NT are also covered.

Solution:
***********************************************************************************************************
Note: The information in this document refers to the 32bit Visigenic and Intersolv ODBC drivers
          for InterBase 5.X.   Windows NT is the operating system that this document pertains to.
***********************************************************************************************************

1.  ODBC.INI
============
The ODBC.INI file is a text file used to configure ODBC data sources.  
16 Bit drivers rely on this file to provide configuration information.
You can also find information about 32bit data sources in the registry of Windows NT and 95.
The ODBC.INI file should not be modified directly.  Always use ODBC Administrator to 
modify this file.  




There are four parts that can comprise an ODBC.INI file. 
The second and third sections are not mandatory for operation.
The sections of the ODBC.ini file are listed below.


Sections of the ODBC.INI
------------------------------------
A.  ODBC data sources
     This section contains the name of each data source and the driver
      name associated with it.   


B. Options that apply to all data sources
     These options are used for tracing and debugging purposes.

C.  Default data source section
      This section contains information about the default data source.  It
       will be a copy of one of the data sources listed by name later.  It will
       have a single group in it , called "default."


D.  Groups configured for each data source.
      This group has sections for each data source.  All attributes for a particular data source
      are listed, one per line.




SAMPLE ODBC.INI FILE:
----------------------------------
[ODBC 32 bit Data Sources]                             <-----------Gives the names of Data sources you can reference
intersolv_emp=InterBase InterSolv Driver (*.gdb) (32 bit)


[intersolv_emp] <-------------------Information about a data source called intersolv_emp
Driver32=c:winntsystem32IBINT13.DLL <--------this tells where the dll the driver uses can be found



2.  ODBCINST.INI
==============
This file has information about 16 bit and 32 bit ODBC drivers.   Driver information, setup DLL 
and translation DLL information is also covered in this file.  ODBCINST.INI is a text file, like ODBC.INI.
It should not be modified directly.  Always use ODBC Administrator to modify this file.  

Sample ODBCINST.INI file:

[InterBase 5.x Driver by Visigenic (*.gdb) (32 bit)]  <--------Name of driver
Driver=C:WINNTSystem32iscdrv32.dll <-----Name and location of DLL that this driver uses
Setup=C:WINNTSystem32iscdrv32.dll <------Name of setup DLL
32Bit=1  <------------------------------------------This flag tells the user that the driver is 32 bit                           

[ODBC 32 bit Drivers]
InterBase 5.x Driver by Visigenic (*.gdb) (32 bit)=Installed
InterBase InterSolv Driver (*.gdb) (32 bit)=Installed
InterBase 4.x Driver by Visigenic (*.gdb) (32 bit)=Installed

[InterBase InterSolv Driver (*.gdb) (32 bit)]
Driver=c:winntsystem32IBINT13.DLL
Setup=c:winntsystem32IBINT13.DLL
32Bit=1

[InterBase 4.x Driver by Visigenic (*.gdb) (32 bit)]
Driver=C:WINNTSystem32iscdrv32.dll
Setup=C:WINNTSystem32iscdrv32.dll
32Bit=1





3.   Registry Keys 
==============
The NT registry can be accessed by running the regedt32.exe program.
The registry key to find information on ODBC.INI is HKEY_LOCAL_MACHINEODBCODBC.INI.
The registry key to find information on ODBCINST.INI is HKEY_LOCAL_MACHINEODBCODBCINST.INI.
The keys under the ODBC entry contain the information that used to be housed in the INI files when 
the driver was 16 Bit.

Server Response from: ETNASC03