SQLSetConnectAttr in the Cursor Library
The application must call SQLSetConnectAttr to specify the cursor library usage after it calls SQLAllocHandle with a HandleType of SQL_HANDLE_DBC to allocate the connection and before it connects to the
data source. If an application calls SQLSetConnectAttr with the SQL_ATTR_ODBC_CURSORS attribute while the connection is still active,
the cursor library returns an error.
To set a statement attribute supported by the cursor library for all
statements associated with a connection, an application must call SQLSetConnectAttr for that statement attribute after it connects to the data source and before
it opens the cursor. If an application calls SQLSetConnectAttr with a statement attribute and a cursor is open on a statement associated
with the connection, the statement attribute will not be applied to that statement
until the cursor is closed and reopened.