Handles provide a context between an application program and the ODBC service routines. Each handle is a variable that indirectly references an ODBC controlled data object. These data objects hold information stored as attributes along with internal information used by the DB2 ODBC driver code. Attributes define the behavior expected of the data objects and allow a program some control over that behavior.
There are three handle types. All three types of handles are allocated using the SQLAllocHandle() function.
SQLRETURN SQLAllocHandle (SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandlePtr);
The function requires the type of handle to be allocated, an input handle to establish the context for the ...