]> git.saurik.com Git - wxWidgets.git/blob - src/iodbc/herr.h
More OS/2 update to fix some owner drawn things
[wxWidgets.git] / src / iodbc / herr.h
1 /*
2 * herr.h
3 *
4 * $Id$
5 *
6 * Error stack 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 _HERR_H
27 #define _HERR_H
28
29 typedef enum
30 {
31 en_00000 = 0,
32 en_01000,
33 en_01002,
34 en_01004,
35 en_01006,
36 en_01S00,
37 en_01S01,
38 en_01S02,
39 en_01S03,
40 en_01S04,
41 en_07001,
42 en_07006,
43 en_08001,
44 en_08002,
45 en_08003,
46 en_08004,
47 en_08007,
48 en_08S01,
49 en_21S01,
50 en_21S02,
51 en_22001,
52 en_22003,
53 en_22005,
54 en_22008,
55 en_22012,
56 en_22026,
57 en_23000,
58 en_24000,
59 en_25000,
60 en_28000,
61 en_34000,
62 en_37000,
63 en_3C000,
64 en_40001,
65 en_42000,
66 en_70100,
67 en_IM001,
68 en_IM002,
69 en_IM003,
70 en_IM004,
71 en_IM005,
72 en_IM006,
73 en_IM007,
74 en_IM008,
75 en_IM009,
76 en_IM010,
77 en_IM011,
78 en_IM012,
79 en_IM013,
80 en_IM014,
81 en_S0001,
82 en_S0002,
83 en_S0011,
84 en_S0012,
85 en_S0021,
86 en_S0022,
87 en_S0023,
88 en_S1000,
89 en_S1001,
90 en_S1002,
91 en_S1003,
92 en_S1004,
93 en_S1008,
94 en_S1009,
95 en_S1010,
96 en_S1011,
97 en_S1012,
98 en_S1015,
99 en_S1090,
100 en_S1091,
101 en_S1092,
102 en_S1093,
103 en_S1094,
104 en_S1095,
105 en_S1096,
106 en_S1097,
107 en_S1098,
108 en_S1099,
109 en_S1100,
110 en_S1101,
111 en_S1103,
112 en_S1104,
113 en_S1105,
114 en_S1106,
115 en_S1107,
116 en_S1108,
117 en_S1109,
118 en_S1110,
119 en_S1111,
120 en_S1C00,
121 en_S1T00,
122 en_sqlstat_total
123 }
124 sqlstcode_t;
125
126 typedef void FAR *HERR;
127 #define SQL_NULL_HERR ((HERR)NULL)
128
129 typedef struct
130 {
131 sqlstcode_t code;
132 char FAR *stat;
133 char FAR *msg;
134 }
135 sqlerrmsg_t;
136
137 typedef struct sqlerr
138 {
139 sqlstcode_t code;
140 int idx;
141 char FAR *msg;
142 struct sqlerr *next;
143 }
144 sqlerr_t;
145
146 extern void _iodbcdm_freesqlerrlist (HERR herr);
147 extern HERR _iodbcdm_pushsqlerr (HERR list, sqlstcode_t code, char *sysmsg);
148
149 #define PUSHSYSERR(list, msg) \
150 list = (HERR)_iodbcdm_pushsqlerr( (HERR)(list), 0, (char*)msg )
151 #define PUSHSQLERR(list, code) \
152 list = (HERR)_iodbcdm_pushsqlerr( (HERR)(list), (int)(code), NULL )
153 #endif /* _SQLERR_H */