Omnis Technical Note TNSQ0038aMarch 2021

Using the ODBC DAM with macOS 11 and Later

for Omnis Studio 10.1 or above
by Gary Ashford, Omnis Engineering

Introduction
This technote discusses the use of the ODBC DAM in Omnis Studio 10.1 and later running on macOS 11 (Big Sur). It is relevant for users who want to use:

which rely on the iODBC Driver Manager (libiodbc.dylib). If you want to use an ODBC Driver that is compatible with the Unix ODBC Driver Manager (libodbc.dylib), please refer to technote: TNSQ0038.

Installing the iODBC Driver Manager
You can obtain the iODBC driver manager directly from the iODBC.org website or via the link below. Whether you are using the x86_64 edition of Omnis Studio or the arm64/Silcon edition, it will require a compatible libiodbc.dylib or a "universal binary" containing both architectures.

The Installer currently available from the iODBC.org website provides a code signed, universal framework and a symbolic link in /usr/local/lib. This means that it will not be necessary to move any files into the Omnis.app Frameworks folder.

Alternatively, you can download the archive below and place the driver manager with its symbolic link directly into the Omnis Studio.app/Contents/Frameworks folder.

iODBC Driver Manager libiodbc-x86_x64.zip

Note for macOS Ventura 13.6 and Later
If you experience the following error when using the Actual Technologies ODBC Driver 5.1.9 and later, please use the iODBC Administrator library supplied with the ODBC Driver pack:

[iODBC][Driver Manager]Driver's SQLAllocEnv() failed

To do this, use the following terminal commands (adapting the paths as necessary):

cd /Applications/Omnis\ Studio\ 10.22\ 31896.app/Contents/Frameworks
ln -s /Library/Frameworks/iODBC.framework/Versions/Current/iODBC libiodbc.dylib

The Actual Technologies ODBC driver should then logon when you restart Studio.

Configure One or more ODBC Data Sources
Locate your odbc.ini file. System ODBC data sources normally reside in /Library/ODBC/odbc.ini. User data sources normally reside in ~/Library/ODBC/odbc.ini although the actual locations are determined by the values of the ODBCSYSINI and ODBCINI environment variables.

The contents of a given ODBC DSN are driver-specific, although they normally consist of a Driver key plus the required authentication keys, e.g.

[ODBC Data Sources]
actualSqlSvr = Actual Technologies SQL Server
 
[actualSqlSvr]
Driver = /path-to-driver/lib...dylib
Description = SQL Server 17 running on SERVER-PC
UID = henry
PWD = password
Database = test
Server = 192.168.100.15

To set the required enviroment variables prior to starting Omnis Studio, edit the contents of the config.json file, e.g.

/Libary/Application Support/Omnis/Omnis Studio 10.2 29538/studio/config.json

Locate the "macos" section and the "odbcdam.ini" section and set your environment variables here, e.g.

"odbcdam.ini": "ODBCINI=/Users/myUser/Library/ODBC/odbc.ini, ODBCSYSINI=/Library/ODBC/odbc.ini"

Test the Connection
When you open Omnis Studio, test your ODBC connection using the SQL Browser and an ODBC hostname that matches the name of your ODBC DSN. There should be no error ("Driver Manager not found"), and if the ODBC data source was found the ODBC DAM should attempt connection to the specified database.

 

Search Omnis Developer Resources

 

Hit enter to search

X