If your application requires a connection string to connect to a data source, you must specify the data source name that tells the ODBC driver the ODBC.ini section to use for the default connection information. Optionally, you can specify attribute=value pairs in the connection string to override the ODBC.ini default values. The override values are not written to the ODBC.ini file.
You can specify either long or short names in the connection string. The connection string has the following syntax:
DSN=data_source_name{;attribute=value [;attribute=value];...}
An example of a DirectConnect for z/OS connection string is as follows:
DSN=SYBDC TABLES; SRVR=QESRVR;DB=PAYROLL;UID=JOHN;PWD=XYZZY
Long and short names for each attribute are shown in the following table.
Attribute long name |
Short name |
---|---|
DataSourceName |
DSN |
ServerName |
SRVR |
LoginID |
UID |
Password |
PWD |
Database |
DB |
Language |
LANG |
Charset |
CS |
HostName |
HOST |
ApplicationName |
APP |
InterfacesFile |
IFILE |
ArraySize |
AS |
YieldProc |
YLD |
InitializationString |
IS |
ModifySQLStatement |
MSS |
Copyright © 2005. Sybase Inc. All rights reserved. |