DB2 10.5 for Linux, UNIX, and Windows

SQLSetConnectOption function (CLI) - Set connection option

In ODBC 3.0, SQLSetConnectOption() has been deprecated and replaced with SQLSetConnectAttr(). Although this version of CLI continues to support SQLSetConnectOption(), use SQLSetConnectAttr() in your CLI programs so that they conform to the latest standards.

Migrating to the new function

Note:

This deprecated function cannot be used in a 64-bit environment.

Unicode equivalent: This function can also be used with the Unicode character set. The corresponding Unicode function is SQLSetConnectOptionW(). See Unicode functions (CLI) for information about ANSI to Unicode function mappings.
The statement:
   SQLSetConnectOption(
              hdbc, 
              SQL_AUTOCOMMIT, 
              SQL_AUTOCOMMIT_OFF);
for example, would be rewritten using the new function as:
   SQLSetConnectAttr(
              hdbc, 
              SQL_ATTR_AUTOCOMMIT, 
              SQL_AUTOCOMMIT_OFF,
              0);