Enabling the AUTOFREE feature
You can enable the AUTOFREE feature for an ODBC application in two ways.
About this task
The SQL_INFX_ATTR_AUTO_FREE attribute can be set in any connection state between C2 and C5 (both included) when setting it using SQLSetConnectAttr, whereas it can be set by using SQLSetStmtAttr only when the statement is in S1 (allocated) state. The value of the SQL_INFX_ATTR_AUTO_FREE attribute can be retrieved by using SQLGetConnectAttr or SQLSetStmtAttr.
You can enable the AUTOFREE feature for an ODBC application in either of the following ways: