Sybase 12.4.2 manual Connecting using a data source, To connect using a data source

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 79
Image 79

CHAPTER 2 Running Adaptive Server IQ

5Leave all other fields blank, and click OK. Adaptive Server IQ starts up and loads the sample database, and DBISQL connects to the database.

Connecting using a data source

The asiqdemo data source

You can save sets of connection parameters in a data source. Data sources can be used by ODBC and Embedded SQL applications like DBISQL. You can create data sources from the ODBC Administrator; see “Creating and editing ODBC data sources” for details.

The following procedure shows how to connect to the sample database from DBISQL using a data source.

To connect using a data source:

1Start DBISQL with no databases running.

On UNIX, type dbisql at a system command prompt.

On Windows NT, from the Start menu choose Programs Sybase Adaptive Server IQ 12.0 Interactive SQL.

2Enter DBA as the user ID and SQL as the password.

3Specify the data source. On Windows NT, you can select from the drop- down list of ODBC data sources; for the sample database, select ASIQ12 Sample. On UNIX you must enter it in the ODBC Data Source field.

4For the sample database, leave all other fields blank, and click OK. Adaptive Server IQ starts up and loads the sample database, and Interactive SQL connects to the database. For other databases you may need to provide additional information, depending on your data source.

Note You can also specify the data source name by including the dsn connection parameter in the dbisql command, as follows:

dbisql -c "dsn=ASIQ12 Sample"

The asiqdemo data source holds a set of connection parameters, including the database file and a Start parameter to start the sample database. The server name in this data source is “ hostname_asiqdemo” where hostname represents your system name.

59

Page 79
Image 79
Sybase 12.4.2 manual Connecting using a data source, To connect using a data source