Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » Connecting to a Database » Working with ODBC data sources

Creating an ODBC data source from the command line Next Page

Creating an ODBC data source on Mac OS X


Before you can create an ODBC data source on Mac OS X, you must first add the SQL Anywhere ODBC driver.

To add the SQL Anywhere ODBC driver
  1. Launch the ODBC Administrator from /Applications/Utilities.

  2. Select the Drivers tab.

  3. Click Add.

  4. In the Description field, type SQL Anywhere 10.

  5. 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.

  6. 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.

Creating an ODBC data source
To create an ODBC data source
  1. Launch the ODBC Administrator from /Applications/Utilities.

  2. In the ODBC Administrator, click the User DSN tab, and then click Add.

  3. Choose the SQL Anywhere 10 driver from the list of available drivers. Click OK.

  4. 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.

  5. Click OK.

  6. Click Apply.

  7. 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).