]> git.saurik.com Git - wxWidgets.git/blame - src/iodbc/hdbc.h
Const casting fix for Vis C.
[wxWidgets.git] / src / iodbc / hdbc.h
CommitLineData
cd5bf2a6
RR
1/*
2 * hdbc.h
3 *
4 * $Id$
5 *
6 * Data source connect object management functions
7 *
8 * The iODBC driver manager.
9 *
10 * Copyright (C) 1995 by Ke Jin <kejin@empress.com>
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
21 *
22 * You should have received a copy of the GNU Library General Public
23 * License along with this library; if not, write to the Free
24 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26#ifndef _HDBC_H
27#define _HDBC_H
1a6944fd 28
7e616b10 29typedef struct DBC
cd5bf2a6
RR
30 {
31 int type; /* must be 1st field */
32 struct DBC FAR *
33 next;
1a6944fd 34
cd5bf2a6 35 HENV genv; /* back point to global env object */
1a6944fd 36
cd5bf2a6
RR
37 HDBC dhdbc; /* driver's private dbc */
38 HENV henv; /* back point to instant env object */
39 HSTMT hstmt; /* list of statement object handle(s) */
40 HERR herr;
1a6944fd 41
cd5bf2a6 42 int state;
1a6944fd 43
cd5bf2a6
RR
44 /* options */
45 UDWORD access_mode;
46 UDWORD autocommit;
1a6944fd 47
cd5bf2a6
RR
48 UDWORD login_timeout;
49 UDWORD odbc_cursors;
50 UDWORD packet_size;
51 UDWORD quiet_mode;
52 UDWORD txn_isolation;
53 SWORD cb_commit;
54 SWORD cb_rollback;
1a6944fd 55
cd5bf2a6
RR
56 char FAR *
57 current_qualifier;
1a6944fd 58
cd5bf2a6
RR
59 int trace; /* trace flag */
60 char FAR *
61 tfile;
62 void FAR *
63 tstm; /* trace stream */
64 }
65DBC_t;
1a6944fd 66
cd5bf2a6 67/*
1a6944fd 68 * Note:
cd5bf2a6
RR
69 * - ODBC applications can see address of driver manager's
70 * connection object, i.e connection handle -- a void pointer,
71 * but not detail of it. ODBC applications can neither see
1a6944fd
RR
72 * detail driver's connection object nor its address.
73 *
74 * - ODBC driver manager knows its own connection objects and
75 * exposes their address to an ODBC application. Driver manager
76 * also knows address of driver's connection objects and keeps
77 * it via dhdbc field in driver manager's connection object.
cd5bf2a6 78 *
1a6944fd
RR
79 * - ODBC driver exposes address of its own connection object to
80 * driver manager without detail.
81 *
82 * - Applications can get driver's connection object handle by
83 * SQLGetInfo() with fInfoType equals to SQL_DRIVER_HDBC.
84 */
85
cd5bf2a6
RR
86enum
87 {
88 en_dbc_allocated,
89 en_dbc_needdata,
90 en_dbc_connected,
91 en_dbc_hstmt
92 };
1a6944fd 93#endif