SQLGetConnectOption Mapping
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.0 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.
If fOption indicates an ODBC-defined connection option that returns a string, then the
Driver Manager calls:
ValuePtr, BufferLength, NULL)
If fOption indicates an ODBC-defined connection option that returns a 32-bit integer
value, then the Driver Manager calls:
ValuePtr, 0, NULL)
If fOption indicates a driver-defined statement option, then the Driver Manager calls:
ValuePtr, BufferLength, NULL)