Assembling a list of connection parameters

The following diagram illustrates how the interface library assembles the list of connection parameters and establishes a connection.

Interface libraries assembling a list of connection parameters.
  • Precedence   Parameters held in more than one place are subject to the following order of precedence:

    1. Connection string

    2. SQLCONNECT environment variable

    3. ODBC data source

    Note

    If a connection string and an ODBC data source both specify the same connection parameter, the value from the connection string is used and the value from the data source is ignored. See Connection parameter syntax rules.

  • Failure   Failure at this stage can occur if the connection string uses incorrect syntax, an unknown connection parameter, or if, in the connection string or in SQLCONNECT, you specify a data source that does not exist.

  • Ignored parameters   Depending on other connections already in use, some connection parameters may be ignored, such as:

    • AutoStop   Ignored if the database is already loaded.

    • DatabaseFile   Ignored if DatabaseName is specified and a database with this name is already running.

The interface library uses the completed list of connection parameters to attempt to connect.

 See also