Contents IndexConnection overview Connecting from an ODBC-enabled application

User's Guide
   Part III. Using SQL Anywhere
     Chapter 15. Connecting to a Database
      Connecting from the SQL Anywhere utilities

All SQL Anywhere database utilities that communicate with the database engine (rather than acting directly on database files) do so using embedded SQL, and follow the procedure outlined in "How client applications connect to a database" when connecting to a database.

How database tools obtain connection parameter values

Many of the database tools obtain the values of the connection parameters in the following way:

  1. If there are values specified on the command line, those values are used for the connection parameters. For example, the following command starts a backup of the default database on the default database engine using the user ID DBA and the password SQL :
         DBBACKUP -c "UID=DBA;PWD=SQL" c:\backup
    
  2. If any line values are missing, the application looks at the setting of the SQLCONNECT environment variable. This variable is not set automatically by SQL Anywhere. If you use a single set of connection parameters frequently, you may want to place a SQLCONNECT environment variable in your AUTOEXEC.BAT file (under DOS and Windows 3.x), your CONFIG.SYS file (under OS/2), the Control Panel (under NT) or the login file (under QNX).

      For a description of the SQLCONNECT environment variable, see "Registry entries and environment variables".

  3. If parameters are not set in the command line (if applicable), or the SQLCONNECT environment variable, then by the connection procedure described above, the application prompts for a user ID and password to connect to the default database on the default database engine

For a description of command line switches for each database tool, see chapter "SQL Anywhere Components".

Contents IndexConnection overview Connecting from an ODBC-enabled application