1 /**
2  * Windows API header module
3  *
4  * Translated from MinGW Windows headers
5  *
6  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
7  * Source: $(DRUNTIMESRC core/sys/windows/_sqlext.d)
8  */
9 module core.sys.windows.sqlext;
10 version (Windows):
11 
12 /* Conversion notes:
13    The MinGW file was a horrible mess. All of the #defines were sorted alphabetically,
14    which is crazy. This file needs a lot of work.
15    In MinGW, sqlext #includes sqlucode, but sqlucode #includes sqlext,
16    creating a circular dependency!
17 */
18 
19 public import core.sys.windows.sql;
20 import core.sys.windows.windef;
21 
22 enum SQL_SPEC_MAJOR = 3;
23 enum SQL_SPEC_MINOR = 51;
24 const char[] SQL_SPEC_STRING = "03.51";
25 enum SQL_ACCESS_MODE = 101;
26 enum SQL_ACTIVE_CONNECTIONS = 0;
27 enum SQL_ACTIVE_STATEMENTS  = 1;
28 
29 enum SQL_DATE = 9;
30 enum SQL_TIME = 10;
31 enum SQL_SIGNED_OFFSET = -20;
32 enum SQL_TINYINT = -6;
33 enum SQL_TIMESTAMP = 11;
34 enum SQL_UNSIGNED_OFFSET = -22;
35 
36 enum SQL_ADD = 4;
37 enum SQL_ALL_EXCEPT_LIKE = 2;
38 
39 enum SQL_API_ALL_FUNCTIONS       =   0;
40 enum SQL_API_SQLCOLATTRIBUTES    =   6;
41 enum SQL_API_SQLDRIVERCONNECT    =  41;
42 enum SQL_API_SQLBROWSECONNECT    =  55;
43 enum SQL_API_SQLCOLUMNPRIVILEGES =  56;
44 enum SQL_API_SQLDESCRIBEPARAM    =  58;
45 enum SQL_API_SQLEXTENDEDFETCH    =  59;
46 enum SQL_API_SQLFOREIGNKEYS      =  60;
47 enum SQL_API_SQLMORERESULTS      =  61;
48 enum SQL_API_SQLNATIVESQL        =  62;
49 enum SQL_API_SQLNUMPARAMS        =  63;
50 enum SQL_API_SQLPARAMOPTIONS     =  64;
51 enum SQL_API_SQLPRIMARYKEYS      =  65;
52 enum SQL_API_SQLPROCEDURECOLUMNS =  66;
53 enum SQL_API_SQLPROCEDURES       =  67;
54 enum SQL_API_SQLSETPOS           =  68;
55 enum SQL_API_SQLSETSCROLLOPTIONS =  69;
56 enum SQL_API_SQLTABLEPRIVILEGES  =  70;
57 enum SQL_API_SQLDRIVERS          =  71;
58 enum SQL_API_SQLBINDPARAMETER    =  72;
59 enum SQL_API_LOADBYORDINAL       = 199;
60 
61 enum SQL_ASYNC_ENABLE = 4;
62 enum SQL_ASYNC_ENABLE_OFF = 0UL;
63 enum SQL_ASYNC_ENABLE_ON = 1UL;
64 enum SQL_ASYNC_ENABLE_DEFAULT = SQL_ASYNC_ENABLE_OFF;
65 
66 enum SQL_ATTR_CONNECTION_DEAD = 1209;
67 enum SQL_ATTR_READONLY = 0;
68 enum SQL_ATTR_READWRITE_UNKNOWN = 2;
69 enum SQL_ATTR_WRITE = 1;
70 
71 enum SQL_AUTOCOMMIT = 102;
72 enum SQL_AUTOCOMMIT_OFF = 0UL;
73 enum SQL_AUTOCOMMIT_ON = 1UL;
74 enum SQL_AUTOCOMMIT_DEFAULT = SQL_AUTOCOMMIT_ON;
75 enum SQL_BEST_ROWID = 1;
76 enum SQL_BIGINT = -5;
77 enum SQL_BINARY = -2;
78 enum SQL_BIND_BY_COLUMN = 0UL;
79 enum SQL_BIND_TYPE = 5;
80 enum SQL_BIND_TYPE_DEFAULT = SQL_BIND_BY_COLUMN;
81 enum SQL_BIT = -7;
82 
83 enum SQL_BOOKMARK_PERSISTENCE = 82;
84 
85 // for BOOKMARK_PERSISTENCE
86 enum SQL_BP_CLOSE       = 1;
87 enum SQL_BP_DELETE      = 2;
88 enum SQL_BP_DROP        = 4;
89 enum SQL_BP_TRANSACTION = 8;
90 enum SQL_BP_UPDATE      = 16;
91 enum SQL_BP_OTHER_HSTMT = 32;
92 enum SQL_BP_SCROLL      = 64;
93 
94 enum SQL_C_BINARY    = SQL_BINARY;
95 enum SQL_C_BIT       = SQL_BIT;
96 enum SQL_C_CHAR      = SQL_CHAR;
97 enum SQL_C_DATE      = SQL_DATE;
98 enum SQL_C_DOUBLE    = SQL_DOUBLE;
99 enum SQL_C_FLOAT     = SQL_REAL;
100 enum SQL_C_LONG      = SQL_INTEGER;
101 enum SQL_C_SHORT     = SQL_SMALLINT;
102 enum SQL_C_SLONG     = SQL_C_LONG+SQL_SIGNED_OFFSET;
103 enum SQL_C_SSHORT    = SQL_C_SHORT+SQL_SIGNED_OFFSET;
104 enum SQL_C_STINYINT  = SQL_TINYINT+SQL_SIGNED_OFFSET;
105 enum SQL_C_TIME      = SQL_TIME;
106 enum SQL_C_TIMESTAMP = SQL_TIMESTAMP;
107 enum SQL_C_TINYINT   = SQL_TINYINT;
108 enum SQL_C_ULONG     = SQL_C_LONG+SQL_UNSIGNED_OFFSET;
109 enum SQL_C_USHORT    = SQL_C_SHORT+SQL_UNSIGNED_OFFSET;
110 enum SQL_C_UTINYINT  = SQL_TINYINT+SQL_UNSIGNED_OFFSET;
111 enum SQL_C_BOOKMARK  = SQL_C_ULONG;
112 enum SQL_C_DEFAULT   = 99;
113 
114 enum SQL_CASCADE = 0;
115 enum SQL_CB_NON_NULL = 1;
116 enum SQL_CB_NULL = 0;
117 deprecated {
118 enum SQL_CC_CLOSE = SQL_CB_CLOSE;/* deprecated */
119 enum SQL_CC_DELETE = SQL_CB_DELETE;/* deprecated */
120 enum SQL_CC_PRESERVE = SQL_CB_PRESERVE;/* deprecated */
121 }
122 enum SQL_CD_FALSE = 0L;
123 enum SQL_CD_TRUE = 1L;
124 
125 enum SQL_CN_ANY = 2;
126 enum SQL_CN_DIFFERENT = 1;
127 enum SQL_CN_NONE = 0;
128 
129 enum SQL_COLUMN_ALIAS = 87;
130 
131 enum SQL_COLUMN_COUNT = 0;
132 enum SQL_COLUMN_NAME = 1;
133 enum SQL_COLUMN_DISPLAY_SIZE = 6;
134 enum SQL_COLUMN_LABEL = 18;
135 enum SQL_COLUMN_LENGTH = 3;
136 enum SQL_COLUMN_MONEY = 9;
137 enum SQL_COLUMN_NULLABLE = 7;
138 enum SQL_COLUMN_OWNER_NAME = 16;
139 enum SQL_COLUMN_PRECISION = 4;
140 enum SQL_COLUMN_QUALIFIER_NAME = 17;
141 enum SQL_COLUMN_SCALE = 5;
142 enum SQL_COLUMN_UNSIGNED = 8;
143 enum SQL_COLUMN_UPDATABLE = 10;
144 enum SQL_COLUMN_AUTO_INCREMENT = 11;
145 enum SQL_COLUMN_CASE_SENSITIVE = 12;
146 enum SQL_COLUMN_SEARCHABLE = 13;
147 enum SQL_COLUMN_TYPE = 2;
148 enum SQL_COLUMN_TYPE_NAME = 14;
149 enum SQL_COLUMN_TABLE_NAME = 15;
150 
151 enum SQL_CONCAT_NULL_BEHAVIOR = 22;
152 
153 enum SQL_CONCUR_READ_ONLY = 1;
154 enum SQL_CONCUR_DEFAULT   = SQL_CONCUR_READ_ONLY;
155 enum SQL_CONCUR_LOCK      = 2;
156 enum SQL_CONCUR_ROWVER    = 3;
157 enum SQL_CONCUR_TIMESTAMP = SQL_CONCUR_ROWVER;/* deprecated */
158 enum SQL_CONCUR_VALUES    = 4;
159 
160 enum SQL_CONCURRENCY = 7;
161 enum SQL_CONVERT_BIGINT = 53;
162 enum SQL_CONVERT_BINARY = 54;
163 enum SQL_CONVERT_BIT = 55;
164 enum SQL_CONVERT_CHAR = 56;
165 enum SQL_CONVERT_DATE = 57;
166 enum SQL_CONVERT_DECIMAL = 58;
167 enum SQL_CONVERT_DOUBLE = 59;
168 enum SQL_CONVERT_FLOAT = 60;
169 enum SQL_CONVERT_FUNCTIONS = 48;
170 enum SQL_CONVERT_INTEGER = 61;
171 enum SQL_CONVERT_LONGVARBINARY = 71;
172 enum SQL_CONVERT_LONGVARCHAR = 62;
173 enum SQL_CONVERT_NUMERIC = 63;
174 enum SQL_CONVERT_REAL = 64;
175 enum SQL_CONVERT_SMALLINT = 65;
176 enum SQL_CONVERT_TIME = 66;
177 enum SQL_CONVERT_TIMESTAMP = 67;
178 enum SQL_CONVERT_TINYINT = 68;
179 enum SQL_CONVERT_VARBINARY = 69;
180 enum SQL_CONVERT_VARCHAR = 70;
181 enum SQL_CORRELATION_NAME = 74;
182 enum SQL_CR_CLOSE = SQL_CB_CLOSE;/* deprecated */
183 enum SQL_CR_DELETE = SQL_CB_DELETE;/* deprecated */
184 enum SQL_CR_PRESERVE = SQL_CB_PRESERVE;/* deprecated */
185 
186 enum : ULONG {
187     SQL_CUR_USE_IF_NEEDED = 0,
188     SQL_CUR_USE_ODBC,
189     SQL_CUR_USE_DRIVER,
190     SQL_CUR_DEFAULT = SQL_CUR_USE_DRIVER
191 }
192 
193 enum SQL_CURRENT_QUALIFIER = 109;
194 enum SQL_CURSOR_DYNAMIC = 2UL;
195 enum SQL_CURSOR_FORWARD_ONLY = 0UL;
196 enum SQL_CURSOR_KEYSET_DRIVEN = 1UL;
197 enum SQL_CURSOR_ROLLBACK_BEHAVIOR = 24;
198 enum SQL_CURSOR_STATIC = 3UL;
199 enum SQL_CURSOR_TYPE = 6;
200 enum SQL_CURSOR_TYPE_DEFAULT = SQL_CURSOR_FORWARD_ONLY;
201 
202 enum SQL_CV_CASCADED = 0x00000004L;
203 enum SQL_CV_CHECK_OPTION = 0x00000002L;
204 enum SQL_CV_CREATE_VIEW = 0x00000001L;
205 enum SQL_CV_LOCAL = 0x00000008L;
206 enum SQL_CVT_BIGINT = 0x00004000L;
207 enum SQL_CVT_BINARY = 0x00000400L;
208 enum SQL_CVT_BIT = 0x00001000L;
209 enum SQL_CVT_CHAR = 0x00000001L;
210 enum SQL_CVT_DATE = 0x00008000L;
211 enum SQL_CVT_DECIMAL = 0x00000004L;
212 enum SQL_CVT_DOUBLE = 0x00000080L;
213 enum SQL_CVT_FLOAT = 0x00000020L;
214 enum SQL_CVT_INTEGER = 0x00000008L;
215 enum SQL_CVT_LONGVARBINARY = 0x00040000L;
216 enum SQL_CVT_LONGVARCHAR = 0x00000200L;
217 enum SQL_CVT_NUMERIC = 0x00000002L;
218 enum SQL_CVT_REAL = 0x00000040L;
219 enum SQL_CVT_SMALLINT = 0x00000010L;
220 enum SQL_CVT_TIME = 0x00010000L;
221 enum SQL_CVT_TIMESTAMP = 0x00020000L;
222 enum SQL_CVT_TINYINT = 0x00002000L;
223 enum SQL_CVT_VARBINARY = 0x00000800L;
224 enum SQL_CVT_VARCHAR = 0x00000100L;
225 enum SQL_DATABASE_NAME = 16;/* deprecated */
226 
227 enum SQL_DEFAULT_PARAM = -5;
228 enum SQL_DELETE = 3;
229 
230 enum SQL_DRIVER_COMPLETE = 1;
231 enum SQL_DRIVER_COMPLETE_REQUIRED = 3;
232 enum SQL_DRIVER_HDBC = 3;
233 enum SQL_DRIVER_HENV = 4;
234 enum SQL_DRIVER_HLIB = 76;
235 enum SQL_DRIVER_HSTMT = 5;
236 enum SQL_DRIVER_NAME = 6;
237 enum SQL_DRIVER_NOPROMPT = 0;
238 enum SQL_DRIVER_ODBC_VER = 77;
239 enum SQL_DRIVER_PROMPT = 2;
240 enum SQL_DRIVER_VER = 7;
241 
242 enum SQL_DTC_ENLIST_EXPENSIVE = 1;
243 enum SQL_DTC_UNENLIST_EXPENSIVE = 2;
244 enum SQL_DTC_TRANSITION_COST = 1750;
245 enum SQL_ENSURE = 1;
246 enum SQL_ENTIRE_ROWSET = 0;
247 enum SQL_EXPRESSIONS_IN_ORDERBY = 27;
248 enum SQL_FD_FETCH_BOOKMARK = 128;
249 enum SQL_FD_FETCH_PREV = SQL_FD_FETCH_PRIOR;/* deprecated */
250 enum SQL_FD_FETCH_RESUME = 64;
251 enum SQL_FETCH_BOOKMARK = 8;
252 enum SQL_FETCH_PREV = SQL_FETCH_PRIOR;/* deprecated */
253 enum SQL_FETCH_RESUME = 7;/* deprecated */
254 
255 enum SQL_FILE_NOT_SUPPORTED = 0x0000;
256 enum SQL_FILE_TABLE = 0x0001;
257 enum SQL_FILE_QUALIFIER = 0x0002;
258 enum SQL_FILE_CATALOG = SQL_FILE_QUALIFIER;
259 enum SQL_FILE_USAGE = 84;
260 
261 enum SQL_FN_CVT_CONVERT = 0x00000001L;
262 enum SQL_FN_NUM_ABS = 0x00000001L;
263 enum SQL_FN_NUM_ACOS = 0x00000002L;
264 enum SQL_FN_NUM_ASIN = 0x00000004L;
265 enum SQL_FN_NUM_ATAN = 0x00000008L;
266 enum SQL_FN_NUM_ATAN2 = 0x00000010L;
267 enum SQL_FN_NUM_CEILING = 0x00000020L;
268 enum SQL_FN_NUM_COS = 0x00000040L;
269 enum SQL_FN_NUM_COT = 0x00000080L;
270 enum SQL_FN_NUM_DEGREES = 0x00040000L;
271 enum SQL_FN_NUM_EXP = 0x00000100L;
272 enum SQL_FN_NUM_FLOOR = 0x00000200L;
273 enum SQL_FN_NUM_LOG = 0x00000400L;
274 enum SQL_FN_NUM_LOG10 = 0x00080000L;
275 enum SQL_FN_NUM_MOD = 0x00000800L;
276 enum SQL_FN_NUM_PI = 0x00010000L;
277 enum SQL_FN_NUM_POWER = 0x00100000L;
278 enum SQL_FN_NUM_RADIANS = 0x00200000L;
279 enum SQL_FN_NUM_RAND = 0x00020000L;
280 enum SQL_FN_NUM_ROUND = 0x00400000L;
281 enum SQL_FN_NUM_SIGN = 0x00001000L;
282 enum SQL_FN_NUM_SIN = 0x00002000L;
283 enum SQL_FN_NUM_SQRT = 0x00004000L;
284 enum SQL_FN_NUM_TAN = 0x00008000L;
285 enum SQL_FN_NUM_TRUNCATE = 0x00800000L;
286 enum SQL_FN_STR_ASCII = 0x00002000L;
287 enum SQL_FN_STR_CHAR = 0x00004000L;
288 enum SQL_FN_STR_CONCAT = 0x00000001L;
289 enum SQL_FN_STR_DIFFERENCE = 0x00008000L;
290 enum SQL_FN_STR_INSERT = 0x00000002L;
291 enum SQL_FN_STR_LCASE = 0x00000040L;
292 enum SQL_FN_STR_LEFT = 0x00000004L;
293 enum SQL_FN_STR_LENGTH = 0x00000010L;
294 enum SQL_FN_STR_LOCATE = 0x00000020L;
295 enum SQL_FN_STR_LOCATE_2 = 0x00010000L;
296 enum SQL_FN_STR_LTRIM = 0x00000008L;
297 enum SQL_FN_STR_REPEAT = 0x00000080L;
298 enum SQL_FN_STR_REPLACE = 0x00000100L;
299 enum SQL_FN_STR_RIGHT = 0x00000200L;
300 enum SQL_FN_STR_RTRIM = 0x00000400L;
301 enum SQL_FN_STR_SOUNDEX = 0x00020000L;
302 enum SQL_FN_STR_SPACE = 0x00040000L;
303 enum SQL_FN_STR_SUBSTRING = 0x00000800L;
304 enum SQL_FN_STR_UCASE = 0x00001000L;
305 enum SQL_FN_SYS_DBNAME = 0x00000002L;
306 enum SQL_FN_SYS_IFNULL = 0x00000004L;
307 enum SQL_FN_SYS_USERNAME = 0x00000001L;
308 enum SQL_FN_TD_CURDATE = 0x00000002L;
309 enum SQL_FN_TD_CURTIME = 0x00000200L;
310 enum SQL_FN_TD_DAYNAME = 0x00008000L;
311 enum SQL_FN_TD_DAYOFMONTH = 0x00000004L;
312 enum SQL_FN_TD_DAYOFWEEK = 0x00000008L;
313 enum SQL_FN_TD_DAYOFYEAR = 0x00000010L;
314 enum SQL_FN_TD_HOUR = 0x00000400L;
315 enum SQL_FN_TD_MINUTE = 0x00000800L;
316 enum SQL_FN_TD_MONTH = 0x00000020L;
317 enum SQL_FN_TD_MONTHNAME = 0x00010000L;
318 enum SQL_FN_TD_NOW = 0x00000001L;
319 enum SQL_FN_TD_QUARTER = 0x00000040L;
320 enum SQL_FN_TD_SECOND = 0x00001000L;
321 enum SQL_FN_TD_TIMESTAMPADD = 0x00002000L;
322 enum SQL_FN_TD_TIMESTAMPDIFF = 0x00004000L;
323 enum SQL_FN_TD_WEEK = 0x00000080L;
324 enum SQL_FN_TD_YEAR = 0x00000100L;
325 enum SQL_FN_TSI_DAY = 0x00000010L;
326 enum SQL_FN_TSI_FRAC_SECOND = 0x00000001L;
327 enum SQL_FN_TSI_HOUR = 0x00000008L;
328 enum SQL_FN_TSI_MINUTE = 0x00000004L;
329 enum SQL_FN_TSI_MONTH = 0x00000040L;
330 enum SQL_FN_TSI_QUARTER = 0x00000080L;
331 enum SQL_FN_TSI_SECOND = 0x00000002L;
332 enum SQL_FN_TSI_WEEK = 0x00000020L;
333 enum SQL_FN_TSI_YEAR = 0x00000100L;
334 enum SQL_GB_GROUP_BY_CONTAINS_SELECT = 2;
335 enum SQL_GB_GROUP_BY_EQUALS_SELECT = 1;
336 enum SQL_GB_NO_RELATION = 3;
337 enum SQL_GB_NOT_SUPPORTED = 0;
338 enum SQL_GD_BLOCK = 4;
339 enum SQL_GD_BOUND = 8;
340 enum SQL_GET_BOOKMARK = 13;
341 enum SQL_GROUP_BY = 88;
342 enum SQL_IGNORE = -6;
343 enum SQL_INFO_FIRST = 0;
344 enum SQL_KEYSET_SIZE = 8;
345 enum SQL_KEYSET_SIZE_DEFAULT = 0UL;
346 enum SQL_KEYWORDS = 89;
347 enum SQL_LCK_EXCLUSIVE = 2;
348 enum SQL_LCK_NO_CHANGE = 1;
349 enum SQL_LCK_UNLOCK = 4;
350 
351 enum SQL_LEN_BINARY_ATTR_OFFSET  = -100;
352 enum SQL_LEN_DATA_AT_EXEC_OFFSET = -100;
353 //MACRO #define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET)
354 //MACRO #define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET)
355 
356 enum SQL_LIKE_ESCAPE_CLAUSE = 113;
357 enum SQL_LIKE_ONLY = 1;
358 enum SQL_LOCK_EXCLUSIVE = 1;
359 enum SQL_LOCK_NO_CHANGE = 0;
360 enum SQL_LOCK_TYPES = 78;
361 enum SQL_LOCK_UNLOCK = 2;
362 enum SQL_LOGIN_TIMEOUT = 103;
363 enum SQL_LOGIN_TIMEOUT_DEFAULT = 15UL;
364 enum SQL_LONGVARBINARY = -4;
365 enum SQL_LONGVARCHAR = -1;
366 enum SQL_MAX_BINARY_LITERAL_LEN = 112;
367 enum SQL_MAX_CHAR_LITERAL_LEN = 108;
368 enum SQL_MAX_DSN_LENGTH = 32;
369 enum SQL_MAX_LENGTH = 3;
370 enum SQL_MAX_LENGTH_DEFAULT = 0UL;
371 enum SQL_MAX_OPTION_STRING_LENGTH = 256;
372 enum SQL_MAX_OWNER_NAME_LEN = 32;
373 enum SQL_MAX_PROCEDURE_NAME_LEN = 33;
374 enum SQL_MAX_QUALIFIER_NAME_LEN = 34;
375 enum SQL_MAX_ROW_SIZE_INCLUDES_LONG = 103;
376 enum SQL_MAX_ROWS = 1;
377 enum SQL_MAX_ROWS_DEFAULT = 0UL;
378 
379 enum SQL_MODE_READ_WRITE = 0UL;
380 enum SQL_MODE_READ_ONLY = 1UL;
381 enum SQL_MODE_DEFAULT = SQL_MODE_READ_WRITE;
382 
383 enum SQL_MULT_RESULT_SETS = 36;
384 enum SQL_MULTIPLE_ACTIVE_TXN = 37;
385 enum SQL_NC_END = 0x0004;
386 enum SQL_NC_START = 0x0002;
387 enum SQL_NEED_LONG_DATA_LEN = 111;
388 enum SQL_NNC_NON_NULL = 0x0001;
389 enum SQL_NNC_NULL = 0x0000;
390 enum SQL_NO_TOTAL = -4;
391 enum SQL_NON_NULLABLE_COLUMNS = 75;
392 
393 enum SQL_NOSCAN_OFF = 0UL;
394 enum SQL_NOSCAN_ON = 1UL;
395 enum SQL_NOSCAN = 2;
396 enum SQL_NOSCAN_DEFAULT = SQL_NOSCAN_OFF;
397 
398 enum SQL_NUMERIC_FUNCTIONS = 49;
399 enum SQL_OAC_LEVEL1 = 0x0001;
400 enum SQL_OAC_LEVEL2 = 0x0002;
401 enum SQL_OAC_NONE = 0x0000;
402 enum SQL_ODBC_API_CONFORMANCE = 9;
403 enum SQL_ODBC_CURSORS = 110;
404 enum SQL_ODBC_SAG_CLI_CONFORMANCE = 12;
405 enum SQL_ODBC_SQL_CONFORMANCE = 15;
406 enum SQL_ODBC_SQL_OPT_IEF = 73;
407 enum SQL_ODBC_VER = 10;
408 enum SQL_OPT_TRACE = 104;
409 
410 enum SQL_OPT_TRACE_FILE_DEFAULT = "\\SQL.LOG";
411 enum SQL_OPT_TRACE_OFF = 0UL;
412 enum SQL_OPT_TRACE_DEFAULT = SQL_OPT_TRACE_OFF;
413 enum SQL_OPT_TRACE_ON = 1UL;
414 
415 enum SQL_OPT_TRACEFILE = 105;
416 enum SQL_OSC_CORE = 1;
417 enum SQL_OSC_EXTENDED = 2;
418 enum SQL_OSC_MINIMUM = 0;
419 enum SQL_OSCC_COMPLIANT = 1;
420 enum SQL_OSCC_NOT_COMPLIANT = 0;
421 enum SQL_OU_DML_STATEMENTS = 1;
422 enum SQL_OU_INDEX_DEFINITION = 8;
423 enum SQL_OU_PRIVILEGE_DEFINITION = 16;
424 enum SQL_OU_PROCEDURE_INVOCATION = 2;
425 enum SQL_OU_TABLE_DEFINITION = 4;
426 enum SQL_OUTER_JOINS = 38;
427 enum SQL_OWNER_TERM = 39;
428 enum SQL_OWNER_USAGE = 91;
429 enum SQL_PACKET_SIZE = 112;
430 enum SQL_PARAM_INPUT = 1;
431 enum SQL_PARAM_INPUT_OUTPUT = 2;
432 enum SQL_PARAM_OUTPUT = 4;
433 enum SQL_PARAM_TYPE_DEFAULT = SQL_PARAM_INPUT_OUTPUT;
434 enum SQL_PARAM_TYPE_UNKNOWN = 0;
435 enum SQL_PC_NOT_PSEUDO = 1;
436 enum SQL_POS_ADD = 16;
437 enum SQL_POS_DELETE = 8;
438 enum SQL_POS_OPERATIONS = 79;
439 enum SQL_POS_POSITION = 1;
440 enum SQL_POS_REFRESH = 2;
441 enum SQL_POS_UPDATE = 4;
442 enum SQL_POSITION = 0;
443 enum SQL_POSITIONED_STATEMENTS = 80;
444 enum SQL_PROCEDURE_TERM = 40;
445 enum SQL_PROCEDURES = 21;
446 enum SQL_PS_POSITIONED_DELETE = 1;
447 enum SQL_PS_POSITIONED_UPDATE = 2;
448 enum SQL_PS_SELECT_FOR_UPDATE = 4;
449 enum SQL_PT_FUNCTION = 2;
450 enum SQL_PT_PROCEDURE = 1;
451 enum SQL_PT_UNKNOWN = 0;
452 enum SQL_QL_END = 0x0002;
453 enum SQL_QL_START = 0x0001;
454 enum SQL_QU_DML_STATEMENTS = 1;
455 enum SQL_QU_INDEX_DEFINITION = 8;
456 enum SQL_QU_PRIVILEGE_DEFINITION = 16;
457 enum SQL_QU_PROCEDURE_INVOCATION = 2;
458 enum SQL_QU_TABLE_DEFINITION = 4;
459 enum SQL_QUALIFIER_LOCATION = 114;
460 enum SQL_QUALIFIER_NAME_SEPARATOR = 41;
461 enum SQL_QUALIFIER_TERM = 42;
462 enum SQL_QUALIFIER_USAGE = 92;
463 enum SQL_QUERY_TIMEOUT = 0;
464 enum SQL_QUERY_TIMEOUT_DEFAULT = 0UL;
465 enum SQL_QUICK = 0;
466 enum SQL_QUIET_MODE = 111;
467 enum SQL_QUOTED_IDENTIFIER_CASE = 93;
468 
469 enum SQL_RD_OFF = 0UL;
470 enum SQL_RD_ON = 1UL;
471 enum SQL_RD_DEFAULT = SQL_RD_ON;
472 
473 enum SQL_REFRESH = 1;
474 enum SQL_RESTRICT = 1;
475 enum SQL_RESULT_COL = 3;
476 enum SQL_RETRIEVE_DATA = 11;
477 enum SQL_RETURN_VALUE = 5;
478 enum SQL_ROW_ADDED = 4;
479 enum SQL_ROW_DELETED = 1;
480 enum SQL_ROW_ERROR = 5;
481 enum SQL_ROW_NOROW = 3;
482 enum SQL_ROW_NUMBER = 14;
483 enum SQL_ROW_SUCCESS = 0;
484 enum SQL_ROW_UPDATED = 2;
485 enum SQL_ROW_UPDATES = 11;
486 enum SQL_ROWSET_SIZE = 9;
487 enum SQL_ROWSET_SIZE_DEFAULT = 1UL;
488 enum SQL_ROWVER = 2;
489 enum SQL_SC_NON_UNIQUE = 0UL;
490 enum SQL_SC_TRY_UNIQUE = 1UL;
491 enum SQL_SC_UNIQUE = 2UL;
492 enum SQL_SCCO_OPT_TIMESTAMP = SQL_SCCO_OPT_ROWVER;/* deprecated */
493 enum SQL_SCROLL_DYNAMIC = -2L;/* deprecated */
494 enum SQL_SCROLL_FORWARD_ONLY = 0L;/* deprecated */
495 enum SQL_SCROLL_KEYSET_DRIVEN = -1L;/* deprecated */
496 enum SQL_SCROLL_OPTIONS = 44;
497 enum SQL_SCROLL_STATIC = -3L;/* deprecated */
498 enum SQL_SEARCHABLE = 3;
499 enum SQL_SET_NULL = 2;
500 enum SQL_SETPARAM_VALUE_MAX = -1L;
501 enum SQL_SETPOS_MAX_LOCK_VALUE = SQL_LOCK_UNLOCK;
502 enum SQL_SETPOS_MAX_OPTION_VALUE = SQL_ADD;
503 enum SQL_SIMULATE_CURSOR = 10;
504 enum SQL_SO_DYNAMIC = 4;
505 enum SQL_SO_FORWARD_ONLY = 1;
506 enum SQL_SO_KEYSET_DRIVEN = 2;
507 enum SQL_SO_MIXED = 8;
508 enum SQL_SO_STATIC = 16;
509 enum SQL_SQ_COMPARISON = 1;
510 enum SQL_SQ_CORRELATED_SUBQUERIES = 16;
511 enum SQL_SQ_EXISTS = 2;
512 enum SQL_SQ_IN = 4;
513 enum SQL_SQ_QUANTIFIED = 8;
514 enum SQL_SQLSTATE_SIZE = 5;
515 enum SQL_SS_ADDITIONS = 1;
516 enum SQL_SS_DELETIONS = 2;
517 enum SQL_SS_UPDATES = 4;
518 enum SQL_STATIC_SENSITIVITY = 83;
519 enum SQL_STRING_FUNCTIONS = 50;
520 enum SQL_SUBQUERIES = 95;
521 enum SQL_SYSTEM_FUNCTIONS = 51;
522 enum SQL_TABLE_STAT = 0;
523 enum SQL_TABLE_TERM = 45;
524 enum SQL_TIMEDATE_ADD_INTERVALS = 109;
525 enum SQL_TIMEDATE_DIFF_INTERVALS = 110;
526 enum SQL_TIMEDATE_FUNCTIONS = 52;
527 enum SQL_TRANSLATE_DLL = 106;
528 enum SQL_TRANSLATE_OPTION = 107;
529 enum SQL_TXN_ISOLATION = 108;
530 enum SQL_TXN_VERSIONING = 16;
531 enum SQL_TYPE_NULL = 0;
532 enum SQL_U_UNION = 1;
533 enum SQL_U_UNION_ALL = 2;
534 
535 enum SQL_UB_OFF = 0UL;
536 enum SQL_UB_DEFAULT = SQL_UB_OFF;
537 enum SQL_UB_ON = 1UL;
538 
539 enum SQL_UNION = 96;
540 enum SQL_UNSEARCHABLE = 0;
541 enum SQL_UPDATE = 2;
542 enum SQL_USE_BOOKMARKS = 12;
543 enum SQL_VARBINARY = -3;
544 
545 enum SQL_COLATT_OPT_MAX = SQL_COLUMN_LABEL;
546 enum SQL_COLATT_OPT_MIN = SQL_COLUMN_COUNT;
547 enum SQL_PRED_SEARCHABLE = SQL_SEARCHABLE;
548 
549 //MACRO #define SQL_POSITION_TO(s, r) SQLSetPos(s, r, SQL_POSITION, SQL_LOCK_NO_CHANGE)
550 
551 //MACRO #define SQL_LOCK_RECORD(s, r, l) SQLSetPos(s, r, SQL_POSITION, l)
552 
553 //MACRO #define SQL_REFRESH_RECORD(s, r, l) SQLSetPos(s, r, SQL_REFRESH, l)
554 
555 //MACRO #define SQL_UPDATE_RECORD(s, r) SQLSetPos(s, r, SQL_UPDATE, SQL_LOCK_NO_CHANGE)
556 
557 //MACRO #define SQL_DELETE_RECORD(s, r) SQLSetPos(s, r, SQL_DELETE, SQL_LOCK_NO_CHANGE)
558 
559 //MACRO #define SQL_ADD_RECORD(s, r) SQLSetPos(s, r, SQL_ADD, SQL_LOCK_NO_CHANGE)
560 
561 
562 static if (ODBCVER < 0x0300) {
563 enum SQL_CONNECT_OPT_DRVR_START = 1000;
564 enum SQL_CONN_OPT_MAX = SQL_PACKET_SIZE;
565 enum SQL_CONN_OPT_MIN = SQL_ACCESS_MODE;
566 enum SQL_STMT_OPT_MAX = SQL_ROW_NUMBER;
567 enum SQL_STMT_OPT_MIN = SQL_QUERY_TIMEOUT;
568 enum SQL_TYPE_DRIVER_START = SQL_INTERVAL_YEAR;
569 enum SQL_TYPE_DRIVER_END = SQL_UNICODE_LONGVARCHAR;
570 enum SQL_TYPE_MIN = SQL_BIT;
571 enum SQL_TYPE_MAX = SQL_VARCHAR;
572 }
573 
574 static if (ODBCVER < 0x0300) {
575 enum SQL_NO_DATA_FOUND = 100;
576 enum SQL_INTERVAL_YEAR = -80;
577 enum SQL_INTERVAL_MONTH = -81;
578 enum SQL_INTERVAL_YEAR_TO_MONTH = -82;
579 enum SQL_INTERVAL_DAY = -83;
580 enum SQL_INTERVAL_HOUR = -84;
581 enum SQL_INTERVAL_MINUTE = -85;
582 enum SQL_INTERVAL_SECOND = -86;
583 enum SQL_INTERVAL_DAY_TO_HOUR = -87;
584 enum SQL_INTERVAL_DAY_TO_MINUTE = -88;
585 enum SQL_INTERVAL_DAY_TO_SECOND = -89;
586 enum SQL_INTERVAL_HOUR_TO_MINUTE = -90;
587 enum SQL_INTERVAL_HOUR_TO_SECOND = -91;
588 enum SQL_INTERVAL_MINUTE_TO_SECOND = -92;
589 } else {
590 enum SQL_NO_DATA_FOUND = SQL_NO_DATA;
591 enum SQL_CODE_YEAR = 1;
592 enum SQL_CODE_MONTH = 2;
593 enum SQL_CODE_DAY = 3;
594 enum SQL_CODE_HOUR = 4;
595 enum SQL_CODE_MINUTE = 5;
596 enum SQL_CODE_SECOND = 6;
597 enum SQL_CODE_YEAR_TO_MONTH = 7;
598 enum SQL_CODE_DAY_TO_HOUR = 8;
599 enum SQL_CODE_DAY_TO_MINUTE = 9;
600 enum SQL_CODE_DAY_TO_SECOND = 10;
601 enum SQL_CODE_HOUR_TO_MINUTE = 11;
602 enum SQL_CODE_HOUR_TO_SECOND = 12;
603 enum SQL_CODE_MINUTE_TO_SECOND = 13;
604 enum SQL_INTERVAL_YEAR = 100 + SQL_CODE_YEAR;
605 enum SQL_INTERVAL_MONTH = 100 + SQL_CODE_MONTH;
606 enum SQL_INTERVAL_DAY = 100 + SQL_CODE_DAY;
607 enum SQL_INTERVAL_HOUR = 100 + SQL_CODE_HOUR;
608 enum SQL_INTERVAL_MINUTE = 100 + SQL_CODE_MINUTE;
609 enum SQL_INTERVAL_SECOND = 100 + SQL_CODE_SECOND;
610 enum SQL_INTERVAL_YEAR_TO_MONTH = 100 + SQL_CODE_YEAR_TO_MONTH;
611 enum SQL_INTERVAL_DAY_TO_HOUR = 100 + SQL_CODE_DAY_TO_HOUR;
612 enum SQL_INTERVAL_DAY_TO_MINUTE = 100 + SQL_CODE_DAY_TO_MINUTE;
613 enum SQL_INTERVAL_DAY_TO_SECOND = 100 + SQL_CODE_DAY_TO_SECOND;
614 enum SQL_INTERVAL_HOUR_TO_MINUTE = 100 + SQL_CODE_HOUR_TO_MINUTE;
615 enum SQL_INTERVAL_HOUR_TO_SECOND = 100 + SQL_CODE_HOUR_TO_SECOND;
616 enum SQL_INTERVAL_MINUTE_TO_SECOND = 100 + SQL_CODE_MINUTE_TO_SECOND;
617 }//[Yes] #endif
618 
619 
620 static if ((ODBCVER >= 0x0201) && (ODBCVER < 0x0300)) {
621 enum SQL_OJ_CAPABILITIES = 65003;
622 }
623 
624 static if (ODBCVER >= 0x0250) {
625 enum SQL_NO_ACTION   = 3;
626 enum SQL_SET_DEFAULT = 4;
627 }
628 
629 static if (ODBCVER >= 0x0300) {
630 enum SQL_ACTIVE_ENVIRONMENTS = 116;
631 enum SQL_AD_ADD_CONSTRAINT_DEFERRABLE = 0x00000080L;
632 enum SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED = 0x00000020L;
633 enum SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE = 0x00000040L;
634 enum SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE = 0x00000100L;
635 enum SQL_AD_ADD_DOMAIN_CONSTRAINT = 0x00000002L;
636 enum SQL_AD_ADD_DOMAIN_DEFAULT = 0x00000008L;
637 enum SQL_AD_CONSTRAINT_NAME_DEFINITION = 0x00000001L;
638 enum SQL_AD_DROP_DOMAIN_CONSTRAINT = 0x00000004L;
639 enum SQL_AD_DROP_DOMAIN_DEFAULT = 0x00000010L;
640 enum SQL_AF_ALL = 0x00000040L;
641 enum SQL_AF_AVG = 0x00000001L;
642 enum SQL_AF_COUNT = 0x00000002L;
643 enum SQL_AF_DISTINCT = 0x00000020L;
644 enum SQL_AF_MAX = 0x00000004L;
645 enum SQL_AF_MIN = 0x00000008L;
646 enum SQL_AF_SUM = 0x00000010L;
647 enum SQL_AGGREGATE_FUNCTIONS = 169;
648 enum SQL_ALL_CATALOGS = "%";
649 enum SQL_ALL_SCHEMAS = "%";
650 enum SQL_ALL_TABLE_TYPES = "%";
651 enum SQL_ALTER_DOMAIN = 117;
652 enum SQL_AM_CONNECTION = 1;
653 enum SQL_AM_NONE = 0;
654 enum SQL_AM_STATEMENT = 2;
655 enum SQL_API_ODBC3_ALL_FUNCTIONS = 999;
656 enum SQL_API_ODBC3_ALL_FUNCTIONS_SIZE = 250;
657 enum SQL_API_SQLALLOCHANDLESTD = 73;
658 enum SQL_API_SQLBULKOPERATIONS = 24;
659 enum SQL_ASYNC_MODE = 10021;
660 enum SQL_AT_ADD_COLUMN_COLLATION = 0x00000080L;
661 enum SQL_AT_ADD_COLUMN_DEFAULT = 0x00000040L;
662 enum SQL_AT_ADD_COLUMN_SINGLE = 0x00000020L;
663 enum SQL_AT_ADD_TABLE_CONSTRAINT = 0x00001000L;
664 enum SQL_AT_CONSTRAINT_DEFERRABLE = 0x00040000L;
665 enum SQL_AT_CONSTRAINT_INITIALLY_DEFERRED = 0x00010000L;
666 enum SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE = 0x00020000L;
667 enum SQL_AT_CONSTRAINT_NAME_DEFINITION = 0x00008000L;
668 enum SQL_AT_CONSTRAINT_NON_DEFERRABLE = 0x00080000L;
669 enum SQL_AT_DROP_COLUMN_CASCADE = 0x00000400L;
670 enum SQL_AT_DROP_COLUMN_DEFAULT = 0x00000200L;
671 enum SQL_AT_DROP_COLUMN_RESTRICT = 0x00000800L;
672 enum SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE = 0x00002000L;
673 enum SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT = 0x00004000L;
674 enum SQL_AT_SET_COLUMN_DEFAULT = 0x00000100L;
675 enum SQL_ATTR_ACCESS_MODE = SQL_ACCESS_MODE;
676 enum SQL_ATTR_ASYNC_ENABLE = 4;
677 enum SQL_ATTR_AUTOCOMMIT = SQL_AUTOCOMMIT;
678 enum SQL_ATTR_CONCURRENCY = SQL_CONCURRENCY;
679 enum SQL_ATTR_CONNECTION_POOLING = 201;
680 enum SQL_ATTR_CONNECTION_TIMEOUT = 113;
681 enum SQL_ATTR_CP_MATCH = 202;
682 enum SQL_ATTR_CURRENT_CATALOG = SQL_CURRENT_QUALIFIER;
683 enum SQL_ATTR_CURSOR_TYPE = SQL_CURSOR_TYPE;
684 enum SQL_ATTR_DISCONNECT_BEHAVIOR = 114;
685 enum SQL_ATTR_ENABLE_AUTO_IPD = 15;
686 enum SQL_ATTR_ENLIST_IN_DTC = 1207;
687 enum SQL_ATTR_ENLIST_IN_XA = 1208;
688 enum SQL_ATTR_FETCH_BOOKMARK_PTR = 16;
689 enum SQL_ATTR_KEYSET_SIZE = SQL_KEYSET_SIZE;
690 enum SQL_ATTR_LOGIN_TIMEOUT = SQL_LOGIN_TIMEOUT;
691 enum SQL_ATTR_MAX_LENGTH = SQL_MAX_LENGTH;
692 enum SQL_ATTR_MAX_ROWS = SQL_MAX_ROWS;
693 enum SQL_ATTR_NOSCAN = SQL_NOSCAN;
694 enum SQL_ATTR_ODBC_CURSORS = SQL_ODBC_CURSORS;
695 enum SQL_ATTR_ODBC_VERSION = 200;
696 enum SQL_ATTR_PACKET_SIZE = SQL_PACKET_SIZE;
697 enum SQL_ATTR_PARAM_BIND_OFFSET_PTR = 17;
698 enum SQL_ATTR_PARAM_BIND_TYPE = 18;
699 enum SQL_ATTR_PARAM_OPERATION_PTR = 19;
700 enum SQL_ATTR_PARAM_STATUS_PTR = 20;
701 enum SQL_ATTR_PARAMS_PROCESSED_PTR = 21;
702 enum SQL_ATTR_PARAMSET_SIZE = 22;
703 enum SQL_ATTR_QUERY_TIMEOUT = SQL_QUERY_TIMEOUT;
704 enum SQL_ATTR_QUIET_MODE = SQL_QUIET_MODE;
705 enum SQL_ATTR_RETRIEVE_DATA = SQL_RETRIEVE_DATA;
706 enum SQL_ATTR_ROW_ARRAY_SIZE = 27;
707 enum SQL_ATTR_ROW_BIND_OFFSET_PTR = 23;
708 enum SQL_ATTR_ROW_BIND_TYPE = SQL_BIND_TYPE;
709 enum SQL_ATTR_ROW_NUMBER = SQL_ROW_NUMBER;
710 enum SQL_ATTR_ROW_OPERATION_PTR = 24;
711 enum SQL_ATTR_ROW_STATUS_PTR = 25;
712 enum SQL_ATTR_ROWS_FETCHED_PTR = 26;
713 enum SQL_ATTR_SIMULATE_CURSOR = SQL_SIMULATE_CURSOR;
714 enum SQL_ATTR_TRACE = SQL_OPT_TRACE;
715 enum SQL_ATTR_TRACEFILE = SQL_OPT_TRACEFILE;
716 enum SQL_ATTR_TRANSLATE_LIB = SQL_TRANSLATE_DLL;
717 enum SQL_ATTR_TRANSLATE_OPTION = SQL_TRANSLATE_OPTION;
718 enum SQL_ATTR_TXN_ISOLATION = SQL_TXN_ISOLATION;
719 enum SQL_ATTR_USE_BOOKMARKS = SQL_USE_BOOKMARKS;
720 enum SQL_BATCH_ROW_COUNT = 120;
721 enum SQL_BATCH_SUPPORT = 121;
722 enum SQL_BRC_EXPLICIT = 0x0000002;
723 enum SQL_BRC_PROCEDURES = 0x0000001;
724 enum SQL_BRC_ROLLED_UP = 0x0000004;
725 enum SQL_BS_ROW_COUNT_EXPLICIT = 0x00000002L;
726 enum SQL_BS_ROW_COUNT_PROC = 0x00000008L;
727 enum SQL_BS_SELECT_EXPLICIT = 0x00000001L;
728 enum SQL_BS_SELECT_PROC = 0x00000004L;
729 enum SQL_C_INTERVAL_DAY = SQL_INTERVAL_DAY;
730 enum SQL_C_INTERVAL_DAY_TO_HOUR = SQL_INTERVAL_DAY_TO_HOUR;
731 enum SQL_C_INTERVAL_DAY_TO_MINUTE = SQL_INTERVAL_DAY_TO_MINUTE;
732 enum SQL_C_INTERVAL_DAY_TO_SECOND = SQL_INTERVAL_DAY_TO_SECOND;
733 enum SQL_C_INTERVAL_HOUR = SQL_INTERVAL_HOUR;
734 enum SQL_C_INTERVAL_HOUR_TO_MINUTE = SQL_INTERVAL_HOUR_TO_MINUTE;
735 enum SQL_C_INTERVAL_HOUR_TO_SECOND = SQL_INTERVAL_HOUR_TO_SECOND;
736 enum SQL_C_INTERVAL_MINUTE = SQL_INTERVAL_MINUTE;
737 enum SQL_C_INTERVAL_MINUTE_TO_SECOND = SQL_INTERVAL_MINUTE_TO_SECOND;
738 enum SQL_C_INTERVAL_MONTH = SQL_INTERVAL_MONTH;
739 enum SQL_C_INTERVAL_SECOND = SQL_INTERVAL_SECOND;
740 enum SQL_C_INTERVAL_YEAR = SQL_INTERVAL_YEAR;
741 enum SQL_C_INTERVAL_YEAR_TO_MONTH = SQL_INTERVAL_YEAR_TO_MONTH;
742 enum SQL_C_NUMERIC = SQL_NUMERIC;
743 enum SQL_C_SBIGINT = SQL_BIGINT+SQL_SIGNED_OFFSET;
744 enum SQL_C_TYPE_DATE = SQL_TYPE_DATE;
745 enum SQL_C_TYPE_TIME = SQL_TYPE_TIME;
746 enum SQL_C_TYPE_TIMESTAMP = SQL_TYPE_TIMESTAMP;
747 enum SQL_C_UBIGINT = SQL_BIGINT+SQL_UNSIGNED_OFFSET;
748 enum SQL_C_VARBOOKMARK = SQL_C_BINARY;
749 enum SQL_CA_CONSTRAINT_DEFERRABLE = 0x00000040L;
750 enum SQL_CA_CONSTRAINT_INITIALLY_DEFERRED = 0x00000010L;
751 enum SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE = 0x00000020L;
752 enum SQL_CA_CONSTRAINT_NON_DEFERRABLE = 0x00000080L;
753 enum SQL_CA_CREATE_ASSERTION = 0x00000001L;
754 enum SQL_CA1_ABSOLUTE = 0x00000002L;
755 enum SQL_CA1_BOOKMARK = 0x00000008L;
756 enum SQL_CA1_BULK_ADD = 0x00010000L;
757 enum SQL_CA1_BULK_DELETE_BY_BOOKMARK = 0x00040000L;
758 enum SQL_CA1_BULK_FETCH_BY_BOOKMARK = 0x00080000L;
759 enum SQL_CA1_BULK_UPDATE_BY_BOOKMARK = 0x00020000L;
760 enum SQL_CA1_LOCK_EXCLUSIVE = 0x00000080L;
761 enum SQL_CA1_LOCK_NO_CHANGE = 0x00000040L;
762 enum SQL_CA1_LOCK_UNLOCK = 0x00000100L;
763 enum SQL_CA1_NEXT = 0x00000001L;
764 enum SQL_CA1_POS_DELETE = 0x00000800L;
765 enum SQL_CA1_POS_POSITION = 0x00000200L;
766 enum SQL_CA1_POS_REFRESH = 0x00001000L;
767 enum SQL_CA1_POS_UPDATE = 0x00000400L;
768 enum SQL_CA1_POSITIONED_DELETE = 0x00004000L;
769 enum SQL_CA1_POSITIONED_UPDATE = 0x00002000L;
770 enum SQL_CA1_RELATIVE = 0x00000004L;
771 enum SQL_CA1_SELECT_FOR_UPDATE = 0x00008000L;
772 enum SQL_CA2_CRC_APPROXIMATE = 0x00002000L;
773 enum SQL_CA2_CRC_EXACT = 0x00001000L;
774 enum SQL_CA2_LOCK_CONCURRENCY = 0x00000002L;
775 
776 enum SQL_CA2_MAX_ROWS_CATALOG = 0x00000800L;
777 enum SQL_CA2_MAX_ROWS_DELETE  = 0x00000200L;
778 enum SQL_CA2_MAX_ROWS_INSERT  = 0x00000100L;
779 enum SQL_CA2_MAX_ROWS_SELECT  = 0x00000080L;
780 enum SQL_CA2_MAX_ROWS_UPDATE  = 0x00000400L;
781 enum SQL_CA2_MAX_ROWS_AFFECTS_ALL = SQL_CA2_MAX_ROWS_SELECT | SQL_CA2_MAX_ROWS_INSERT |
782         SQL_CA2_MAX_ROWS_DELETE | SQL_CA2_MAX_ROWS_UPDATE | SQL_CA2_MAX_ROWS_CATALOG;
783 
784 enum SQL_CA2_OPT_ROWVER_CONCURRENCY = 0x00000004L;
785 enum SQL_CA2_OPT_VALUES_CONCURRENCY = 0x00000008L;
786 enum SQL_CA2_READ_ONLY_CONCURRENCY = 0x00000001L;
787 enum SQL_CA2_SENSITIVITY_ADDITIONS = 0x00000010L;
788 enum SQL_CA2_SENSITIVITY_DELETIONS = 0x00000020L;
789 enum SQL_CA2_SENSITIVITY_UPDATES = 0x00000040L;
790 enum SQL_CA2_SIMULATE_NON_UNIQUE = 0x00004000L;
791 enum SQL_CA2_SIMULATE_TRY_UNIQUE = 0x00008000L;
792 enum SQL_CA2_SIMULATE_UNIQUE = 0x00010000L;
793 enum SQL_CATALOG_LOCATION = SQL_QUALIFIER_LOCATION;
794 enum SQL_CATALOG_NAME_SEPARATOR = SQL_QUALIFIER_NAME_SEPARATOR;
795 enum SQL_CATALOG_TERM = SQL_QUALIFIER_TERM;
796 enum SQL_CATALOG_USAGE = SQL_QUALIFIER_USAGE;
797 enum SQL_CCOL_CREATE_COLLATION = 0x00000001L;
798 enum SQL_CCS_COLLATE_CLAUSE = 0x00000002L;
799 enum SQL_CCS_CREATE_CHARACTER_SET = 0x00000001L;
800 enum SQL_CCS_LIMITED_COLLATION = 0x00000004L;
801 enum SQL_CDO_COLLATION = 0x00000008L;
802 enum SQL_CDO_CONSTRAINT = 0x00000004L;
803 enum SQL_CDO_CONSTRAINT_DEFERRABLE = 0x00000080L;
804 enum SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED = 0x00000020L;
805 enum SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE = 0x00000040L;
806 enum SQL_CDO_CONSTRAINT_NAME_DEFINITION = 0x00000010L;
807 enum SQL_CDO_CONSTRAINT_NON_DEFERRABLE = 0x00000100L;
808 enum SQL_CDO_CREATE_DOMAIN = 0x00000001L;
809 enum SQL_CDO_DEFAULT = 0x00000002L;
810 enum SQL_CL_END = SQL_QL_END;
811 enum SQL_CL_START = SQL_QL_START;
812 enum SQL_COL_PRED_BASIC = SQL_ALL_EXCEPT_LIKE;
813 enum SQL_COL_PRED_CHAR = SQL_LIKE_ONLY;
814 enum SQL_COLUMN_DRIVER_START = 1000;
815 enum SQL_COLUMN_IGNORE = SQL_IGNORE;
816 enum SQL_COLUMN_NUMBER_UNKNOWN = -2;
817 enum SQL_CONVERT_GUID = 173;
818 
819 enum SQL_CONVERT_WCHAR               = 122;
820 enum SQL_CONVERT_INTERVAL_DAY_TIME   = 123;
821 enum SQL_CONVERT_INTERVAL_YEAR_MONTH = 124;
822 enum SQL_CONVERT_WLONGVARCHAR        = 125;
823 enum SQL_CONVERT_WVARCHAR            = 126;
824 
825 enum SQL_CREATE_ASSERTION     = 127;
826 enum SQL_CREATE_CHARACTER_SET = 128;
827 enum SQL_CREATE_COLLATION     = 129;
828 enum SQL_CREATE_DOMAIN        = 130;
829 enum SQL_CREATE_SCHEMA        = 131;
830 enum SQL_CREATE_TABLE         = 132;
831 enum SQL_CREATE_TRANSLATION   = 133;
832 enum SQL_CREATE_VIEW          = 134;
833 
834 
835 enum SQL_CP_OFF            = 0UL;
836 enum SQL_CP_DEFAULT        = SQL_CP_OFF;
837 enum SQL_CP_ONE_PER_DRIVER = 1UL;
838 enum SQL_CP_ONE_PER_HENV   = 2UL;
839 
840 enum SQL_CP_STRICT_MATCH  = 0UL;
841 enum SQL_CP_MATCH_DEFAULT = SQL_CP_STRICT_MATCH;
842 enum SQL_CP_RELAXED_MATCH = 1UL;
843 
844 enum SQL_CS_CREATE_SCHEMA         = 0x00000001L;
845 enum SQL_CS_AUTHORIZATION         = 0x00000002L;
846 enum SQL_CS_DEFAULT_CHARACTER_SET = 0x00000004L;
847 
848 enum SQL_CT_COLUMN_COLLATION = 0x00000800L;
849 enum SQL_CT_COLUMN_CONSTRAINT = 0x00000200L;
850 enum SQL_CT_COLUMN_DEFAULT = 0x00000400L;
851 enum SQL_CT_COMMIT_DELETE = 0x00000004L;
852 enum SQL_CT_COMMIT_PRESERVE = 0x00000002L;
853 enum SQL_CT_CONSTRAINT_DEFERRABLE = 0x00000080L;
854 enum SQL_CT_CONSTRAINT_INITIALLY_DEFERRED = 0x00000020L;
855 enum SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE = 0x00000040L;
856 enum SQL_CT_CONSTRAINT_NAME_DEFINITION = 0x00002000L;
857 enum SQL_CT_CONSTRAINT_NON_DEFERRABLE = 0x00000100L;
858 enum SQL_CT_CREATE_TABLE = 0x00000001L;
859 enum SQL_CT_GLOBAL_TEMPORARY = 0x00000008L;
860 enum SQL_CT_LOCAL_TEMPORARY = 0x00000010L;
861 enum SQL_CT_TABLE_CONSTRAINT = 0x00001000L;
862 
863 enum SQL_CTR_CREATE_TRANSLATION = 0x00000001L;
864 
865 enum SQL_CU_DML_STATEMENTS = SQL_QU_DML_STATEMENTS;
866 enum SQL_CU_INDEX_DEFINITION = SQL_QU_INDEX_DEFINITION;
867 enum SQL_CU_PRIVILEGE_DEFINITION = SQL_QU_PRIVILEGE_DEFINITION;
868 enum SQL_CU_PROCEDURE_INVOCATION = SQL_QU_PROCEDURE_INVOCATION;
869 enum SQL_CU_TABLE_DEFINITION = SQL_QU_TABLE_DEFINITION;
870 
871 enum SQL_CVT_INTERVAL_YEAR_MONTH = 0x00080000L;
872 enum SQL_CVT_INTERVAL_DAY_TIME   = 0x00100000L;
873 enum SQL_CVT_WCHAR               = 0x00200000L;
874 enum SQL_CVT_WLONGVARCHAR        = 0x00400000L;
875 enum SQL_CVT_WVARCHAR            = 0x00800000L;
876 enum SQL_CVT_GUID                = 0x01000000L;
877 
878 enum SQL_DA_DROP_ASSERTION = 0x00000001L;
879 enum SQL_DATETIME_LITERALS = 119;
880 
881 enum SQL_DB_DISCONNECT     = 1UL;
882 enum SQL_DB_RETURN_TO_POOL = 0UL;
883 enum SQL_DB_DEFAULT        = SQL_DB_RETURN_TO_POOL;
884 
885 enum SQL_DC_DROP_COLLATION = 0x00000001L;
886 enum SQL_DCS_DROP_CHARACTER_SET = 0x00000001L;
887 enum SQL_DD_CASCADE = 0x00000004L;
888 enum SQL_DD_DROP_DOMAIN = 0x00000001L;
889 enum SQL_DD_RESTRICT = 0x00000002L;
890 enum SQL_DDL_INDEX = 170;
891 enum SQL_DELETE_BY_BOOKMARK = 6;
892 enum SQL_DESC_ARRAY_SIZE = 20;
893 enum SQL_DESC_ARRAY_STATUS_PTR = 21;
894 enum SQL_DESC_AUTO_UNIQUE_VALUE = SQL_COLUMN_AUTO_INCREMENT;
895 enum SQL_DESC_BASE_COLUMN_NAME = 22;
896 enum SQL_DESC_BASE_TABLE_NAME = 23;
897 enum SQL_DESC_BIND_OFFSET_PTR = 24;
898 enum SQL_DESC_BIND_TYPE = 25;
899 enum SQL_DESC_CASE_SENSITIVE = SQL_COLUMN_CASE_SENSITIVE;
900 enum SQL_DESC_CATALOG_NAME = SQL_COLUMN_QUALIFIER_NAME;
901 enum SQL_DESC_CONCISE_TYPE = SQL_COLUMN_TYPE;
902 enum SQL_DESC_DATETIME_INTERVAL_PRECISION = 26;
903 enum SQL_DESC_DISPLAY_SIZE = SQL_COLUMN_DISPLAY_SIZE;
904 enum SQL_DESC_FIXED_PREC_SCALE = SQL_COLUMN_MONEY;
905 enum SQL_DESC_LABEL = SQL_COLUMN_LABEL;
906 enum SQL_DESC_LITERAL_PREFIX = 27;
907 enum SQL_DESC_LITERAL_SUFFIX = 28;
908 enum SQL_DESC_LOCAL_TYPE_NAME = 29;
909 enum SQL_DESC_MAXIMUM_SCALE = 30;
910 enum SQL_DESC_MINIMUM_SCALE = 31;
911 enum SQL_DESC_NUM_PREC_RADIX = 32;
912 enum SQL_DESC_PARAMETER_TYPE = 33;
913 enum SQL_DESC_ROWS_PROCESSED_PTR = 34;
914 enum SQL_DESC_SCHEMA_NAME = SQL_COLUMN_OWNER_NAME;
915 enum SQL_DESC_SEARCHABLE = SQL_COLUMN_SEARCHABLE;
916 enum SQL_DESC_TABLE_NAME = SQL_COLUMN_TABLE_NAME;
917 enum SQL_DESC_TYPE_NAME = SQL_COLUMN_TYPE_NAME;
918 enum SQL_DESC_UNSIGNED = SQL_COLUMN_UNSIGNED;
919 enum SQL_DESC_UPDATABLE = SQL_COLUMN_UPDATABLE;
920 enum SQL_DI_CREATE_INDEX = 0x00000001L;
921 enum SQL_DI_DROP_INDEX = 0x00000002L;
922 
923 enum SQL_DIAG_COLUMN_NUMBER = -1247;
924 enum SQL_DIAG_ROW_NUMBER = -1248;
925 enum SQL_DIAG_CURSOR_ROW_COUNT = -1249;
926 
927 enum SQL_DL_SQL92_DATE = 0x00000001L;
928 enum SQL_DL_SQL92_INTERVAL_DAY = 0x00000020L;
929 enum SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR = 0x00000400L;
930 enum SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE = 0x00000800L;
931 enum SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND = 0x00001000L;
932 enum SQL_DL_SQL92_INTERVAL_HOUR = 0x00000040L;
933 enum SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE = 0x00002000L;
934 enum SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND = 0x00004000L;
935 enum SQL_DL_SQL92_INTERVAL_MINUTE = 0x00000080L;
936 enum SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND = 0x00008000L;
937 enum SQL_DL_SQL92_INTERVAL_MONTH = 0x00000010L;
938 enum SQL_DL_SQL92_INTERVAL_SECOND = 0x00000100L;
939 enum SQL_DL_SQL92_INTERVAL_YEAR = 0x00000008L;
940 enum SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH = 0x00000200L;
941 enum SQL_DL_SQL92_TIME = 0x00000002L;
942 enum SQL_DL_SQL92_TIMESTAMP = 0x00000004L;
943 enum SQL_DM_VER = 171;
944 enum SQL_DRIVER_HDESC = 135;
945 enum SQL_DROP_ASSERTION = 136;
946 enum SQL_DROP_CHARACTER_SET = 137;
947 enum SQL_DROP_COLLATION = 138;
948 enum SQL_DROP_DOMAIN = 139;
949 enum SQL_DROP_SCHEMA = 140;
950 enum SQL_DROP_TABLE = 141;
951 enum SQL_DROP_TRANSLATION = 142;
952 enum SQL_DROP_VIEW = 143;
953 enum SQL_DS_CASCADE = 0x00000004L;
954 enum SQL_DS_DROP_SCHEMA = 0x00000001L;
955 enum SQL_DS_RESTRICT = 0x00000002L;
956 enum SQL_DT_CASCADE = 0x00000004L;
957 enum SQL_DT_DROP_TABLE = 0x00000001L;
958 enum SQL_DT_RESTRICT = 0x00000002L;
959 enum SQL_DTC_DONE = 0L;
960 enum SQL_DTR_DROP_TRANSLATION = 0x00000001L;
961 enum SQL_DV_CASCADE = 0x00000004L;
962 enum SQL_DV_DROP_VIEW = 0x00000001L;
963 enum SQL_DV_RESTRICT = 0x00000002L;
964 enum SQL_DYNAMIC_CURSOR_ATTRIBUTES1 = 144;
965 enum SQL_DYNAMIC_CURSOR_ATTRIBUTES2 = 145;
966 enum SQL_EXT_API_LAST = SQL_API_SQLBINDPARAMETER;
967 enum SQL_EXT_API_START = 40;
968 enum SQL_FETCH_BY_BOOKMARK = 7;
969 enum SQL_FETCH_FIRST_SYSTEM = 32;
970 enum SQL_FETCH_FIRST_USER = 31;
971 enum SQL_FN_CVT_CAST = 0x00000002L;
972 enum SQL_FN_STR_BIT_LENGTH = 0x00080000L;
973 enum SQL_FN_STR_CHAR_LENGTH = 0x00100000L;
974 enum SQL_FN_STR_CHARACTER_LENGTH = 0x00200000L;
975 enum SQL_FN_STR_OCTET_LENGTH = 0x00400000L;
976 enum SQL_FN_STR_POSITION = 0x00800000L;
977 enum SQL_FN_TD_CURRENT_DATE = 0x00020000L;
978 enum SQL_FN_TD_CURRENT_TIME = 0x00040000L;
979 enum SQL_FN_TD_CURRENT_TIMESTAMP = 0x00080000L;
980 enum SQL_FN_TD_EXTRACT = 0x00100000L;
981 enum SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 = 146;
982 enum SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 = 147;
983     /* #define SQL_FUNC_EXISTS(exists, api)
984        ((*(((UWORD*) (exists)) + ((api) >> 4)) & (1 << ((api) & 15)) ) ?
985        SQL_TRUE : SQL_FALSE )
986     */
987 enum SQL_GB_COLLATE = 0x0004;
988 enum SQL_HANDLE_SENV = 5;
989 
990 enum SQL_IK_NONE = 0;
991 enum SQL_IK_ASC = 1;
992 enum SQL_IK_DESC = 2;
993 enum SQL_IK_ALL = SQL_IK_ASC | SQL_IK_DESC;
994 
995 enum SQL_INDEX_KEYWORDS = 148;
996 enum SQL_INFO_DRIVER_START = 1000;
997 enum SQL_INFO_LAST = SQL_QUALIFIER_LOCATION;
998 enum SQL_INFO_SCHEMA_VIEWS = 149;
999 enum SQL_INITIALLY_DEFERRED = 5;
1000 enum SQL_INITIALLY_IMMEDIATE = 6;
1001 enum SQL_INSERT_STATEMENT = 172;
1002 enum SQL_INTERVAL = 10;
1003 enum SQL_IS_INSERT_LITERALS = 0x00000001L;
1004 enum SQL_IS_INSERT_SEARCHED = 0x00000002L;
1005 enum SQL_IS_INTEGER = -6;
1006 enum SQL_IS_POINTER = -4;
1007 enum SQL_IS_SELECT_INTO = 0x00000004L;
1008 enum SQL_IS_SMALLINT = -8;
1009 enum SQL_IS_UINTEGER = -5;
1010 enum SQL_IS_USMALLINT = -7;
1011 enum SQL_ISV_ASSERTIONS = 0x00000001L;
1012 enum SQL_ISV_CHARACTER_SETS = 0x00000002L;
1013 enum SQL_ISV_CHECK_CONSTRAINTS = 0x00000004L;
1014 enum SQL_ISV_COLLATIONS = 0x00000008L;
1015 enum SQL_ISV_COLUMN_DOMAIN_USAGE = 0x00000010L;
1016 enum SQL_ISV_COLUMN_PRIVILEGES = 0x00000020L;
1017 enum SQL_ISV_COLUMNS = 0x00000040L;
1018 enum SQL_ISV_CONSTRAINT_COLUMN_USAGE = 0x00000080L;
1019 enum SQL_ISV_CONSTRAINT_TABLE_USAGE = 0x00000100L;
1020 enum SQL_ISV_DOMAIN_CONSTRAINTS = 0x00000200L;
1021 enum SQL_ISV_DOMAINS = 0x00000400L;
1022 enum SQL_ISV_KEY_COLUMN_USAGE = 0x00000800L;
1023 enum SQL_ISV_REFERENTIAL_CONSTRAINTS = 0x00001000L;
1024 enum SQL_ISV_SCHEMATA = 0x00002000L;
1025 enum SQL_ISV_SQL_LANGUAGES = 0x00004000L;
1026 enum SQL_ISV_TABLE_CONSTRAINTS = 0x00008000L;
1027 enum SQL_ISV_TABLE_PRIVILEGES = 0x00010000L;
1028 enum SQL_ISV_TABLES = 0x00020000L;
1029 enum SQL_ISV_TRANSLATIONS = 0x00040000L;
1030 enum SQL_ISV_USAGE_PRIVILEGES = 0x00080000L;
1031 enum SQL_ISV_VIEW_COLUMN_USAGE = 0x00100000L;
1032 enum SQL_ISV_VIEW_TABLE_USAGE = 0x00200000L;
1033 enum SQL_ISV_VIEWS = 0x00400000L;
1034 enum SQL_KEYSET_CURSOR_ATTRIBUTES1 = 150;
1035 enum SQL_KEYSET_CURSOR_ATTRIBUTES2 = 151;
1036 enum SQL_MAX_ASYNC_CONCURRENT_STATEMENTS = 10022;
1037 enum SQL_NO_COLUMN_NUMBER = -1;
1038 enum SQL_NO_ROW_NUMBER = -1;
1039 enum SQL_NOT_DEFERRABLE = 7;
1040 enum SQL_NUM_EXTENSIONS = SQL_EXT_API_LAST-SQL_EXT_API_START+1;
1041 enum SQL_NUM_FUNCTIONS = 23;
1042 enum SQL_ODBC_INTERFACE_CONFORMANCE = 152;
1043 
1044     enum : ULONG {
1045         SQL_OIC_CORE = 1,
1046         SQL_OIC_LEVEL1,
1047         SQL_OIC_LEVEL2
1048     }
1049     enum : ULONG {
1050         SQL_OV_ODBC2 = 2,
1051         SQL_OV_ODBC3 = 3
1052     }
1053 
1054 enum ULONG
1055         SQL_PARAM_BIND_BY_COLUMN = 0,
1056         SQL_PARAM_BIND_TYPE_DEFAULT = SQL_PARAM_BIND_BY_COLUMN;
1057 
1058 enum SQL_PARAM_ARRAY_ROW_COUNTS = 153;
1059 enum SQL_PARAM_ARRAY_SELECTS = 154;
1060 enum SQL_PARAM_DIAG_UNAVAILABLE = 1;
1061 enum SQL_PARAM_ERROR = 5;
1062 enum SQL_PARAM_IGNORE = 1;
1063 enum SQL_PARAM_PROCEED = 0;
1064 enum SQL_PARAM_SUCCESS = 0;
1065 enum SQL_PARAM_SUCCESS_WITH_INFO = 6;
1066 enum SQL_PARAM_UNUSED = 7;
1067 
1068 enum SQL_PARC_BATCH = 1;
1069 enum SQL_PARC_NO_BATCH = 2;
1070 enum SQL_PAS_BATCH = 1;
1071 enum SQL_PAS_NO_BATCH = 2;
1072 enum SQL_PAS_NO_SELECT = 3;
1073 
1074 enum SQL_ROW_IGNORE = 1;
1075 enum SQL_ROW_NUMBER_UNKNOWN = -2;
1076 enum SQL_ROW_PROCEED = 0;
1077 enum SQL_ROW_SUCCESS_WITH_INFO = 6;
1078 
1079 enum SQL_SC_FIPS127_2_TRANSITIONAL = 0x00000002L;
1080 enum SQL_SC_SQL92_ENTRY = 0x00000001L;
1081 enum SQL_SC_SQL92_FULL = 0x00000008L;
1082 enum SQL_SC_SQL92_INTERMEDIATE = 0x00000004L;
1083 
1084 enum SQL_SCC_ISO92_CLI = 0x00000002L;
1085 enum SQL_SCC_XOPEN_CLI_VERSION1 = 0x00000001L;
1086 
1087 enum SQL_SCHEMA_TERM = SQL_OWNER_TERM;
1088 enum SQL_SCHEMA_USAGE = SQL_OWNER_USAGE;
1089 enum SQL_SDF_CURRENT_DATE = 0x00000001L;
1090 enum SQL_SDF_CURRENT_TIME = 0x00000002L;
1091 enum SQL_SDF_CURRENT_TIMESTAMP = 0x00000004L;
1092 enum SQL_SFKD_CASCADE = 0x00000001L;
1093 enum SQL_SFKD_NO_ACTION = 0x00000002L;
1094 enum SQL_SFKD_SET_DEFAULT = 0x00000004L;
1095 enum SQL_SFKD_SET_NULL = 0x00000008L;
1096 enum SQL_SFKU_CASCADE = 0x00000001L;
1097 enum SQL_SFKU_NO_ACTION = 0x00000002L;
1098 enum SQL_SFKU_SET_DEFAULT = 0x00000004L;
1099 enum SQL_SFKU_SET_NULL = 0x00000008L;
1100 enum SQL_SG_DELETE_TABLE = 0x00000020L;
1101 enum SQL_SG_INSERT_COLUMN = 0x00000080L;
1102 enum SQL_SG_INSERT_TABLE = 0x00000040L;
1103 enum SQL_SG_REFERENCES_COLUMN = 0x00000200L;
1104 enum SQL_SG_REFERENCES_TABLE = 0x00000100L;
1105 enum SQL_SG_SELECT_TABLE = 0x00000400L;
1106 enum SQL_SG_UPDATE_COLUMN = 0x00001000L;
1107 enum SQL_SG_UPDATE_TABLE = 0x00000800L;
1108 enum SQL_SG_USAGE_ON_CHARACTER_SET = 0x00000002L;
1109 enum SQL_SG_USAGE_ON_COLLATION = 0x00000004L;
1110 enum SQL_SG_USAGE_ON_DOMAIN = 0x00000001L;
1111 enum SQL_SG_USAGE_ON_TRANSLATION = 0x00000008L;
1112 enum SQL_SG_WITH_GRANT_OPTION = 0x00000010L;
1113 enum SQL_SNVF_BIT_LENGTH = 0x00000001L;
1114 enum SQL_SNVF_CHAR_LENGTH = 0x00000002L;
1115 enum SQL_SNVF_CHARACTER_LENGTH = 0x00000004L;
1116 enum SQL_SNVF_EXTRACT = 0x00000008L;
1117 enum SQL_SNVF_OCTET_LENGTH = 0x00000010L;
1118 enum SQL_SNVF_POSITION = 0x00000020L;
1119 enum SQL_SP_BETWEEN = 0x00000800L;
1120 enum SQL_SP_COMPARISON = 0x00001000L;
1121 enum SQL_SP_EXISTS = 0x00000001L;
1122 enum SQL_SP_IN = 0x00000400L;
1123 enum SQL_SP_ISNOTNULL = 0x00000002L;
1124 enum SQL_SP_ISNULL = 0x00000004L;
1125 enum SQL_SP_LIKE = 0x00000200L;
1126 enum SQL_SP_MATCH_FULL = 0x00000008L;
1127 enum SQL_SP_MATCH_PARTIAL = 0x00000010L;
1128 enum SQL_SP_MATCH_UNIQUE_FULL = 0x00000020L;
1129 enum SQL_SP_MATCH_UNIQUE_PARTIAL = 0x00000040L;
1130 enum SQL_SP_OVERLAPS = 0x00000080L;
1131 enum SQL_SP_QUANTIFIED_COMPARISON = 0x00002000L;
1132 enum SQL_SP_UNIQUE = 0x00000100L;
1133 enum SQL_SQL_CONFORMANCE = 118;
1134 enum SQL_SQL92_DATETIME_FUNCTIONS = 155;
1135 enum SQL_SQL92_FOREIGN_KEY_DELETE_RULE = 156;
1136 enum SQL_SQL92_FOREIGN_KEY_UPDATE_RULE = 157;
1137 enum SQL_SQL92_GRANT = 158;
1138 enum SQL_SQL92_NUMERIC_VALUE_FUNCTIONS = 159;
1139 enum SQL_SQL92_PREDICATES = 160;
1140 enum SQL_SQL92_RELATIONAL_JOIN_OPERATORS = 161;
1141 enum SQL_SQL92_REVOKE = 162;
1142 enum SQL_SQL92_ROW_VALUE_CONSTRUCTOR = 163;
1143 enum SQL_SQL92_STRING_FUNCTIONS = 164;
1144 enum SQL_SQL92_VALUE_EXPRESSIONS = 165;
1145 enum SQL_SR_CASCADE = 0x00000020L;
1146 enum SQL_SR_DELETE_TABLE = 0x00000080L;
1147 enum SQL_SR_GRANT_OPTION_FOR = 0x00000010L;
1148 enum SQL_SR_INSERT_COLUMN = 0x00000200L;
1149 enum SQL_SR_INSERT_TABLE = 0x00000100L;
1150 enum SQL_SR_REFERENCES_COLUMN = 0x00000800L;
1151 enum SQL_SR_REFERENCES_TABLE = 0x00000400L;
1152 enum SQL_SR_RESTRICT = 0x00000040L;
1153 enum SQL_SR_SELECT_TABLE = 0x00001000L;
1154 enum SQL_SR_UPDATE_COLUMN = 0x00004000L;
1155 enum SQL_SR_UPDATE_TABLE = 0x00002000L;
1156 enum SQL_SR_USAGE_ON_CHARACTER_SET = 0x00000002L;
1157 enum SQL_SR_USAGE_ON_COLLATION = 0x00000004L;
1158 enum SQL_SR_USAGE_ON_DOMAIN = 0x00000001L;
1159 enum SQL_SR_USAGE_ON_TRANSLATION = 0x00000008L;
1160 enum SQL_SRJO_CORRESPONDING_CLAUSE = 0x00000001L;
1161 enum SQL_SRJO_CROSS_JOIN = 0x00000002L;
1162 enum SQL_SRJO_EXCEPT_JOIN = 0x00000004L;
1163 enum SQL_SRJO_FULL_OUTER_JOIN = 0x00000008L;
1164 enum SQL_SRJO_INNER_JOIN = 0x00000010L;
1165 enum SQL_SRJO_INTERSECT_JOIN = 0x00000020L;
1166 enum SQL_SRJO_LEFT_OUTER_JOIN = 0x00000040L;
1167 enum SQL_SRJO_NATURAL_JOIN = 0x00000080L;
1168 enum SQL_SRJO_RIGHT_OUTER_JOIN = 0x00000100L;
1169 enum SQL_SRJO_UNION_JOIN = 0x00000200L;
1170 enum SQL_SRVC_DEFAULT = 0x00000004L;
1171 enum SQL_SRVC_NULL = 0x00000002L;
1172 enum SQL_SRVC_ROW_SUBQUERY = 0x00000008L;
1173 enum SQL_SRVC_VALUE_EXPRESSION = 0x00000001L;
1174 enum SQL_SSF_CONVERT = 0x00000001L;
1175 enum SQL_SSF_LOWER = 0x00000002L;
1176 enum SQL_SSF_SUBSTRING = 0x00000008L;
1177 enum SQL_SSF_TRANSLATE = 0x00000010L;
1178 enum SQL_SSF_TRIM_BOTH = 0x00000020L;
1179 enum SQL_SSF_TRIM_LEADING = 0x00000040L;
1180 enum SQL_SSF_TRIM_TRAILING = 0x00000080L;
1181 enum SQL_SSF_UPPER = 0x00000004L;
1182 enum SQL_STANDARD_CLI_CONFORMANCE = 166;
1183 enum SQL_STATIC_CURSOR_ATTRIBUTES1 = 167;
1184 enum SQL_STATIC_CURSOR_ATTRIBUTES2 = 168;
1185 enum SQL_SU_DML_STATEMENTS = SQL_OU_DML_STATEMENTS;
1186 enum SQL_SU_INDEX_DEFINITION = SQL_OU_INDEX_DEFINITION;
1187 enum SQL_SU_PRIVILEGE_DEFINITION = SQL_OU_PRIVILEGE_DEFINITION;
1188 enum SQL_SU_PROCEDURE_INVOCATION = SQL_OU_PROCEDURE_INVOCATION;
1189 enum SQL_SU_TABLE_DEFINITION = SQL_OU_TABLE_DEFINITION;
1190 enum SQL_SVE_CASE = 0x00000001L;
1191 enum SQL_SVE_CAST = 0x00000002L;
1192 enum SQL_SVE_COALESCE = 0x00000004L;
1193 enum SQL_SVE_NULLIF = 0x00000008L;
1194 enum SQL_UB_FIXED = SQL_UB_ON;
1195 enum SQL_UB_VARIABLE = 2UL;
1196 enum SQL_UNION_STATEMENT = SQL_UNION;
1197 enum SQL_UPDATE_BY_BOOKMARK = 5;
1198 enum SQL_US_UNION = SQL_U_UNION;
1199 enum SQL_US_UNION_ALL = SQL_U_UNION_ALL;
1200 }//[Yes] #endif /* ODBCVER >= 0x300 */
1201 static if (ODBCVER >= 0x0350) {
1202 enum SQL_DESC_ROWVER = 35;
1203 enum SQL_GUID = -11;
1204 enum SQL_C_GUID = SQL_GUID;
1205     //#ifdef ODBC_STD
1206     //#define SQLAllocHandle SQLAllocHandleStd
1207     //#define SQLAllocEnv(p) SQLAllocHandleStd(SQL_HANDLE_ENV, SQL_NULL_HANDLE, p)
1208     //#define SQL_YEAR SQL_CODE_YEAR
1209     //#define SQL_MONTH SQL_CODE_MONTH
1210     //#define SQL_DAY SQL_CODE_DAY
1211     //#define SQL_HOUR SQL_CODE_HOUR
1212     //#define SQL_MINUTE SQL_CODE_MINUTE
1213     //#define SQL_SECOND SQL_CODE_SECOND
1214     //#define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MONTH
1215     //#define SQL_DAY_TO_HOUR SQL_CODE_DAY_TO_HOUR
1216     //#define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINUTE
1217     //#define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECOND
1218     //#define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MINUTE
1219     //#define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SECOND
1220     //#define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND
1221     //#endif /* ODBC_STD */
1222 }//#endif /* ODBCVER >= 0x0350 */
1223 
1224 //static if (ODBCVER >= 0x0351) {
1225 enum SQL_ATTR_ANSI_APP=115;
1226 enum SQL_AA_TRUE=1L;
1227 enum SQL_AA_FALSE=0L;
1228 //}//[Yes] #endif
1229 
1230 enum TRACE_VERSION=1000;
1231 enum TRACE_ON=1;
1232 
1233 const char [] SQL_ODBC_KEYWORDS =
1234     "ABSOLUTE, ACTION, ADA, ADD, ALL, ALLOCATE, ALTER, AND, ANY, ARE, AS, "
1235     ~ "ASC, ASSERTION, AT, AUTHORIZATION, AVG, "
1236     ~ "BEGIN, BETWEEN, BIT, BIT_LENGTH, BOTH, BY, CASCADE, CASCADED, CASE, CAST, CATALOG, "
1237     ~ "CHAR, CHAR_LENGTH, CHARACTER, CHARACTER_LENGTH, CHECK, CLOSE, COALESCE, "
1238     ~ "COLLATE, COLLATION, COLUMN, COMMIT, CONNECT, CONNECTION, CONSTRAINT, "
1239     ~ "CONSTRAINTS, CONTINUE, CONVERT, CORRESPONDING, COUNT, CREATE, CROSS, CURRENT, "
1240     ~ "CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CURSOR, "
1241     ~ "DATE, DAY, DEALLOCATE, DEC, DECIMAL, DECLARE, DEFAULT, DEFERRABLE, "
1242     ~ "DEFERRED, DELETE, DESC, DESCRIBE, DESCRIPTOR, DIAGNOSTICS, DISCONNECT, "
1243     ~ "DISTINCT, DOMAIN, DOUBLE, DROP, "
1244     ~ "ELSE, END, END-EXEC, ESCAPE, EXCEPT, EXCEPTION, EXEC, EXECUTE, "
1245     ~ "EXISTS, EXTERNAL, EXTRACT, "
1246     ~ "FALSE, FETCH, FIRST, FLOAT, FOR, FOREIGN, FORTRAN, FOUND, FROM, FULL, "
1247     ~ "GET, GLOBAL, GO, GOTO, GRANT, GROUP, HAVING, HOUR, "
1248     ~ "IDENTITY, IMMEDIATE, IN, INCLUDE, INDEX, INDICATOR, INITIALLY, INNER, "
1249     ~ "INPUT, INSENSITIVE, INSERT, INT, INTEGER, INTERSECT, INTERVAL, INTO, IS, ISOLATION, "
1250     ~ "JOIN, KEY, LANGUAGE, LAST, LEADING, LEFT, LEVEL, LIKE, LOCAL, LOWER, "
1251     ~ "MATCH, MAX, MIN, MINUTE, MODULE, MONTH, "
1252     ~ "NAMES, NATIONAL, NATURAL, NCHAR, NEXT, NO, NONE, NOT, NULL, NULLIF, NUMERIC, "
1253     ~ "OCTET_LENGTH, OF, ON, ONLY, OPEN, OPTION, OR, ORDER, OUTER, OUTPUT, OVERLAPS, "
1254     ~ "PAD, PARTIAL, PASCAL, PLI, POSITION, PRECISION, PREPARE, PRESERVE, "
1255     ~ "PRIMARY, PRIOR, PRIVILEGES, PROCEDURE, PUBLIC, "
1256     ~ "READ, REAL, REFERENCES, RELATIVE, RESTRICT, REVOKE, RIGHT, ROLLBACK, ROWS"
1257     ~ "SCHEMA, SCROLL, SECOND, SECTION, SELECT, SESSION, SESSION_USER, SET, SIZE, "
1258     ~ "SMALLINT, SOME, SPACE, SQL, SQLCA, SQLCODE, SQLERROR, SQLSTATE, SQLWARNING, "
1259     ~ "SUBSTRING, SUM, SYSTEM_USER, "
1260     ~ "TABLE, TEMPORARY, THEN, TIME, TIMESTAMP, TIMEZONE_HOUR, TIMEZONE_MINUTE, "
1261     ~ "TO, TRAILING, TRANSACTION, TRANSLATE, TRANSLATION, TRIM, TRUE, "
1262     ~ "UNION, UNIQUE, UNKNOWN, UPDATE, UPPER, USAGE, USER, USING, "
1263     ~ "VALUE, VALUES, VARCHAR, VARYING, VIEW, WHEN, WHENEVER, WHERE, WITH, WORK, WRITE, "
1264     ~ "YEAR, ZONE";
1265 extern (Windows) {
1266     SQLRETURN SQLDriverConnect(SQLHDBC, SQLHWND, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLSMALLINT*, SQLUSMALLINT);
1267     SQLRETURN SQLBrowseConnect(SQLHDBC, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLSMALLINT*);
1268     SQLRETURN SQLColumnPrivileges(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
1269     SQLRETURN SQLColAttributes(SQLHSTMT, SQLUSMALLINT, SQLUSMALLINT, SQLPOINTER, SQLSMALLINT, SQLSMALLINT*, SQLLEN*);
1270     SQLRETURN SQLDescribeParam(SQLHSTMT, SQLUSMALLINT, SQLSMALLINT*, SQLULEN*, SQLSMALLINT*, SQLSMALLINT*);
1271     SQLRETURN SQLExtendedFetch(SQLHSTMT, SQLUSMALLINT, SQLINTEGER, SQLUINTEGER*, SQLUSMALLINT*);
1272     SQLRETURN SQLForeignKeys(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
1273     SQLRETURN SQLMoreResults(SQLHSTMT);
1274     SQLRETURN SQLNativeSql(SQLHDBC, SQLCHAR*, SQLINTEGER, SQLCHAR*, SQLINTEGER, SQLINTEGER*);
1275     SQLRETURN SQLNumParams(SQLHSTMT, SQLSMALLINT*);
1276     SQLRETURN SQLParamOptions(SQLHSTMT, SQLUINTEGER, SQLUINTEGER*);
1277     SQLRETURN SQLPrimaryKeys(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
1278     SQLRETURN SQLProcedureColumns(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
1279     SQLRETURN SQLProcedures(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
1280     SQLRETURN SQLSetPos(SQLHSTMT, SQLUSMALLINT, SQLUSMALLINT, SQLUSMALLINT);
1281     SQLRETURN SQLTablePrivileges(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
1282     SQLRETURN SQLDrivers(SQLHENV, SQLUSMALLINT, SQLCHAR*, SQLSMALLINT, SQLSMALLINT*, SQLCHAR*, SQLSMALLINT, SQLSMALLINT*);
1283     SQLRETURN SQLBindParameter(SQLHSTMT, SQLUSMALLINT, SQLSMALLINT, SQLSMALLINT, SQLSMALLINT, SQLULEN, SQLSMALLINT, SQLPOINTER, SQLLEN, SQLLEN*);
1284     SQLRETURN SQLSetScrollOptions(SQLHSTMT, SQLUSMALLINT, SQLLEN, SQLUSMALLINT);/* deprecated */
1285     DWORD ODBCGetTryWaitValue();
1286     BOOL ODBCSetTryWaitValue(DWORD);
1287     RETCODE TraceOpenLogFile(LPWSTR, LPWSTR, DWORD);
1288     RETCODE TraceCloseLogFile();
1289     VOID TraceReturn(RETCODE, RETCODE);
1290     DWORD TraceVersion();
1291     //static if (ODBCVER >= 0x0300) {
1292     SQLRETURN SQLBulkOperations(SQLHSTMT, SQLSMALLINT);
1293     SQLRETURN SQLAllocHandleStd( SQLSMALLINT, SQLHANDLE, SQLHANDLE*);
1294     //}
1295 }