Share via


Visual Basic Concepts

Using ODBC API Functions

Each rdoEnvironment, rdoConnection, rdoQuery, and rdoResultset object includes support for an ODBC handle that you can use to manipulate the object through the ODBC API. The hEnv, hDbc, and hStmt properties of the ODBC API correspond to the rdoEnvironment, rdoConnection, and rdoResultset objects respectively.

The following table lists the ODBC handles that are created by RDO. You can use these handles in your own ODBC API code.

RDO Object Property Handle created by the ODBC API
rdoEnvironment.hEnv SQLAllocEnv
rdoConnection.hDbc SQLAllocConnect, SQLDriverConnect
rdoResultset.hStmt SQLAllocStmt
rdoQuery.hStmt SQLAllocStmt
rdoPreparedStatement.hStmt SQLAllocStmt

Caution   While it is possible to use the ODBC API with the RDO ODBC handles, you are cautioned that incorrect use of the ODBC API can cause unpredictable behavior. For example, if you close connections or deallocate any of these handles using ODBC API code, the RemoteData control or RDO can behave unpredictably. The ODBC handles should not be saved for future use as they are subject to change without notice.