Using connection strings
- Last Updated: August 11, 2023
- 2 minute read
- Hybrid Data Pipeline
- Version 5.0
- Documentation
If you want to use a connection string for connecting to
Hybrid Data Pipeline, or if your application requires it, you must specify either a
DSN (data source name), a File DSN, or a DSN-less connection in the string. The
difference is whether you use the DSN=, FILEDSN=, or the DRIVER= keyword in the connection string, as described in the ODBC
specification. A DSN or FILEDSN connection string tells the driver where to find the
default connection information. Optionally, you may specify attribute=value pairs in the connection string to override the default
values stored in the data source.
The DSN connection string has the form:
DSN=data_source_name[;attribute=value[;attribute=value]...]
The FILEDSN connection string has the form:
FILEDSN=filename.dsn[;attribute=value[;attribute=value]...]
The DSN-less connection string specifies a driver instead of a data source. All connection information must be entered in the connection string because the information is not stored in a data source.
The DSN-less connection string has the form:
DRIVER=[{]driver_name[}][;attribute=value[;attribute=value]...]
These keywords allow attribute=value pairs in
the connection string. You can use these to specify connection options that
customize behavior. For the DSN and FILEDSN keywords, the values specified in the
connection string override the ODBC data source values for connection options.
The following example shows how to override the user name and
password for an ODBC data source named Pipeline:
DSN=Pipeline;UID=test@abccorp.com;PWD=XYZZY
FILEDSN=Pipeline;UID=test@abccorp.com;PWD=XYZZY
The Connection option descriptions lists the long and short names for each attribute, as well as the initial default value when the driver is first installed. You can specify either long or short names in the connection string.