You can leave many connection parameters unspecified, and instead use the default behavior to make a connection. Be cautious about relying on default behavior in production environments, especially if you distribute your application to customers who may install other SQL Anywhere applications on their computer.
For more information about default behavior, see Troubleshooting connections.
If a single personal server is running, with a single loaded database, you can connect using entirely default parameters:
UID=user-id PWD=password |
If more than one database is loaded on a single personal server, you can leave the server as a default, but you need to specify the database you want to connect to:
DBN=db-name UID=user-id PWD=password |
If more than one server is running, you need to specify which server you want to connect to. If only one database is loaded 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 |
The following connection string connects to a named local server, using a named database:
ENG=server-name DBN=db-name UID=user-id PWD=password |
To connect to a network server running on a different computer:
ENG=server-name
DBN=dbn
UID=user-id
PWD=password
CommLinks=tcpip |
If CommLinks is not specified, only local shared memory connections are attempted.
If you are connecting from Sybase Central, Interactive SQL, or the SQL Anywhere Console utility (dbconsole), you can select the Search Network For Database Servers option on the Connect window to attempt a network connection.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |