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