Contents Index Lesson 3: Send a command to the database Lesson 5: Shut down the database server

Introducing SQL Anywhere Studio
   Tutorial: Connecting to the Sample Database

Lesson 4: Create an ODBC data source


The Open Database Connectivity (ODBC) interface is defined by Microsoft Corporation, and is a standard interface for connecting client applications to database-management systems in Windows environments. Connections are made by specifying connection parameters. It is often convenient to collect a set of connection parameters together and store them in an ODBC data source.

You can connect to Adaptive Server Anywhere databases using ODBC data sources from Interactive SQL, Sybase Central, PowerDesigner, InfoMaker, and all the Adaptive Server Anywhere utilities.

Adaptive Server Anywhere supports several programming interfaces in addition to ODBC. You can use ODBC data sources to connect to Adaptive Server Anywhere—not only from ODBC applications, but also from embedded SQL applications, such as the administration utilities, and from Interactive SQL and Sybase Central—even though these applications do not use ODBC. The functionality to process ODBC data sources is built into the embedded SQL client library, and into Sybase Central and Interactive SQL.

In this lesson, we show how to create an ODBC data source.

Create an ODBC data source

  1. Start the ODBC Administrator.

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

    The ODBC Data Source Administrator appears, displaying a list of the data sources you currently have installed on your machine:

    The ODBC Administrator main window.
  2. On the User DSN tab, click Add.

  3. Select Adaptive Server Anywhere 9.0 from the list of drivers, and click Finish.

    The Adaptive Server Anywhere ODBC Configuration dialog appears.

    The Adaptive Server Anywhere ODBC Configuration dialog.

    Many of the fields in this dialog are optional. Click the question mark at the top right of the window and click an entry field to find more information about that field. For many purposes only need to use a few parameters. The following data source parameters are sufficient for the Adaptive Server Anywhere sample database:

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

  5. Start Interactive SQL and connect to the Adaptive Server Anywhere sample database using your new ODBC data source.

For a full description of database connections, see Connecting to a Database.

For more information about ODBC data sources, see Working with ODBC data sources.

For information about setting up ODBC data sources in UNIX, see Using ODBC data sources on UNIX.


Contents Index Lesson 3: Send a command to the database Lesson 5: Shut down the database server