Connection Attributes

The connection parameters are strings used to specify how to connect to a database engine or a network server. The string is a list of parameter settings in the form of KEYWORD=value, delimited by semicolons.

The keywords are defined from the following table.

Verbose keyword Short form
  Database Account   UID or USER
  Password   PWD or PASSWORD
  Role   ROLE
  Data Source Name   DSN
  Driver   DRIVER
  Database   DBNAME or DATABASE
  Client   CLIENT
  Character Set   CHARSET or CHARACTERSET
  Set read only   READONLY
  Set nowait   NOWAIT
  Dialect   DIALECT
  Set quoted identifier   QUOTED
  Set sensitive identifier   SENSITIVE
  Set auto quoted identifier   AUTOQUOTED
  File DSN   FILEDSN
  Save DSN   SAVEDSN

The ODBC function SQLDriverConnect uses these keys in the following sequence, first taking the defined attributes, specified in the connection string, then taking the missing information from the specified FILEDSN or DSN.

If the parameter SAVEDSN, is in the connection string, then the parameters, which were supplied by the successful connection, will be saved. Note the password is saved in an encrypted format.

See connection examples