Contents Index Working with ODBC data sources Configuring ODBC data sources using the ODBC Administrator

ASA Database Administration Guide
  Connecting to a Database
    Working with ODBC data sources

Creating an ODBC data source


You can create ODBC data sources on Windows 95/98/Me and Windows NT/2000/XP operating systems using the ODBC Administrator, which provides a central place for creating and managing ODBC data sources.

Adaptive Server Anywhere also includes a cross-platform utility named dbdsn to create data sources.

Before you begin 

This section describes how to create an ODBC data source. Before you create a data source, you need to know which connection parameters you want to include in it.

For more information, see Simple connection examples, and Connection parameters.

ODBC Administrator 

On Windows 95/98/Me and Windows NT/2000/XP, you can use the Microsoft ODBC Administrator to create and edit data sources. You can work with User Data Sources, File Data Sources, and System Data Sources in this utility.

To create an ODBC data source (ODBC Administrator)

  1. Start the ODBC Administrator:

    In Sybase Central, choose Tools > Adaptive Server Anywhere 9 > Open ODBC Administrator.

    or From the Windows Start menu, choose Programs > Sybase > SQL Anywhere 9 > Adaptive Server Anywhere > ODBC Administrator.

    The ODBC Data Source Administrator dialog appears.

  2. Click Add.

    The Create New Data Source wizard appears.

  3. From the list of drivers, choose Adaptive Server Anywhere 9.0, and click Finish.

    The ODBC Configuration for Adaptive Server Anywhere dialog appears.

    The ODBC Configuration for Adaptive Server Anywhere dialog where you can specify connection parameters for an ODBC data source.

    Most of the fields in this window are optional. Click the question mark at the top right of the window and click a dialog field to find more information about that field.

    For more information about the fields in the dialog, see Configuring ODBC data sources using the ODBC Administrator.

  4. When you have specified the parameters you need, click OK to close the window and create the data source.

To edit a data source, find and select one in the ODBC Administrator main window and click Configure.

Creating an ODBC data source from the command line 

You can create User Data Sources using the dbdsn utility. You cannot create File Data Sources or System Data Sources. File and System Data Sources are limited to Windows operating systems only, and you can use the ODBC Administrator to create them.

To create an ODBC data source (Command line)

  1. Open a command prompt.

  2. Type a dbdsn command, specifying the connection parameters you wish to use.

    For example, the following command creates a data source for the Adaptive Server Anywhere sample database. The command must be typed on one line:

dbdsn -w "My DSN"
"uid=DBA;pwd=SQL;dbf=c:\Program Files\Sybase\SQL Anywhere 9\asademo.db"

For more information on the dbdsn utility, see The Data Source utility.


Contents Index Working with ODBC data sources Configuring ODBC data sources using the ODBC Administrator