Connecting to a Database

Use a CONNECT TO statement in your application to specify the SQL Server name, the database name, the login ID, and the password for the connection. You can connect to servers and databases other than those that were used during precompiling.

The default time-out for a database connection is 10 seconds. If the specified server does not respond to the connection request, or if the network name lookup fails, the compilation or execution suspends for approximately 10 seconds. Use the SET OPTION statement to change the connection time-out.

For more information about Embedded SQL statements, see Chapter 3, "Embedded SQL Statements."