Configuring a DSN-less Connection

To connect to your data store through a DSN-less connection, you need to define the connector in the odbcinst.ini file and then provide a DSN-less connection string in your application.

If your machine is already configured to use an existing odbcinst.ini file, then update that file by adding the settings described below. Otherwise, copy the odbcinst.ini file from the Setup subfolder in the connector installation directory to the home directory, and then update the file as described below.

To define a connector:

  1. In a text editor, open the odbcinst.ini configuration file.
  2. Note:

    If you are using a hidden copy of the odbcinst.ini file, you can remove the period (.) from the start of the file name to make the file visible while you are editing it.

  3. In the [ODBC Drivers ] section, add a new entry by typing a name for the connector, an equal sign (=), and then Installed.
  4. For example:

    [ODBC Drivers]

    Simba Athena ODBC Driver=Installed

  5. Create a section that has the same name as the connector (as specified in the previous step), and then specify the following configuration options as key-value pairs in the section:
    1. Set the Driver property to the full path of the connector library file that matches the bitness of the application.
    2. For example, on a macOS machine:

      Driver=/Library/simba/athenaodbc/lib/libathenaodbc_sbu.dylib

      For example, for a 32-bit connector on a Linux machine:

      Driver=/opt/simba/athenaodbc/lib/32/libathenaodbc_sb32.so

    3. Optionally, set the Description property to a description of the connector.
    4. For example:

      Description=Simba Athena ODBC Driver

  6. Save the odbcinst.ini configuration file.
  7. Note:

    If you are storing this file in its default location in the home directory, then prefix the file name with a period (.) so that the file becomes hidden. If you are storing this file in another location, then save it as a non-hidden file (without the prefix), and make sure that the ODBCINSTINI or ODBCSYSINI environment variable specifies the location. For more information, see Specifying the Locations of the Connector Configuration Files.

For example, the following is an odbcinst.ini configuration file for macOS:

[ODBC Drivers]

Simba Athena ODBC Driver=Installed

[Simba Athena ODBC Driver]

Description=Simba Athena ODBC Driver

Driver=/Library/simba/athenaodbc/lib/libathenaodbc_sbu.dylib

For example, the following is an odbcinst.ini configuration file for both the 32- and 64-bit connectors on Linux:

[ODBC Drivers]

Simba Athena ODBC Driver 32-bit=Installed

Simba Athena ODBC Driver 64-bit=Installed

[Simba Athena ODBC Driver 32-bit]

Description=Simba Athena ODBC Driver (32-bit)

Driver=/opt/simba/athenaodbc/lib/32/libathenaodbc_sb32.so

[Simba Athena ODBC Driver 64-bit]

Description=Simba Athena ODBC Driver (64-bit)

Driver=/opt/simba/athenaodbc/lib/64/libathenaodbc_sb64.so

You can now connect to your data store by providing your application with a connection string where the Driver property is set to the connector name specified in the odbcinst.ini file, and all the other necessary connection properties are also set. For more information, see "DSN-less Connection String Examples" in Using a Connection String.

For instructions about configuring specific connection features, see the following:

For detailed information about all the connection properties that the connector supports, see .