Default Connection Parameters

You can leave many connection parameters unspecified, and instead use the default behavior to make a connection.

Note: Be extremely cautious about relying on default behavior in production environments, especially if you distribute your application to customers who may install other SAP Sybase IQ or SQL Anywhere applications on their machine.

Default Database Server

If you are connecting to a database on your local server, and more than one database has been started on that server, you need to specify the database you wish to connect to, but you can leave the server as a default:

dbn=db_name
uid=user_id
pwd=password
Note: Do not use these parameters if more than one local server is running, or you may connect to the wrong server.

Default Database

If more than one server is running, you need to specify which one you wish to connect to. If only one database has been started on that server, you do not need to specify the database name. The following connection string connects to a named server, using the default database:

eng=server_name
uid=user_id
pwd=password

Connections Without Defaults

The following connection string connects to a named server, using a named database:

eng=server_name
dbn=db_name
uid=user_id
pwd=password