7. Understanding ODBC Connectivity : ODBC Programming : ODBC Handles
Share this page                  
ODBC Handles
ODBC handles store the environment of ODBC execution components. The components that the handles describe are not visible to the ODBC application, but they are visible internally in the ODBC driver.
There are four types of ODBC handles:
Environment handles describe the general ODBC runtime environment.
Connection handles describe the ODBC environment specific to individual connections.
Statement (query) handles describe the ODBC environment for queries.
Descriptor handles describe metadata information related to result sets.
SQLAllocHandle() allocates ODBC driver resources for these four types of handles. The format of SQLAllocHandle() is:
SQLAllocHandle( HandleType, ParentHandle, Handle)
Specifies the type of handle to be allocated.
Specifies the handle with which the allocated handle is associated.
Identifies the handle itself.