• Topic
  • Discussion
  • UdaWikiWeb.IODBCConfigFilesUnix(Last) -- Owiki? , 2016-08-19 15:00:17 Edit owiki 2016-08-19 15:00:17

    iODBC SDK Development

    iODBC SDK on Unix

    The Configuration Files

    The iODBC library searches for Data Source Names (DSNs) using the following resources:

    • $ODBCINI - the environment variable, if set
    • ~/.odbc.ini - in your home-directory, if it exists
    • /etc/odbc.ini - a system-wide default

    The format of the odbc.ini file is very simple. There are 3 sections; one for ODBC itself, one for a list of DSNs, and one for the definitions of those DSNs. For example:

    [ODBC]
    Debug         = 1
    Trace         = 0
    DebugFile     = /home/tim/temp/odbc-debugfile.log
    TraceFile     = /home/tim/temp/odbc-tracefile.log
    TraceAutoStop = 1
    
    [ODBC Data Sources]
    Virtuoso30 = OpenLink Virtuoso 3.0
    
    [Virtuoso30]
    Description = Virtuoso 3.0
    Driver      = /opt/opl/virtuoso-o12/lib/virtodbc.so
    Address     = localhost:1111
    UserName    = dba
    User        = dba
    


    Each DSN has an entry in the `ODBC Data Sources' section and a complete definition in a paragraph section of its own.

    There is also an ODBCINSTINI file. This file provides the full path to any installed drivers and any setup files associated with them.

    [ODBC Drivers]
    OpenLink Generic = installed
    
    [OpenLink Generic]
    Driver = /opt/openlink/odbcsdk/lib/oplodbc.so
    

    Referenced by...