First Guide to SQL Anywhere Studio
PART 2. Getting Results with SQL Anywhere Studio
CHAPTER 3. Running and Connecting to a Database Server
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 the Windows and Windows NT 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 PowerDynamo, SQL Modeler, InfoMaker, and from all the Adaptive Server Anywhere utilities.
When you install Adaptive Server Anywhere, a sample ODBC data source is provided. You can use this to connect to the sample database. Here we show how to use it from Interactive SQL.
Start Interactive SQL. For instructions, see Connecting to the sample database from Interactive SQL.
From the ODBC Data Source Name list, select ASA 6.0 Sample.
Click OK to connect.
The ASA 6.0 Sample data source contains enough information to connect to the sample database whether or not the database server is running. You can try it both ways.
You can create data sources for your own database connections.
From the Start button, select Programs->Sybase->Adaptive Server Anywhere 6.0->ODBC Administrator. The ODBC Administrator window is displayed, showing a list of the data sources you currently have installed on your machine:
From the User DSN tab, click Add.
Select Adaptive Server Anywhere 6.0 from the list of drivers, and click Finish. The Adaptive Server Anywhere ODBC Configuration window is displayed.
Many of the fields in this window 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 example, you may wish to just use the following parameters:
Data Source Name (ODBC tab) This name appears in the list box. It can contain spaces, but should be short.
User ID (Login tab) The database user ID you will use to connect.
Password (Login tab) You should encrypt the password if there may be security concerns with having passwords stored on your machine.
Database File (Database tab) You can select a database file by browsing your machine.
If you wish to use Java, you will need to also specify a Start line (Database tab) providing the executable name and a cache of at least 8 Mb:
dbeng6 -c 8M
When you have specified the parameters you need, click OK to close the window and create the 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.