Connecting using a data source with a connection string (Sybase Central or Interactive SQL)

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.

Prerequisites

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.

 Connect using a data source with a connection string (Sybase Central or Interactive SQL)
  1. In Sybase Central or Interactive SQL, open the Connect window. See Opening the Connect window (Sybase Central).

  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:

      -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.

      Note

      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).

  3. Click Connect.

Results

The administration tool connects to the database.

Next

None.

 See also