Nucleus ODBC Setup Guide for UNIX Clients

 

Previous Topic:
Entries in the odbc.ini and nucleus.ini Files
Chapter Index
 

 

Using an ODBC Connection String


S
ome ODBC applications may require users to define a connection string, for example, in an ASP script. The connection string contains all of the information required by the ODBC driver to access the underlying SAND data source. A connection string has the following format (using command notation conventions):

"PARAMETER=value [ {; PARAMETER=value}... ]"


The following parameters must be included in the connection string:

Note: See the Entries in the odbc.ini and nucleus.ini Files section above for descriptions of the ODBC parameters.

The following parameters can be optionally specified in the connection string:

Note:
If the user ID or password is not supplied in the connection string, the user will be prompted to enter the required information.


Alternatively, if a DSN with the required information is already set up, the connection string can simply reference the DSN:

"DSN=data-source-name" (for a User or System DSN)

"FILEDSN=data-source-name" (for a File DSN)

Note that a DSN value need not be the sole parameter: Any other parameter included with the DSN value in the connection string takes precedence over the same parameter defined for the DSN. For instance, if "UID=DBA" was defined for the DSN, but the connection string contains "UID=BOB", the connection string value (BOB) will override the DSN value.


Example

"DRIVER=/usr/sand/libsando.so; CONNECTION=serv1_db01; DATABASE=db01; AUTOCOMMIT=false; UID=BOB"