The configuration variable ASQL_CONNECT_DATABASE enables you to specify a database other than the default for accessing data. If ASQL_CONNECT_DATABASE is set to a non-blank value, the driver executes "use [database_name]" as soon as the connection is established. From that point, all data access via that connection will be relative to the specified database.

Note that the database can be specified only before the connection; it is not possible to change databases on the fly.

If the system cannot execute the USE statement, the connection attempt fails with SQLCODE 08004. This can occur, for example, if the specified database does not exist, or if the user does not have permissions to access that database.