SQLGetConnectOption Mapping

When an application calls SQLGetConnectOption through an ODBC 3.x driver, the call to:

SQLGetConnectOption(hdbc, fOption, pvParam) 

is mapped as follows:

In these three cases, the ConnectionHandle argument is set to the value in hdbc, the Attribute argument set to the value in fOption, and the ValuePtr argument set to the same value as pvParam.

For ODBC-defined string connection options, the Driver Manager sets the BufferLength argument in the call to SQLGetConnectAttr to the predefined maximum length (SQL_MAX_OPTION_STRING_LENGTH); for a non-string connection option, BufferLength is set to 0.

For an ODBC 3.x driver, the Driver Manager no longer checks to see if Option is in between SQL_CONN_OPT_MIN and SQL_CONN_OPT_MAX, or is greater than SQL_CONNECT_OPT_DRVR_START. The driver must check the validity of the option values.