Setting and retrieving driver options
These functions set and retrieve driver options:
-
SQLSetConnectAttr
This sets an attribute which governs a connection aspect.
odbc SQLSetConnectAttr $hdbc SQL_ATTR_ACCESS_MODE \ SQL_MODE_READ_ONLY 0
-
SQLGetConnectAttr
This retrieves the value of a particular connection option.
odbc SQLGetConnectAttr $hdbc SQL_ATTR_ACCESS_MODE \ ValuePtr 0 NULL
-
SQLSetStmtAttr
This sets an attribute which governs operations that are associated with a particular statement handle.
odbc SQLSetStmtAttr $hstmt SQL_ATTR_ASYNC_ENABLE \ SQL_ASYNC_ENABLE_ON 0
-
SQLGetStmtAttr
This retrieves the value of a particular statement handle option.
odbc SQLGetStmtAttr $hstmt SQL_ATTR_ASYNC_ENABLE \ ValuePtr 0 NULL