RetOleDbConnStr CLI/ODBC and IBM data server driver configuration keyword
Specifies whether the Mode CLI/ODBC configuration keyword returns a numeric value or string value.
- db2cli.ini keyword syntax:
- RetOleDbConnStr = 0 | 1
- IBM data server driver configuration file (db2dsdriver.cfg) syntax:
- <parameter name="RetOleDbConnStr" value="0 | 1"/>
- Default setting:
- The value for the Mode CLI/ODBC configuration keyword is returned as a string.
- Usage notes:
-
The Mode CLI/ODBC configuration keyword sets the CONNECT mode to either SHARE or EXCLUSIVE. OLE DB expects the value for Mode to have a numeric representation instead of a string representation. RetOleDbConnStr toggles between returning a string and a numeric value.
The possible settings are as follows:- 0 - the value returned by
SQLDriverConnect()andSQLBrowseConnect()for the Mode keyword is either SHARE or EXCLUSIVE - 1 - the value returned by
SQLDriverConnect()andSQLBrowseConnect()for the Mode keyword is either 3 (for SHARE) or 12 (for EXCLUSIVE)
For example, if you set RetOleDbConnStr=1 and callSQLDriverConnect()orSQLBrowseConnect()with the following input connection string for a shared connection:
then the output connection string will have the following format:DSN=SAMPLE;MODE=SHAREDSN=SAMPLE;UID=;PWD=;MODE=3If you set RetOleDbConnStr=1 and callSQLDriverConnect()orSQLBrowseConnect()with the following input connection string for an exclusive connection:
then the output connection string will have the following format:DSN=SAMPLE;UID=NEWTON;PWD=SECRET;MODE=EXCLUSIVEDSN=SAMPLE;UID=NEWTON;PWD=SECRET;MODE=12OLE DB applications that use the string representation for the value of the Mode keyword returned by
SQLDriverConnect()andSQLBrowseConnect()will receive an error from OLE DB Component Services. OLE DB Component Services returns an error because it expects the keyword Mode to have numeric values. Setting RetOleDbConnStr to 1 avoids this behavior, as the value for Mode will then be numeric. - 0 - the value returned by