You can connect to a database using an ODBC data source by using the Interactive SQL utility at a command prompt, and the DataSourceName (DSN) connection parameter.
An ODBC data source for the database that you want to connect to.
The SQL Anywhere 16 Demo data source is configured to start the database server and database if they are not already running. If your ODBC data source is not configured to start the database and database server, then you must start them. For example, run the following command to start the sample database:
dbsrv16 -n demo16 "%SQLANYSAMP16%\demo.db"
Contexte et remarques
If a connection string and an ODBC data source both specify the same connection parameter, the value from the connection string is used and the value from the data source is ignored.
You do not need to enter a user ID and a password for this connection because the SQL Anywhere 16 Demo data source already contains this information.
In a production environment, it is recommended that you do not store passwords in an ODBC data source.
Run the following command to connect using the ODBC data source name:
dbisql -c "DSN=SQL Anywhere 16 Demo"
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|