Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » SQL Anywhere database connections » Database connections

 

Connecting using an ODBC data source with a connection string (administration tools)

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.

Prérequis

The connection string in this procedure uses the DSN connection parameter to connect to the SQL Anywhere 16 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:

dbsrv16 -n SampleServer "%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.

 Task
  1. In Sybase Central or Interactive SQL, open the Connect window.

  2. Complete the following fields to connect to the database:

    1. In the Authentication dropdown list, click Database.

    2. In the User ID field, type a user name.

    3. In the Password field, type a password for the user.

    4. In the Action dropdown list, click Connect with a connection string.

    5. In the Parameters field, type connection parameters in a semicolon delimited list of parameter=value pairs. For example:

      DSN=SQL Anywhere 16 Demo;ServerName=SampleServer

      The database server and the database starts and Interactive SQL connects to the database. The database server is named SampleServer.

      Note

      Since a computer system can run multiple SQL Anywhere database servers, always specify the database server name (ServerName=server-name) when connecting to a database.

  3. Click Connect.

Résultat

The administration tool connects to the database.

 See also