You can save sets of connection parameters in a data source. ODBC and Embedded SQL applications like DBISQLC use data sources. You can create data sources from the ODBC Administrator. See “Creating and editing ODBC data sources” for details.
If you are constructing an application, you should only use data sources for ODBC applications. It is possible to specify data sources when you are using the JDBC driver (jConnect), but only within Sybase Central or Interactive SQL. For more information, see “Specifying a driver for your connection”.
Connecting from Sybase Central or Interactive SQL using a data source
Start Sybase Central or Interactive SQL and open the Connect dialog (if it doesn’t appear automatically).
On the Identification tab (Login tab in Interactive
SQL Classic), enter a user ID and password, for example, DBA
and SQL
.
On the lower half of the Identification tab, do one of the following:
Select the ODBC Data Source Name option and specify a data source name (equivalent to the DSN connection parameter, which references a data source in the registry). To view a list of data sources, click Browse.
Select the ODBC Data Source File option and specify a data source file (equivalent to the FileDSN connection parameter, which references the data source held in a file.). You can search for a file by clicking Browse.
The Adaptive Server IQ Demo data source holds a set of connection parameters, including the database file and a Start parameter to start the database.
You can also specify the data source name by including the dsn connection parameter in the dbisql command, as follows:
dbisql -c "dsn=Adaptive Server IQ Demo"
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.