]> git.saurik.com Git - wxWidgets.git/blob - src/iodbc/hdbc.h
DP: Robert's mistake with incorrect var name corrected.
[wxWidgets.git] / src / iodbc / hdbc.h
1 #ifndef _HDBC_H
2 #define _HDBC_H
3
4 typedef struct DBC
5 {
6 int type; /* must be 1st field */
7 struct DBC FAR*
8 next;
9
10 HENV genv; /* back point to global env object */
11
12 HDBC dhdbc; /* driver's private dbc */
13 HENV henv; /* back point to instant env object */
14 HSTMT hstmt; /* list of statement object handle(s) */
15 HERR herr;
16
17 int state;
18
19 /* options */
20 UDWORD access_mode;
21 UDWORD autocommit;
22
23 UDWORD login_timeout;
24 UDWORD odbc_cursors;
25 UDWORD packet_size;
26 UDWORD quiet_mode;
27 UDWORD txn_isolation;
28 SWORD cb_commit;
29 SWORD cb_rollback;
30
31 char FAR*
32 current_qualifier;
33
34 int trace; /* trace flag */
35 char FAR*
36 tfile;
37 void FAR*
38 tstm; /* trace stream */
39 } DBC_t;
40
41 /*
42 * Note:
43 * - ODBC applications can see address of driver manager's
44 * connection object, i.e connection handle -- a void pointer,
45 * but not detail of it. ODBC applications can neither see
46 * detail driver's connection object nor its address.
47 *
48 * - ODBC driver manager knows its own connection objects and
49 * exposes their address to an ODBC application. Driver manager
50 * also knows address of driver's connection objects and keeps
51 * it via dhdbc field in driver manager's connection object.
52 *
53 * - ODBC driver exposes address of its own connection object to
54 * driver manager without detail.
55 *
56 * - Applications can get driver's connection object handle by
57 * SQLGetInfo() with fInfoType equals to SQL_DRIVER_HDBC.
58 */
59
60 enum {
61 en_dbc_allocated,
62 en_dbc_needdata,
63 en_dbc_connected,
64 en_dbc_hstmt
65 };
66
67 #endif