ODBC in Multi-Threaded Environments (Thread Safety)

Handle States

ODBC handles (environment, connection, statement) carry state information between calls to ODBC functions. Uncontrolled accesses to a shared handle by more than one thread can cause this state information to be lost or misconstrued. This section documents the standard types of state information carried by ODBC handles between function calls. Some ODBC drivers may carry additional or extended state that should be documented by the driver

This article is based on ODBC 2.5 and only concerns itself with the basic handles - environment, connection and statement. ODBC 3.0 introduced additional types of handles. In general, state information carried in the new ODBC 3.0 handles can be derived from the information below.

ODBC Handle States

* These states should be protected by a thread-safe ODBC Driver

The next section, Effective Use of ODBC in Multi-Threaded Environments, provides application techniques for sharing ODBC handles between threads.

Return to Contents Page: ODBC Thread Safety     Return to Issues Page

Copyright © 1998 FFE Software, Inc. All Rights Reserved WorldWide