To specify a connection string in the Connect window, choose the Connect With A Connection String option. This option is useful if you have an ODBC data source and you want to specify additional or different parameters when you connect.
The connection string in this procedure uses the DSN connection parameter to connect to the SQL Anywhere 12 Demo data source. This 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 need to start them. For example, run the following command to start the sample database:
dbeng12 -n SampleServer "%SQLANYSAMP12%\demo.db"
Context and remarks
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. See Connection parameter syntax rules.
In Sybase Central or Interactive SQL, open the Connect window. See Opening the Connect window (Sybase Central).
Complete the following fields to connect to the database:
In the Authentication dropdown list, click Database.
In the User ID field, type a user name.
In the Password field, type a password for the user.
In the Action dropdown list, click Connect With A Connection String.
In the Parameters field, type connection parameters in a semicolon delimited list of parameter=value pairs. For example:
-c DSN=SQL Anywhere 12 Demo;ServerName=SampleServer
The database server and the database starts and Interactive SQL connects to the database. The database server is named SampleServer.
Your computer may be running software that has an embedded SQL Anywhere server, in which case there could be multiple servers running without you realizing it. You should always specify the server name (ServerName=server-name).
Discuss this page in DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|