Previous Topic

Next Topic

Connection String Keywords

If your application requires a connection string to connect to a data source, you must specify the data source name. Optionally, you can specify attribute=value pairs to override certain data source and vnode definitions. The ODBC function SQLDriverConnect() or SQLDriverConnectW() is required for connection strings.

The connection string has the form:

DSN=data_source_name[;attribute=value[;attribute=value]...]

Alternatively, you can bypass data source definitions entirely if you include sufficient information in the connection string. The minimum attributes in this case are the SERVER, SERVERTYPE, and DATABASE attribute/value pairs.

DSN-less connection strings have the form:

CONNECTSTR=SERVER=server_name; SERVERTYPE=server_type; DATABASE=database;[attribute=value]…]

The following table provides the keyword for each connection string attribute.

Keyword

Attribute Value Description

DSN

Data source name.

DRIVER

Driver description as returned by SQLDrivers().

UID

User ID to override vnode definition. If specified, PWD must also be specified.

PWD

Password to override vnode definition. If specified, UID must also be specified.

SERVER

Vnode name.

SERVERTYPE

Server type (for example, INGRES, IDMS, or DB2).

DATABASE

Database name as defined on the server.

DB

A synonym for DATABASE.

ROLENAME

Role name to override vnode definition.

ROLEPWD

Role password to override vnode definition.

GROUP

Group identifier for the session. Equivalent to the -G flag of the Ingres command-line flags.

BLANKDATE

=NULL
Indicates that the driver must return empty string DATE values as NULL.

DATE1582

=NULL
Indicates that the driver must return values of '1582-01-01' as NULL.

DATE

Same as DATE1582 keyword.

SELECTLOOPS

=N
Indicates that Cursor Loops must be used.

CATCONNECT

=Y
Indicates that a second separate Ingres session must be used for catalog functions (SQLTables, etc.).

NUMERIC_ OVERFLOW

=IGNORE
Indicates that no error is issued if an arithmetic error of numeric overflow, underflow, or divide by zero occur.
Equivalent to "-numeric_overflow=ignore" command line flag.

CATSCHEMANULL

=Y
Returns NULL for schema names form ODBC catalog functions.


© 2007 Ingres Corporation. All rights reserved.