Before you can create an ODBC data source on Mac OS X, you must first add the SQL Anywhere ODBC driver.
Launch the ODBC Administrator from /Applications/Utilities.
Select the Drivers tab.
Click Add.
In the Description field, type SQL Anywhere 10.
Click Choose and select the SQL Anywhere ODBC driver in both the Driver File Name and Setup File Name fields. By default, it is located in /Applications/SQLAnywhere10/System/lib/dbodbc10_r.bundle.
The _r in the bundle name indicates that it is the threaded version of the driver. There is also an unthreaded version (dbodbc10.bundle) for use with unthreaded applications.
Click OK.
Once you have added the SQL Anywhere ODBC driver, you can create an ODBC data source that is used to connect to your database.
Launch the ODBC Administrator from /Applications/Utilities.
In the ODBC Administrator, click the User DSN tab, and then click Add.
Choose the SQL Anywhere 10 driver from the list of available drivers. Click OK.
Type SQL Anywhere 10 Demo in the Data Source Name field and add the following connection parameters, as shown below. The connection parameters and values are case insensitive.
Keyword | Value |
---|---|
UID | DBA |
PWD | sql |
START | dbeng10 |
DBF | /Applications/SQLAnywhere10/System/demo.db |
ThreadManager | ON |
For more information about connection parameters, see Connection Parameters and Network Protocol Options.
Click OK.
Click Apply.
Press Command+Q to exit the ODBC Administrator.
Alternatively, you can add the information with a text editor. The ODBC configuration files are located in /Library/ODBC within your Home directory. There is an odbcinst.ini file for driver information and an odbc.ini file for data source information.
You can also use the Data Source utility (dbdsn) to create ODBC data sources on Mac OS X. See Data Source utility (dbdsn).