ODBC Connection String Attributes

The ODBC SQLBrowseConnect and SQLDriverConnect functions allow passing in a connection string containing a series of attribute/value pairs to the ODBC Driver Manager to establish a connection with a data source. An example of a connection string :

"DSN=MYDATA;NTL=SNA;LLU=Local;RMU=Remote;RDB=BigData;PC=QSYS2;
DS=QSYS2;RO=false;UID=myname;PWD=Secret"

Some ODBC attributes are required as part of the connection string when used with the ODBC Driver for DB2.

The following tables compare the configuration parameters used by the ODBC Driver for DB2 and the ODBC attribute keywords that are supported by the OLE DB Driver for DB2 as part of the passed-in connection string.

For the ODBC Driver for DB2 in Host Integration Server 2000, these attribute keywords compare as follows:

Microsoft ODBC Driver for DB2ODBC Attribute KeywordComments
General Tab  
Data Source NameDSNRequired parameter.
Data Source DescriptionDESC 
Connection Tab  
ConnectionNTLRequired parameter.
APPC connection NTL=SNA 
TCP/IP connection NTL=TCPIP 
APPC local LU aliasLLUApplicable only if SNA (an APPC connection) is used for the network transport library (NTL=SNA).
APPC remote LU aliasRLUApplicable only if SNA (an APPC connection) is used for the network transport library (NTL=SNA).
APPC mode nameMNApplicable only if SNA (an APPC connection) is used for the network transport library (NTL=SNA).
IP addressNAApplicable only if TCPIP (a TCP/IP connection) is used for the network transport library (NTL=TCPIP).
Network portNPApplicable only if TCPIP (a TCP/IP connection) is used for the network transport library (NTL=TCPIP).
Security Tab  
Use this username  
User Name UID 
  PWD The Password parameter is not on the Security Tab and is not configurable from the ODBC Administrator tool used to configure ODBC data sources. This parameter can only be preset using the ODBC connection string. Most applications will prompt the user for this parameter.
Use single sign-on Not applicable
Target Database Tab  
Initial CatalogRDBRequired parameter.
Package CollectionPCRequired parameter.
Default SchemaDSRequired parameter.
Alternate TP NameTPN 
Distributed transactionsRUW 
Process binary as characterBAC 
Locale Tab  
Host CCSIDCCSIDRequired parameter.
PC code pageCPRequired parameter.

For the ODBC Driver for DB2 supplied with Host Integration Server 2000, these attribute keywords compare as follows:

Microsoft ODBC Driver for DB2ODBC Attribute KeywordComments
General Tab  
Data Source NameDSNRequired parameter.
Data Source DescriptionDESC 
Connection Tab  
ConnectionNTLRequired parameter.
LU 6.2 Connection NTL=SNA 
TCP/IP Connection NTL=TCPIP 
Local APPC LU AliasLLUApplicable only if SNA is used for the network transport library.
Remote APPC LU AliasRLUApplicable only if SNA is used for the network transport library.
APPC Mode NameMNApplicable only if SNA is used for the network transport library.
IP AddressNAApplicable only if TCPIP is used for the network transport library.
Network PortNPApplicable only if TCPIP is used for the network transport library.
Security Tab  
Use this username  
User Name UID 
Password PWD  
Use Single Sign-on Not applicable
Database is read onlyRO 
Target Database Tab  
Remote Database NameRDBRequired parameter.
Package CollectionPCRequired parameter.
Default SchemaDSRequired parameter.
Default IsolationDIL 
Alternate TP NameTPN 
BindTypeBTThis parameter is only supported by the ODBC Driver included with SNA Server 4.0 Service Pack 2 Japanese version and SNA Server 4.0 Service Pack 3 or later.
Auto CommitACM 
Convert Binary Data Types as Character Data TypesBAC 
Locale Tab  
Host LocaleCCSIDRequired parameter.
Use default code page for locale  
PC LocaleCPRequired parameter.
Locale (SNA Server 4.0 Service Pack 2 Japanese version and SNA Server 4.0 Service Pack 3 and later)  
System CCSIDCCSIDRequired parameter.
Mixed CCSIDMCCSIDRequired parameter.
Graphics CCSIDGCCSIDRequired parameter.
PC LocaleCPRequired parameter.
Show: