VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/sqlext.h@ 33252

Last change on this file since 33252 was 16477, checked in by vboxsync, 16 years ago

LGPL disclaimer by filemuncher

  • Property svn:eol-style set to native
File size: 59.2 KB
Line 
1/*
2 * MS SQL Extension definitions
3 *
4 * Copyright (C) 1999 Xiang Li
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21/*
22 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
24 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
25 * a choice of LGPL license versions is made available with the language indicating
26 * that LGPLv2 or any later version may be used, or where a choice of which version
27 * of the LGPL is applied is otherwise unspecified.
28 */
29
30#ifndef __SQLEXT_H
31#define __SQLEXT_H
32
33#include <sql.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39#define SQL_SPEC_MAJOR 3
40#define SQL_SPEC_MINOR 51
41#define SQL_SPEC_STRING "03.51"
42
43#define SQL_SQLSTATE_SIZE 5
44#define SQL_MAX_DSN_LENGTH 32
45
46#define SQL_MAX_OPTION_STRING_LENGTH 256
47
48#if (ODBCVER < 0x0300)
49#define SQL_NO_DATA_FOUND 100
50#else
51#define SQL_NO_DATA_FOUND SQL_NO_DATA
52#endif
53
54#if (ODBCVER >= 0x0300)
55#define SQL_HANDLE_SENV 5
56#endif
57
58#if (ODBCVER >= 0x0300)
59#define SQL_ATTR_ODBC_VERSION 200
60#define SQL_ATTR_CONNECTION_POOLING 201
61#define SQL_ATTR_CP_MATCH 202
62#endif
63
64#if (ODBCVER >= 0x0300)
65#define SQL_CP_OFF 0UL
66#define SQL_CP_ONE_PER_DRIVER 1UL
67#define SQL_CP_ONE_PER_HENV 2UL
68#define SQL_CP_DEFAULT SQL_CP_OFF
69
70#define SQL_CP_STRICT_MATCH 0UL
71#define SQL_CP_RELAXED_MATCH 1UL
72#define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH
73
74#define SQL_OV_ODBC2 2UL
75#define SQL_OV_ODBC3 3UL
76#endif
77
78#define SQL_ACCESS_MODE 101
79#define SQL_AUTOCOMMIT 102
80#define SQL_LOGIN_TIMEOUT 103
81#define SQL_OPT_TRACE 104
82#define SQL_OPT_TRACEFILE 105
83#define SQL_TRANSLATE_DLL 106
84#define SQL_TRANSLATE_OPTION 107
85#define SQL_TXN_ISOLATION 108
86#define SQL_CURRENT_QUALIFIER 109
87#define SQL_ODBC_CURSORS 110
88#define SQL_QUIET_MODE 111
89#define SQL_PACKET_SIZE 112
90
91#if (ODBCVER >= 0x0300)
92#define SQL_ATTR_ACCESS_MODE SQL_ACCESS_MODE
93#define SQL_ATTR_AUTOCOMMIT SQL_AUTOCOMMIT
94#define SQL_ATTR_CONNECTION_TIMEOUT 113
95#define SQL_ATTR_CURRENT_CATALOG SQL_CURRENT_QUALIFIER
96#define SQL_ATTR_DISCONNECT_BEHAVIOR 114
97#define SQL_ATTR_ENLIST_IN_DTC 1207
98#define SQL_ATTR_ENLIST_IN_XA 1208
99#define SQL_ATTR_LOGIN_TIMEOUT SQL_LOGIN_TIMEOUT
100#define SQL_ATTR_ODBC_CURSORS SQL_ODBC_CURSORS
101#define SQL_ATTR_PACKET_SIZE SQL_PACKET_SIZE
102#define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE
103#define SQL_ATTR_TRACE SQL_OPT_TRACE
104#define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE
105#define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL
106#define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION
107#define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION
108#endif
109
110#define SQL_ATTR_CONNECTION_DEAD 1209
111
112#if (ODBCVER >= 0x0351)
113#define SQL_ATTR_ANSI_APP 115
114#endif
115
116#if (ODBCVER < 0x0300)
117#define SQL_CONNECT_OPT_DRVR_START 1000
118#endif
119
120#if (ODBCVER < 0x0300)
121#define SQL_CONN_OPT_MAX SQL_PACKET_SIZE
122#define SQL_CONN_OPT_MIN SQL_ACCESS_MODE
123#endif
124
125#define SQL_MODE_READ_WRITE 0UL
126#define SQL_MODE_READ_ONLY 1UL
127#define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE
128
129#define SQL_AUTOCOMMIT_OFF 0UL
130#define SQL_AUTOCOMMIT_ON 1UL
131#define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON
132
133#define SQL_LOGIN_TIMEOUT_DEFAULT 15UL
134
135#define SQL_OPT_TRACE_OFF 0UL
136#define SQL_OPT_TRACE_ON 1UL
137#define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF
138#define SQL_OPT_TRACE_FILE_DEFAULT "\\SQL.LOG"
139
140#define SQL_CUR_USE_IF_NEEDED 0UL
141#define SQL_CUR_USE_ODBC 1UL
142#define SQL_CUR_USE_DRIVER 2UL
143#define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER
144
145#if (ODBCVER >= 0x0300)
146#define SQL_DB_RETURN_TO_POOL 0UL
147#define SQL_DB_DISCONNECT 1UL
148#define SQL_DB_DEFAULT SQL_DB_RETURN_TO_POOL
149
150#define SQL_DTC_DONE 0L
151#endif
152
153#define SQL_CD_TRUE 1L
154#define SQL_CD_FALSE 0L
155
156#if (ODBCVER >= 0x0351)
157#define SQL_AA_TRUE 1L
158#define SQL_AA_FALSE 0L
159#endif
160
161#define SQL_QUERY_TIMEOUT 0
162#define SQL_MAX_ROWS 1
163#define SQL_NOSCAN 2
164#define SQL_MAX_LENGTH 3
165#define SQL_ASYNC_ENABLE 4
166#define SQL_BIND_TYPE 5
167#define SQL_CURSOR_TYPE 6
168#define SQL_CONCURRENCY 7
169#define SQL_KEYSET_SIZE 8
170#define SQL_ROWSET_SIZE 9
171#define SQL_SIMULATE_CURSOR 10
172#define SQL_RETRIEVE_DATA 11
173#define SQL_USE_BOOKMARKS 12
174#define SQL_GET_BOOKMARK 13
175#define SQL_ROW_NUMBER 14
176
177#if (ODBCVER >= 0x0300)
178#define SQL_ATTR_ASYNC_ENABLE 4
179#define SQL_ATTR_CONCURRENCY SQL_CONCURRENCY
180#define SQL_ATTR_CURSOR_TYPE SQL_CURSOR_TYPE
181#define SQL_ATTR_ENABLE_AUTO_IPD 15
182#define SQL_ATTR_FETCH_BOOKMARK_PTR 16
183#define SQL_ATTR_KEYSET_SIZE SQL_KEYSET_SIZE
184#define SQL_ATTR_MAX_LENGTH SQL_MAX_LENGTH
185#define SQL_ATTR_MAX_ROWS SQL_MAX_ROWS
186#define SQL_ATTR_NOSCAN SQL_NOSCAN
187#define SQL_ATTR_PARAM_BIND_OFFSET_PTR 17
188#define SQL_ATTR_PARAM_BIND_TYPE 18
189#define SQL_ATTR_PARAM_OPERATION_PTR 19
190#define SQL_ATTR_PARAM_STATUS_PTR 20
191#define SQL_ATTR_PARAMS_PROCESSED_PTR 21
192#define SQL_ATTR_RETRIEVE_DATA SQL_RETRIEVE_DATA
193#define SQL_ATTR_ROW_BIND_OFFSET_PTR 23
194#define SQL_ATTR_ROW_BIND_TYPE SQL_BIND_TYPE
195#define SQL_ATTR_ROW_NUMBER SQL_ROW_NUMBER
196#define SQL_ATTR_ROW_OPERATION_PTR 24
197#define SQL_ATTR_ROW_STATUS_PTR 25
198#define SQL_ATTR_ROWS_FETCHED_PTR 26
199#define SQL_ATTR_ROW_ARRAY_SIZE 27
200#define SQL_ATTR_SIMULATE_CURSOR SQL_SIMULATE_CURSOR
201#define SQL_ATTR_USE_BOOKMARKS SQL_USE_BOOKMARKS
202
203#endif
204
205#if (ODBCVER < 0x0300)
206#define SQL_STMT_OPT_MAX SQL_ROW_NUMBER
207#define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT
208#endif
209
210#if (ODBCVER >= 0x0300)
211#define SQL_COL_PRED_CHAR SQL_LIKE_ONLY
212#define SQL_COL_PRED_BASIC SQL_ALL_EXCEPT_LIKE
213#endif
214
215#if (ODBCVER >= 0x0300)
216#define SQL_IS_POINTER (-4)
217#define SQL_IS_UINTEGER (-5)
218#define SQL_IS_INTEGER (-6)
219#define SQL_IS_USMALLINT (-7)
220#define SQL_IS_SMALLINT (-8)
221#endif
222
223#if (ODBCVER >= 0x0300)
224#define SQL_PARAM_BIND_BY_COLUMN 0UL
225#define SQL_PARAM_BIND_TYPE_DEFAULT SQL_PARAM_BIND_BY_COLUMN
226#endif
227
228#define SQL_QUERY_TIMEOUT_DEFAULT 0UL
229
230#define SQL_MAX_ROWS_DEFAULT 0UL
231
232#define SQL_NOSCAN_OFF 0UL
233#define SQL_NOSCAN_ON 1UL
234#define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF
235
236#define SQL_MAX_LENGTH_DEFAULT 0UL
237
238#define SQL_ASYNC_ENABLE_OFF 0UL
239#define SQL_ASYNC_ENABLE_ON 1UL
240#define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF
241
242#define SQL_BIND_BY_COLUMN 0UL
243#define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN
244
245#define SQL_CONCUR_READ_ONLY 1
246#define SQL_CONCUR_LOCK 2
247#define SQL_CONCUR_ROWVER 3
248#define SQL_CONCUR_VALUES 4
249#define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY
250
251#define SQL_CURSOR_FORWARD_ONLY 0UL
252#define SQL_CURSOR_KEYSET_DRIVEN 1UL
253#define SQL_CURSOR_DYNAMIC 2UL
254#define SQL_CURSOR_STATIC 3UL
255#define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY
256
257#define SQL_ROWSET_SIZE_DEFAULT 1UL
258
259#define SQL_KEYSET_SIZE_DEFAULT 0UL
260
261#define SQL_SC_NON_UNIQUE 0UL
262#define SQL_SC_TRY_UNIQUE 1UL
263#define SQL_SC_UNIQUE 2UL
264
265#define SQL_RD_OFF 0UL
266#define SQL_RD_ON 1UL
267#define SQL_RD_DEFAULT SQL_RD_ON
268
269#define SQL_UB_OFF 0UL
270#define SQL_UB_ON 01UL
271#define SQL_UB_DEFAULT SQL_UB_OFF
272
273#if (ODBCVER >= 0x0300)
274#define SQL_UB_FIXED SQL_UB_ON
275#define SQL_UB_VARIABLE 2UL
276#endif
277
278#if (ODBCVER >= 0x0300)
279#define SQL_DESC_ARRAY_SIZE 20
280#define SQL_DESC_ARRAY_STATUS_PTR 21
281#define SQL_DESC_AUTO_UNIQUE_VALUE SQL_COLUMN_AUTO_INCREMENT
282#define SQL_DESC_BASE_COLUMN_NAME 22
283#define SQL_DESC_BASE_TABLE_NAME 23
284#define SQL_DESC_BIND_OFFSET_PTR 24
285#define SQL_DESC_BIND_TYPE 25
286#define SQL_DESC_CASE_SENSITIVE SQL_COLUMN_CASE_SENSITIVE
287#define SQL_DESC_CATALOG_NAME SQL_COLUMN_QUALIFIER_NAME
288#define SQL_DESC_CONCISE_TYPE SQL_COLUMN_TYPE
289#define SQL_DESC_DATETIME_INTERVAL_PRECISION 26
290#define SQL_DESC_DISPLAY_SIZE SQL_COLUMN_DISPLAY_SIZE
291#define SQL_DESC_FIXED_PREC_SCALE SQL_COLUMN_MONEY
292#define SQL_DESC_LABEL SQL_COLUMN_LABEL
293#define SQL_DESC_LITERAL_PREFIX 27
294#define SQL_DESC_LITERAL_SUFFIX 28
295#define SQL_DESC_LOCAL_TYPE_NAME 29
296#define SQL_DESC_MAXIMUM_SCALE 30
297#define SQL_DESC_MINIMUM_SCALE 31
298#define SQL_DESC_NUM_PREC_RADIX 32
299#define SQL_DESC_PARAMETER_TYPE 33
300#define SQL_DESC_ROWS_PROCESSED_PTR 34
301#if (ODBCVER >= 0x0350)
302#define SQL_DESC_ROWVER 35
303#endif
304#define SQL_DESC_SCHEMA_NAME SQL_COLUMN_OWNER_NAME
305#define SQL_DESC_SEARCHABLE SQL_COLUMN_SEARCHABLE
306#define SQL_DESC_TYPE_NAME SQL_COLUMN_TYPE_NAME
307#define SQL_DESC_TABLE_NAME SQL_COLUMN_TABLE_NAME
308#define SQL_DESC_UNSIGNED SQL_COLUMN_UNSIGNED
309#define SQL_DESC_UPDATABLE SQL_COLUMN_UPDATABLE
310#endif
311
312#if (ODBCVER >= 0x0300)
313#define SQL_DIAG_CURSOR_ROW_COUNT (-1249)
314#define SQL_DIAG_ROW_NUMBER (-1248)
315#define SQL_DIAG_COLUMN_NUMBER (-1247)
316#endif
317
318#define SQL_DATE 9
319#if (ODBCVER >= 0x0300)
320#define SQL_INTERVAL 10
321#endif
322#define SQL_TIME 10
323#define SQL_TIMESTAMP 11
324#define SQL_LONGVARCHAR (-1)
325#define SQL_BINARY (-2)
326#define SQL_VARBINARY (-3)
327#define SQL_LONGVARBINARY (-4)
328#define SQL_BIGINT (-5)
329#define SQL_TINYINT (-6)
330#define SQL_BIT (-7)
331#if (ODBCVER >= 0x0350)
332#define SQL_GUID (-11)
333#endif
334
335#if (ODBCVER >= 0x0300)
336#define SQL_CODE_YEAR 1
337#define SQL_CODE_MONTH 2
338#define SQL_CODE_DAY 3
339#define SQL_CODE_HOUR 4
340#define SQL_CODE_MINUTE 5
341#define SQL_CODE_SECOND 6
342#define SQL_CODE_YEAR_TO_MONTH 7
343#define SQL_CODE_DAY_TO_HOUR 8
344#define SQL_CODE_DAY_TO_MINUTE 9
345#define SQL_CODE_DAY_TO_SECOND 10
346#define SQL_CODE_HOUR_TO_MINUTE 11
347#define SQL_CODE_HOUR_TO_SECOND 12
348#define SQL_CODE_MINUTE_TO_SECOND 13
349
350#define SQL_INTERVAL_YEAR (100 + SQL_CODE_YEAR)
351#define SQL_INTERVAL_MONTH (100 + SQL_CODE_MONTH)
352#define SQL_INTERVAL_DAY (100 + SQL_CODE_DAY)
353#define SQL_INTERVAL_HOUR (100 + SQL_CODE_HOUR)
354#define SQL_INTERVAL_MINUTE (100 + SQL_CODE_MINUTE)
355#define SQL_INTERVAL_SECOND (100 + SQL_CODE_SECOND)
356#define SQL_INTERVAL_YEAR_TO_MONTH (100 + SQL_CODE_YEAR_TO_MONTH)
357#define SQL_INTERVAL_DAY_TO_HOUR (100 + SQL_CODE_DAY_TO_HOUR)
358#define SQL_INTERVAL_DAY_TO_MINUTE (100 + SQL_CODE_DAY_TO_MINUTE)
359#define SQL_INTERVAL_DAY_TO_SECOND (100 + SQL_CODE_DAY_TO_SECOND)
360#define SQL_INTERVAL_HOUR_TO_MINUTE (100 + SQL_CODE_HOUR_TO_MINUTE)
361#define SQL_INTERVAL_HOUR_TO_SECOND (100 + SQL_CODE_HOUR_TO_SECOND)
362#define SQL_INTERVAL_MINUTE_TO_SECOND (100 + SQL_CODE_MINUTE_TO_SECOND)
363
364#else
365#define SQL_INTERVAL_YEAR (-80)
366#define SQL_INTERVAL_MONTH (-81)
367#define SQL_INTERVAL_YEAR_TO_MONTH (-82)
368#define SQL_INTERVAL_DAY (-83)
369#define SQL_INTERVAL_HOUR (-84)
370#define SQL_INTERVAL_MINUTE (-85)
371#define SQL_INTERVAL_SECOND (-86)
372#define SQL_INTERVAL_DAY_TO_HOUR (-87)
373#define SQL_INTERVAL_DAY_TO_MINUTE (-88)
374#define SQL_INTERVAL_DAY_TO_SECOND (-89)
375#define SQL_INTERVAL_HOUR_TO_MINUTE (-90)
376#define SQL_INTERVAL_HOUR_TO_SECOND (-91)
377#define SQL_INTERVAL_MINUTE_TO_SECOND (-92)
378#endif
379
380
381#if (ODBCVER <= 0x0300)
382#define SQL_UNICODE (-95)
383#define SQL_UNICODE_VARCHAR (-96)
384#define SQL_UNICODE_LONGVARCHAR (-97)
385#define SQL_UNICODE_CHAR SQL_UNICODE
386#else
387
388#define SQL_UNICODE SQL_WCHAR
389#define SQL_UNICODE_VARCHAR SQL_WVARCHAR
390#define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR
391#define SQL_UNICODE_CHAR SQL_WCHAR
392#endif
393
394#if (ODBCVER < 0x0300)
395#define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR
396#define SQL_TYPE_DRIVER_END SQL_UNICODE_LONGVARCHAR
397#endif
398
399#define SQL_C_CHAR SQL_CHAR
400#define SQL_C_LONG SQL_INTEGER
401#define SQL_C_SHORT SQL_SMALLINT
402#define SQL_C_FLOAT SQL_REAL
403#define SQL_C_DOUBLE SQL_DOUBLE
404#if (ODBCVER >= 0x0300)
405#define SQL_C_NUMERIC SQL_NUMERIC
406#endif
407#define SQL_C_DEFAULT 99
408
409#define SQL_SIGNED_OFFSET (-20)
410#define SQL_UNSIGNED_OFFSET (-22)
411
412#define SQL_C_DATE SQL_DATE
413#define SQL_C_TIME SQL_TIME
414#define SQL_C_TIMESTAMP SQL_TIMESTAMP
415#if (ODBCVER >= 0x0300)
416#define SQL_C_TYPE_DATE SQL_TYPE_DATE
417#define SQL_C_TYPE_TIME SQL_TYPE_TIME
418#define SQL_C_TYPE_TIMESTAMP SQL_TYPE_TIMESTAMP
419#define SQL_C_INTERVAL_YEAR SQL_INTERVAL_YEAR
420#define SQL_C_INTERVAL_MONTH SQL_INTERVAL_MONTH
421#define SQL_C_INTERVAL_DAY SQL_INTERVAL_DAY
422#define SQL_C_INTERVAL_HOUR SQL_INTERVAL_HOUR
423#define SQL_C_INTERVAL_MINUTE SQL_INTERVAL_MINUTE
424#define SQL_C_INTERVAL_SECOND SQL_INTERVAL_SECOND
425#define SQL_C_INTERVAL_YEAR_TO_MONTH SQL_INTERVAL_YEAR_TO_MONTH
426#define SQL_C_INTERVAL_DAY_TO_HOUR SQL_INTERVAL_DAY_TO_HOUR
427#define SQL_C_INTERVAL_DAY_TO_MINUTE SQL_INTERVAL_DAY_TO_MINUTE
428#define SQL_C_INTERVAL_DAY_TO_SECOND SQL_INTERVAL_DAY_TO_SECOND
429#define SQL_C_INTERVAL_HOUR_TO_MINUTE SQL_INTERVAL_HOUR_TO_MINUTE
430#define SQL_C_INTERVAL_HOUR_TO_SECOND SQL_INTERVAL_HOUR_TO_SECOND
431#define SQL_C_INTERVAL_MINUTE_TO_SECOND SQL_INTERVAL_MINUTE_TO_SECOND
432#endif
433#define SQL_C_BINARY SQL_BINARY
434#define SQL_C_BIT SQL_BIT
435#if (ODBCVER >= 0x0300)
436#define SQL_C_SBIGINT (SQL_BIGINT+SQL_SIGNED_OFFSET)
437#define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET)
438#endif
439#define SQL_C_TINYINT SQL_TINYINT
440#define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET)
441#define SQL_C_SSHORT (SQL_C_SHORT+SQL_SIGNED_OFFSET)
442#define SQL_C_STINYINT (SQL_TINYINT+SQL_SIGNED_OFFSET)
443#define SQL_C_ULONG (SQL_C_LONG+SQL_UNSIGNED_OFFSET)
444#define SQL_C_USHORT (SQL_C_SHORT+SQL_UNSIGNED_OFFSET)
445#define SQL_C_UTINYINT (SQL_TINYINT+SQL_UNSIGNED_OFFSET)
446#define SQL_C_BOOKMARK SQL_C_ULONG
447
448#if (ODBCVER >= 0x0350)
449#define SQL_C_GUID SQL_GUID
450#endif
451
452#define SQL_TYPE_NULL 0
453#if (ODBCVER < 0x0300)
454#define SQL_TYPE_MIN SQL_BIT
455#define SQL_TYPE_MAX SQL_VARCHAR
456#endif
457
458#if (ODBCVER >= 0x0300)
459#define SQL_C_VARBOOKMARK SQL_C_BINARY
460#endif
461
462#if (ODBCVER >= 0x0300)
463#define SQL_NO_ROW_NUMBER (-1)
464#define SQL_NO_COLUMN_NUMBER (-1)
465#define SQL_ROW_NUMBER_UNKNOWN (-2)
466#define SQL_COLUMN_NUMBER_UNKNOWN (-2)
467#endif
468
469#define SQL_DEFAULT_PARAM (-5)
470#define SQL_IGNORE (-6)
471#if (ODBCVER >= 0x0300)
472#define SQL_COLUMN_IGNORE SQL_IGNORE
473#endif
474#define SQL_LEN_DATA_AT_EXEC_OFFSET (-100)
475#define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET)
476
477#define SQL_LEN_BINARY_ATTR_OFFSET (-100)
478#define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET)
479
480#define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT
481#define SQL_SETPARAM_VALUE_MAX (-1L)
482
483#define SQL_COLUMN_COUNT 0
484#define SQL_COLUMN_NAME 1
485#define SQL_COLUMN_TYPE 2
486#define SQL_COLUMN_LENGTH 3
487#define SQL_COLUMN_PRECISION 4
488#define SQL_COLUMN_SCALE 5
489#define SQL_COLUMN_DISPLAY_SIZE 6
490#define SQL_COLUMN_NULLABLE 7
491#define SQL_COLUMN_UNSIGNED 8
492#define SQL_COLUMN_MONEY 9
493#define SQL_COLUMN_UPDATABLE 10
494#define SQL_COLUMN_AUTO_INCREMENT 11
495#define SQL_COLUMN_CASE_SENSITIVE 12
496#define SQL_COLUMN_SEARCHABLE 13
497#define SQL_COLUMN_TYPE_NAME 14
498#define SQL_COLUMN_TABLE_NAME 15
499#define SQL_COLUMN_OWNER_NAME 16
500#define SQL_COLUMN_QUALIFIER_NAME 17
501#define SQL_COLUMN_LABEL 18
502#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
503#if (ODBCVER < 0x0300)
504#define SQL_COLUMN_DRIVER_START 1000
505#endif
506
507#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
508
509#define SQL_ATTR_READONLY 0
510#define SQL_ATTR_WRITE 1
511#define SQL_ATTR_READWRITE_UNKNOWN 2
512
513#define SQL_UNSEARCHABLE 0
514#define SQL_LIKE_ONLY 1
515#define SQL_ALL_EXCEPT_LIKE 2
516#define SQL_SEARCHABLE 3
517#define SQL_PRED_SEARCHABLE SQL_SEARCHABLE
518
519
520#define SQL_NO_TOTAL (-4)
521
522#if (ODBCVER >= 0x0300)
523#define SQL_API_SQLALLOCHANDLESTD 73
524#define SQL_API_SQLBULKOPERATIONS 24
525#endif
526#define SQL_API_SQLBINDPARAMETER 72
527#define SQL_API_SQLBROWSECONNECT 55
528#define SQL_API_SQLCOLATTRIBUTES 6
529#define SQL_API_SQLCOLUMNPRIVILEGES 56
530#define SQL_API_SQLDESCRIBEPARAM 58
531#define SQL_API_SQLDRIVERCONNECT 41
532#define SQL_API_SQLDRIVERS 71
533#define SQL_API_SQLEXTENDEDFETCH 59
534#define SQL_API_SQLFOREIGNKEYS 60
535#define SQL_API_SQLMORERESULTS 61
536#define SQL_API_SQLNATIVESQL 62
537#define SQL_API_SQLNUMPARAMS 63
538#define SQL_API_SQLPARAMOPTIONS 64
539#define SQL_API_SQLPRIMARYKEYS 65
540#define SQL_API_SQLPROCEDURECOLUMNS 66
541#define SQL_API_SQLPROCEDURES 67
542#define SQL_API_SQLSETPOS 68
543#define SQL_API_SQLSETSCROLLOPTIONS 69
544#define SQL_API_SQLTABLEPRIVILEGES 70
545
546#if (ODBCVER < 0x0300)
547#define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER
548#define SQL_NUM_FUNCTIONS 23
549#define SQL_EXT_API_START 40
550#define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1)
551#endif
552
553#define SQL_API_ALL_FUNCTIONS 0
554
555#define SQL_API_LOADBYORDINAL 199
556
557#if (ODBCVER >= 0x0300)
558#define SQL_API_ODBC3_ALL_FUNCTIONS 999
559#define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250
560
561
562#define SQL_FUNC_EXISTS(pfExists, uwAPI) ((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) & (1 << ((uwAPI) & 0x000F)) ) ? SQL_TRUE : SQL_FALSE )
563
564#endif
565
566#define SQL_INFO_FIRST 0
567#define SQL_ACTIVE_CONNECTIONS 0
568#define SQL_ACTIVE_STATEMENTS 1
569#define SQL_DRIVER_HDBC 3
570#define SQL_DRIVER_HENV 4
571#define SQL_DRIVER_HSTMT 5
572#define SQL_DRIVER_NAME 6
573#define SQL_DRIVER_VER 7
574#define SQL_ODBC_API_CONFORMANCE 9
575#define SQL_ODBC_VER 10
576#define SQL_ROW_UPDATES 11
577#define SQL_ODBC_SAG_CLI_CONFORMANCE 12
578#define SQL_ODBC_SQL_CONFORMANCE 15
579#define SQL_PROCEDURES 21
580#define SQL_CONCAT_NULL_BEHAVIOR 22
581#define SQL_CURSOR_ROLLBACK_BEHAVIOR 24
582#define SQL_EXPRESSIONS_IN_ORDERBY 27
583#define SQL_MAX_OWNER_NAME_LEN 32
584#define SQL_MAX_PROCEDURE_NAME_LEN 33
585#define SQL_MAX_QUALIFIER_NAME_LEN 34
586#define SQL_MULT_RESULT_SETS 36
587#define SQL_MULTIPLE_ACTIVE_TXN 37
588#define SQL_OUTER_JOINS 38
589#define SQL_OWNER_TERM 39
590#define SQL_PROCEDURE_TERM 40
591#define SQL_QUALIFIER_NAME_SEPARATOR 41
592#define SQL_QUALIFIER_TERM 42
593#define SQL_SCROLL_OPTIONS 44
594#define SQL_TABLE_TERM 45
595#define SQL_CONVERT_FUNCTIONS 48
596#define SQL_NUMERIC_FUNCTIONS 49
597#define SQL_STRING_FUNCTIONS 50
598#define SQL_SYSTEM_FUNCTIONS 51
599#define SQL_TIMEDATE_FUNCTIONS 52
600#define SQL_CONVERT_BIGINT 53
601#define SQL_CONVERT_BINARY 54
602#define SQL_CONVERT_BIT 55
603#define SQL_CONVERT_CHAR 56
604#define SQL_CONVERT_DATE 57
605#define SQL_CONVERT_DECIMAL 58
606#define SQL_CONVERT_DOUBLE 59
607#define SQL_CONVERT_FLOAT 60
608#define SQL_CONVERT_INTEGER 61
609#define SQL_CONVERT_LONGVARCHAR 62
610#define SQL_CONVERT_NUMERIC 63
611#define SQL_CONVERT_REAL 64
612#define SQL_CONVERT_SMALLINT 65
613#define SQL_CONVERT_TIME 66
614#define SQL_CONVERT_TIMESTAMP 67
615#define SQL_CONVERT_TINYINT 68
616#define SQL_CONVERT_VARBINARY 69
617#define SQL_CONVERT_VARCHAR 70
618#define SQL_CONVERT_LONGVARBINARY 71
619#define SQL_ODBC_SQL_OPT_IEF 73
620#define SQL_CORRELATION_NAME 74
621#define SQL_NON_NULLABLE_COLUMNS 75
622#define SQL_DRIVER_HLIB 76
623#define SQL_DRIVER_ODBC_VER 77
624#define SQL_LOCK_TYPES 78
625#define SQL_POS_OPERATIONS 79
626#define SQL_POSITIONED_STATEMENTS 80
627#define SQL_BOOKMARK_PERSISTENCE 82
628#define SQL_STATIC_SENSITIVITY 83
629#define SQL_FILE_USAGE 84
630#define SQL_COLUMN_ALIAS 87
631#define SQL_GROUP_BY 88
632#define SQL_KEYWORDS 89
633#define SQL_OWNER_USAGE 91
634#define SQL_QUALIFIER_USAGE 92
635#define SQL_QUOTED_IDENTIFIER_CASE 93
636#define SQL_SUBQUERIES 95
637#define SQL_UNION 96
638#define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103
639#define SQL_MAX_CHAR_LITERAL_LEN 108
640#define SQL_TIMEDATE_ADD_INTERVALS 109
641#define SQL_TIMEDATE_DIFF_INTERVALS 110
642#define SQL_NEED_LONG_DATA_LEN 111
643#define SQL_MAX_BINARY_LITERAL_LEN 112
644#define SQL_LIKE_ESCAPE_CLAUSE 113
645#define SQL_QUALIFIER_LOCATION 114
646
647#if (ODBCVER >= 0x0201 && ODBCVER < 0x0300)
648#define SQL_OJ_CAPABILITIES 65003
649#endif
650
651#if (ODBCVER < 0x0300)
652#define SQL_INFO_LAST SQL_QUALIFIER_LOCATION
653#define SQL_INFO_DRIVER_START 1000
654#endif
655
656#if (ODBCVER >= 0x0300)
657#define SQL_ACTIVE_ENVIRONMENTS 116
658#define SQL_ALTER_DOMAIN 117
659
660#define SQL_SQL_CONFORMANCE 118
661#define SQL_DATETIME_LITERALS 119
662
663#define SQL_ASYNC_MODE 10021
664#define SQL_BATCH_ROW_COUNT 120
665#define SQL_BATCH_SUPPORT 121
666#define SQL_CATALOG_LOCATION SQL_QUALIFIER_LOCATION
667#define SQL_CATALOG_NAME_SEPARATOR SQL_QUALIFIER_NAME_SEPARATOR
668#define SQL_CATALOG_TERM SQL_QUALIFIER_TERM
669#define SQL_CATALOG_USAGE SQL_QUALIFIER_USAGE
670#define SQL_CONVERT_WCHAR 122
671#define SQL_CONVERT_INTERVAL_DAY_TIME 123
672#define SQL_CONVERT_INTERVAL_YEAR_MONTH 124
673#define SQL_CONVERT_WLONGVARCHAR 125
674#define SQL_CONVERT_WVARCHAR 126
675#define SQL_CREATE_ASSERTION 127
676#define SQL_CREATE_CHARACTER_SET 128
677#define SQL_CREATE_COLLATION 129
678#define SQL_CREATE_DOMAIN 130
679#define SQL_CREATE_SCHEMA 131
680#define SQL_CREATE_TABLE 132
681#define SQL_CREATE_TRANSLATION 133
682#define SQL_CREATE_VIEW 134
683#define SQL_DRIVER_HDESC 135
684#define SQL_DROP_ASSERTION 136
685#define SQL_DROP_CHARACTER_SET 137
686#define SQL_DROP_COLLATION 138
687#define SQL_DROP_DOMAIN 139
688#define SQL_DROP_SCHEMA 140
689#define SQL_DROP_TABLE 141
690#define SQL_DROP_TRANSLATION 142
691#define SQL_DROP_VIEW 143
692#define SQL_DYNAMIC_CURSOR_ATTRIBUTES1 144
693#define SQL_DYNAMIC_CURSOR_ATTRIBUTES2 145
694#define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 146
695#define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 147
696#define SQL_INDEX_KEYWORDS 148
697#define SQL_INFO_SCHEMA_VIEWS 149
698#define SQL_KEYSET_CURSOR_ATTRIBUTES1 150
699#define SQL_KEYSET_CURSOR_ATTRIBUTES2 151
700#define SQL_MAX_ASYNC_CONCURRENT_STATEMENTS 10022
701#define SQL_ODBC_INTERFACE_CONFORMANCE 152
702#define SQL_PARAM_ARRAY_ROW_COUNTS 153
703#define SQL_PARAM_ARRAY_SELECTS 154
704#define SQL_SCHEMA_TERM SQL_OWNER_TERM
705#define SQL_SCHEMA_USAGE SQL_OWNER_USAGE
706#define SQL_SQL92_DATETIME_FUNCTIONS 155
707#define SQL_SQL92_FOREIGN_KEY_DELETE_RULE 156
708#define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE 157
709#define SQL_SQL92_GRANT 158
710#define SQL_SQL92_NUMERIC_VALUE_FUNCTIONS 159
711#define SQL_SQL92_PREDICATES 160
712#define SQL_SQL92_RELATIONAL_JOIN_OPERATORS 161
713#define SQL_SQL92_REVOKE 162
714#define SQL_SQL92_ROW_VALUE_CONSTRUCTOR 163
715#define SQL_SQL92_STRING_FUNCTIONS 164
716#define SQL_SQL92_VALUE_EXPRESSIONS 165
717#define SQL_STANDARD_CLI_CONFORMANCE 166
718#define SQL_STATIC_CURSOR_ATTRIBUTES1 167
719#define SQL_STATIC_CURSOR_ATTRIBUTES2 168
720
721#define SQL_AGGREGATE_FUNCTIONS 169
722#define SQL_DDL_INDEX 170
723#define SQL_DM_VER 171
724#define SQL_INSERT_STATEMENT 172
725#define SQL_UNION_STATEMENT SQL_UNION
726#endif
727
728#define SQL_DTC_TRANSITION_COST 1750
729
730#if (ODBCVER >= 0x0300)
731
732#define SQL_AT_ADD_COLUMN_SINGLE 0x00000020L
733#define SQL_AT_ADD_COLUMN_DEFAULT 0x00000040L
734#define SQL_AT_ADD_COLUMN_COLLATION 0x00000080L
735#define SQL_AT_SET_COLUMN_DEFAULT 0x00000100L
736#define SQL_AT_DROP_COLUMN_DEFAULT 0x00000200L
737#define SQL_AT_DROP_COLUMN_CASCADE 0x00000400L
738#define SQL_AT_DROP_COLUMN_RESTRICT 0x00000800L
739#define SQL_AT_ADD_TABLE_CONSTRAINT 0x00001000L
740#define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE 0x00002000L
741#define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT 0x00004000L
742#define SQL_AT_CONSTRAINT_NAME_DEFINITION 0x00008000L
743#define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED 0x00010000L
744#define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00020000L
745#define SQL_AT_CONSTRAINT_DEFERRABLE 0x00040000L
746#define SQL_AT_CONSTRAINT_NON_DEFERRABLE 0x00080000L
747#endif
748
749#define SQL_CVT_CHAR 0x00000001L
750#define SQL_CVT_NUMERIC 0x00000002L
751#define SQL_CVT_DECIMAL 0x00000004L
752#define SQL_CVT_INTEGER 0x00000008L
753#define SQL_CVT_SMALLINT 0x00000010L
754#define SQL_CVT_FLOAT 0x00000020L
755#define SQL_CVT_REAL 0x00000040L
756#define SQL_CVT_DOUBLE 0x00000080L
757#define SQL_CVT_VARCHAR 0x00000100L
758#define SQL_CVT_LONGVARCHAR 0x00000200L
759#define SQL_CVT_BINARY 0x00000400L
760#define SQL_CVT_VARBINARY 0x00000800L
761#define SQL_CVT_BIT 0x00001000L
762#define SQL_CVT_TINYINT 0x00002000L
763#define SQL_CVT_BIGINT 0x00004000L
764#define SQL_CVT_DATE 0x00008000L
765#define SQL_CVT_TIME 0x00010000L
766#define SQL_CVT_TIMESTAMP 0x00020000L
767#define SQL_CVT_LONGVARBINARY 0x00040000L
768#if (ODBCVER >= 0x0300)
769#define SQL_CVT_INTERVAL_YEAR_MONTH 0x00080000L
770#define SQL_CVT_INTERVAL_DAY_TIME 0x00100000L
771#define SQL_CVT_WCHAR 0x00200000L
772#define SQL_CVT_WLONGVARCHAR 0x00400000L
773#define SQL_CVT_WVARCHAR 0x00800000L
774
775#endif
776
777
778#define SQL_FN_CVT_CONVERT 0x00000001L
779#if (ODBCVER >= 0x0300)
780#define SQL_FN_CVT_CAST 0x00000002L
781#endif
782
783#define SQL_FN_STR_CONCAT 0x00000001L
784#define SQL_FN_STR_INSERT 0x00000002L
785#define SQL_FN_STR_LEFT 0x00000004L
786#define SQL_FN_STR_LTRIM 0x00000008L
787#define SQL_FN_STR_LENGTH 0x00000010L
788#define SQL_FN_STR_LOCATE 0x00000020L
789#define SQL_FN_STR_LCASE 0x00000040L
790#define SQL_FN_STR_REPEAT 0x00000080L
791#define SQL_FN_STR_REPLACE 0x00000100L
792#define SQL_FN_STR_RIGHT 0x00000200L
793#define SQL_FN_STR_RTRIM 0x00000400L
794#define SQL_FN_STR_SUBSTRING 0x00000800L
795#define SQL_FN_STR_UCASE 0x00001000L
796#define SQL_FN_STR_ASCII 0x00002000L
797#define SQL_FN_STR_CHAR 0x00004000L
798#define SQL_FN_STR_DIFFERENCE 0x00008000L
799#define SQL_FN_STR_LOCATE_2 0x00010000L
800#define SQL_FN_STR_SOUNDEX 0x00020000L
801#define SQL_FN_STR_SPACE 0x00040000L
802#if (ODBCVER >= 0x0300)
803#define SQL_FN_STR_BIT_LENGTH 0x00080000L
804#define SQL_FN_STR_CHAR_LENGTH 0x00100000L
805#define SQL_FN_STR_CHARACTER_LENGTH 0x00200000L
806#define SQL_FN_STR_OCTET_LENGTH 0x00400000L
807#define SQL_FN_STR_POSITION 0x00800000L
808#endif
809
810#if (ODBCVER >= 0x0300)
811#define SQL_SSF_CONVERT 0x00000001L
812#define SQL_SSF_LOWER 0x00000002L
813#define SQL_SSF_UPPER 0x00000004L
814#define SQL_SSF_SUBSTRING 0x00000008L
815#define SQL_SSF_TRANSLATE 0x00000010L
816#define SQL_SSF_TRIM_BOTH 0x00000020L
817#define SQL_SSF_TRIM_LEADING 0x00000040L
818#define SQL_SSF_TRIM_TRAILING 0x00000080L
819#endif
820
821#define SQL_FN_NUM_ABS 0x00000001L
822#define SQL_FN_NUM_ACOS 0x00000002L
823#define SQL_FN_NUM_ASIN 0x00000004L
824#define SQL_FN_NUM_ATAN 0x00000008L
825#define SQL_FN_NUM_ATAN2 0x00000010L
826#define SQL_FN_NUM_CEILING 0x00000020L
827#define SQL_FN_NUM_COS 0x00000040L
828#define SQL_FN_NUM_COT 0x00000080L
829#define SQL_FN_NUM_EXP 0x00000100L
830#define SQL_FN_NUM_FLOOR 0x00000200L
831#define SQL_FN_NUM_LOG 0x00000400L
832#define SQL_FN_NUM_MOD 0x00000800L
833#define SQL_FN_NUM_SIGN 0x00001000L
834#define SQL_FN_NUM_SIN 0x00002000L
835#define SQL_FN_NUM_SQRT 0x00004000L
836#define SQL_FN_NUM_TAN 0x00008000L
837#define SQL_FN_NUM_PI 0x00010000L
838#define SQL_FN_NUM_RAND 0x00020000L
839#define SQL_FN_NUM_DEGREES 0x00040000L
840#define SQL_FN_NUM_LOG10 0x00080000L
841#define SQL_FN_NUM_POWER 0x00100000L
842#define SQL_FN_NUM_RADIANS 0x00200000L
843#define SQL_FN_NUM_ROUND 0x00400000L
844#define SQL_FN_NUM_TRUNCATE 0x00800000L
845
846#if (ODBCVER >= 0x0300)
847#define SQL_SNVF_BIT_LENGTH 0x00000001L
848#define SQL_SNVF_CHAR_LENGTH 0x00000002L
849#define SQL_SNVF_CHARACTER_LENGTH 0x00000004L
850#define SQL_SNVF_EXTRACT 0x00000008L
851#define SQL_SNVF_OCTET_LENGTH 0x00000010L
852#define SQL_SNVF_POSITION 0x00000020L
853#endif
854
855#define SQL_FN_TD_NOW 0x00000001L
856#define SQL_FN_TD_CURDATE 0x00000002L
857#define SQL_FN_TD_DAYOFMONTH 0x00000004L
858#define SQL_FN_TD_DAYOFWEEK 0x00000008L
859#define SQL_FN_TD_DAYOFYEAR 0x00000010L
860#define SQL_FN_TD_MONTH 0x00000020L
861#define SQL_FN_TD_QUARTER 0x00000040L
862#define SQL_FN_TD_WEEK 0x00000080L
863#define SQL_FN_TD_YEAR 0x00000100L
864#define SQL_FN_TD_CURTIME 0x00000200L
865#define SQL_FN_TD_HOUR 0x00000400L
866#define SQL_FN_TD_MINUTE 0x00000800L
867#define SQL_FN_TD_SECOND 0x00001000L
868#define SQL_FN_TD_TIMESTAMPADD 0x00002000L
869#define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L
870#define SQL_FN_TD_DAYNAME 0x00008000L
871#define SQL_FN_TD_MONTHNAME 0x00010000L
872#if (ODBCVER >= 0x0300)
873#define SQL_FN_TD_CURRENT_DATE 0x00020000L
874#define SQL_FN_TD_CURRENT_TIME 0x00040000L
875#define SQL_FN_TD_CURRENT_TIMESTAMP 0x00080000L
876#define SQL_FN_TD_EXTRACT 0x00100000L
877#endif
878
879#if (ODBCVER >= 0x0300)
880#define SQL_SDF_CURRENT_DATE 0x00000001L
881#define SQL_SDF_CURRENT_TIME 0x00000002L
882#define SQL_SDF_CURRENT_TIMESTAMP 0x00000004L
883#endif
884
885#define SQL_FN_SYS_USERNAME 0x00000001L
886#define SQL_FN_SYS_DBNAME 0x00000002L
887#define SQL_FN_SYS_IFNULL 0x00000004L
888
889#define SQL_FN_TSI_FRAC_SECOND 0x00000001L
890#define SQL_FN_TSI_SECOND 0x00000002L
891#define SQL_FN_TSI_MINUTE 0x00000004L
892#define SQL_FN_TSI_HOUR 0x00000008L
893#define SQL_FN_TSI_DAY 0x00000010L
894#define SQL_FN_TSI_WEEK 0x00000020L
895#define SQL_FN_TSI_MONTH 0x00000040L
896#define SQL_FN_TSI_QUARTER 0x00000080L
897#define SQL_FN_TSI_YEAR 0x00000100L
898
899#if (ODBCVER >= 0x0300)
900#define SQL_CA1_NEXT 0x00000001L
901#define SQL_CA1_ABSOLUTE 0x00000002L
902#define SQL_CA1_RELATIVE 0x00000004L
903#define SQL_CA1_BOOKMARK 0x00000008L
904
905#define SQL_CA1_LOCK_NO_CHANGE 0x00000040L
906#define SQL_CA1_LOCK_EXCLUSIVE 0x00000080L
907#define SQL_CA1_LOCK_UNLOCK 0x00000100L
908
909#define SQL_CA1_POS_POSITION 0x00000200L
910#define SQL_CA1_POS_UPDATE 0x00000400L
911#define SQL_CA1_POS_DELETE 0x00000800L
912#define SQL_CA1_POS_REFRESH 0x00001000L
913
914#define SQL_CA1_POSITIONED_UPDATE 0x00002000L
915#define SQL_CA1_POSITIONED_DELETE 0x00004000L
916#define SQL_CA1_SELECT_FOR_UPDATE 0x00008000L
917
918#define SQL_CA1_BULK_ADD 0x00010000L
919#define SQL_CA1_BULK_UPDATE_BY_BOOKMARK 0x00020000L
920#define SQL_CA1_BULK_DELETE_BY_BOOKMARK 0x00040000L
921#define SQL_CA1_BULK_FETCH_BY_BOOKMARK 0x00080000L
922#endif
923
924#if (ODBCVER >= 0x0300)
925#define SQL_CA2_READ_ONLY_CONCURRENCY 0x00000001L
926#define SQL_CA2_LOCK_CONCURRENCY 0x00000002L
927#define SQL_CA2_OPT_ROWVER_CONCURRENCY 0x00000004L
928#define SQL_CA2_OPT_VALUES_CONCURRENCY 0x00000008L
929
930#define SQL_CA2_SENSITIVITY_ADDITIONS 0x00000010L
931#define SQL_CA2_SENSITIVITY_DELETIONS 0x00000020L
932#define SQL_CA2_SENSITIVITY_UPDATES 0x00000040L
933
934#define SQL_CA2_MAX_ROWS_SELECT 0x00000080L
935#define SQL_CA2_MAX_ROWS_INSERT 0x00000100L
936#define SQL_CA2_MAX_ROWS_DELETE 0x00000200L
937#define SQL_CA2_MAX_ROWS_UPDATE 0x00000400L
938#define SQL_CA2_MAX_ROWS_CATALOG 0x00000800L
939#define SQL_CA2_MAX_ROWS_AFFECTS_ALL (SQL_CA2_MAX_ROWS_SELECT | SQL_CA2_MAX_ROWS_INSERT | SQL_CA2_MAX_ROWS_DELETE | SQL_CA2_MAX_ROWS_UPDATE | SQL_CA2_MAX_ROWS_CATALOG)
940
941#define SQL_CA2_CRC_EXACT 0x00001000L
942#define SQL_CA2_CRC_APPROXIMATE 0x00002000L
943
944#define SQL_CA2_SIMULATE_NON_UNIQUE 0x00004000L
945#define SQL_CA2_SIMULATE_TRY_UNIQUE 0x00008000L
946#define SQL_CA2_SIMULATE_UNIQUE 0x00010000L
947#endif
948
949#define SQL_OAC_NONE 0x0000
950#define SQL_OAC_LEVEL1 0x0001
951#define SQL_OAC_LEVEL2 0x0002
952
953#define SQL_OSCC_NOT_COMPLIANT 0x0000
954#define SQL_OSCC_COMPLIANT 0x0001
955
956#define SQL_OSC_MINIMUM 0x0000
957#define SQL_OSC_CORE 0x0001
958#define SQL_OSC_EXTENDED 0x0002
959
960#define SQL_CB_NULL 0x0000
961#define SQL_CB_NON_NULL 0x0001
962
963#define SQL_SO_FORWARD_ONLY 0x00000001L
964#define SQL_SO_KEYSET_DRIVEN 0x00000002L
965#define SQL_SO_DYNAMIC 0x00000004L
966#define SQL_SO_MIXED 0x00000008L
967#define SQL_SO_STATIC 0x00000010L
968
969#define SQL_FD_FETCH_BOOKMARK 0x00000080L
970
971#define SQL_CN_NONE 0x0000
972#define SQL_CN_DIFFERENT 0x0001
973#define SQL_CN_ANY 0x0002
974
975#define SQL_NNC_NULL 0x0000
976#define SQL_NNC_NON_NULL 0x0001
977
978#define SQL_NC_START 0x0002
979#define SQL_NC_END 0x0004
980
981#define SQL_FILE_NOT_SUPPORTED 0x0000
982#define SQL_FILE_TABLE 0x0001
983#define SQL_FILE_QUALIFIER 0x0002
984#define SQL_FILE_CATALOG SQL_FILE_QUALIFIER
985
986#define SQL_GD_BLOCK 0x00000004L
987#define SQL_GD_BOUND 0x00000008L
988
989#define SQL_PS_POSITIONED_DELETE 0x00000001L
990#define SQL_PS_POSITIONED_UPDATE 0x00000002L
991#define SQL_PS_SELECT_FOR_UPDATE 0x00000004L
992
993#define SQL_GB_NOT_SUPPORTED 0x0000
994#define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001
995#define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002
996#define SQL_GB_NO_RELATION 0x0003
997#if (ODBCVER >= 0x0300)
998#define SQL_GB_COLLATE 0x0004
999
1000#endif
1001
1002#define SQL_OU_DML_STATEMENTS 0x00000001L
1003#define SQL_OU_PROCEDURE_INVOCATION 0x00000002L
1004#define SQL_OU_TABLE_DEFINITION 0x00000004L
1005#define SQL_OU_INDEX_DEFINITION 0x00000008L
1006#define SQL_OU_PRIVILEGE_DEFINITION 0x00000010L
1007
1008#if (ODBCVER >= 0x0300)
1009#define SQL_SU_DML_STATEMENTS SQL_OU_DML_STATEMENTS
1010#define SQL_SU_PROCEDURE_INVOCATION SQL_OU_PROCEDURE_INVOCATION
1011#define SQL_SU_TABLE_DEFINITION SQL_OU_TABLE_DEFINITION
1012#define SQL_SU_INDEX_DEFINITION SQL_OU_INDEX_DEFINITION
1013#define SQL_SU_PRIVILEGE_DEFINITION SQL_OU_PRIVILEGE_DEFINITION
1014#endif
1015
1016#define SQL_QU_DML_STATEMENTS 0x00000001L
1017#define SQL_QU_PROCEDURE_INVOCATION 0x00000002L
1018#define SQL_QU_TABLE_DEFINITION 0x00000004L
1019#define SQL_QU_INDEX_DEFINITION 0x00000008L
1020#define SQL_QU_PRIVILEGE_DEFINITION 0x00000010L
1021
1022#if (ODBCVER >= 0x0300)
1023#define SQL_CU_DML_STATEMENTS SQL_QU_DML_STATEMENTS
1024#define SQL_CU_PROCEDURE_INVOCATION SQL_QU_PROCEDURE_INVOCATION
1025#define SQL_CU_TABLE_DEFINITION SQL_QU_TABLE_DEFINITION
1026#define SQL_CU_INDEX_DEFINITION SQL_QU_INDEX_DEFINITION
1027#define SQL_CU_PRIVILEGE_DEFINITION SQL_QU_PRIVILEGE_DEFINITION
1028#endif
1029
1030#define SQL_SQ_COMPARISON 0x00000001L
1031#define SQL_SQ_EXISTS 0x00000002L
1032#define SQL_SQ_IN 0x00000004L
1033#define SQL_SQ_QUANTIFIED 0x00000008L
1034#define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L
1035
1036#define SQL_U_UNION 0x00000001L
1037#define SQL_U_UNION_ALL 0x00000002L
1038
1039#define SQL_BP_CLOSE 0x00000001L
1040#define SQL_BP_DELETE 0x00000002L
1041#define SQL_BP_DROP 0x00000004L
1042#define SQL_BP_TRANSACTION 0x00000008L
1043#define SQL_BP_UPDATE 0x00000010L
1044#define SQL_BP_OTHER_HSTMT 0x00000020L
1045#define SQL_BP_SCROLL 0x00000040L
1046
1047#define SQL_SS_ADDITIONS 0x00000001L
1048#define SQL_SS_DELETIONS 0x00000002L
1049#define SQL_SS_UPDATES 0x00000004L
1050
1051#define SQL_CV_CREATE_VIEW 0x00000001L
1052#define SQL_CV_CHECK_OPTION 0x00000002L
1053#define SQL_CV_CASCADED 0x00000004L
1054#define SQL_CV_LOCAL 0x00000008L
1055
1056#define SQL_LCK_NO_CHANGE 0x00000001L
1057#define SQL_LCK_EXCLUSIVE 0x00000002L
1058#define SQL_LCK_UNLOCK 0x00000004L
1059
1060#define SQL_POS_POSITION 0x00000001L
1061#define SQL_POS_REFRESH 0x00000002L
1062#define SQL_POS_UPDATE 0x00000004L
1063#define SQL_POS_DELETE 0x00000008L
1064#define SQL_POS_ADD 0x00000010L
1065
1066#define SQL_QL_START 0x0001
1067#define SQL_QL_END 0x0002
1068
1069#if (ODBCVER >= 0x0300)
1070#define SQL_AF_AVG 0x00000001L
1071#define SQL_AF_COUNT 0x00000002L
1072#define SQL_AF_MAX 0x00000004L
1073#define SQL_AF_MIN 0x00000008L
1074#define SQL_AF_SUM 0x00000010L
1075#define SQL_AF_DISTINCT 0x00000020L
1076#define SQL_AF_ALL 0x00000040L
1077
1078#define SQL_SC_SQL92_ENTRY 0x00000001L
1079#define SQL_SC_FIPS127_2_TRANSITIONAL 0x00000002L
1080#define SQL_SC_SQL92_INTERMEDIATE 0x00000004L
1081#define SQL_SC_SQL92_FULL 0x00000008L
1082
1083#define SQL_DL_SQL92_DATE 0x00000001L
1084#define SQL_DL_SQL92_TIME 0x00000002L
1085#define SQL_DL_SQL92_TIMESTAMP 0x00000004L
1086#define SQL_DL_SQL92_INTERVAL_YEAR 0x00000008L
1087#define SQL_DL_SQL92_INTERVAL_MONTH 0x00000010L
1088#define SQL_DL_SQL92_INTERVAL_DAY 0x00000020L
1089#define SQL_DL_SQL92_INTERVAL_HOUR 0x00000040L
1090#define SQL_DL_SQL92_INTERVAL_MINUTE 0x00000080L
1091#define SQL_DL_SQL92_INTERVAL_SECOND 0x00000100L
1092#define SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH 0x00000200L
1093#define SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR 0x00000400L
1094#define SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE 0x00000800L
1095#define SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND 0x00001000L
1096#define SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE 0x00002000L
1097#define SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND 0x00004000L
1098#define SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND 0x00008000L
1099
1100#define SQL_CL_START SQL_QL_START
1101#define SQL_CL_END SQL_QL_END
1102
1103#define SQL_BRC_PROCEDURES 0x0000001
1104#define SQL_BRC_EXPLICIT 0x0000002
1105#define SQL_BRC_ROLLED_UP 0x0000004
1106
1107#define SQL_BS_SELECT_EXPLICIT 0x00000001L
1108#define SQL_BS_ROW_COUNT_EXPLICIT 0x00000002L
1109#define SQL_BS_SELECT_PROC 0x00000004L
1110#define SQL_BS_ROW_COUNT_PROC 0x00000008L
1111
1112#define SQL_PARC_BATCH 1
1113#define SQL_PARC_NO_BATCH 2
1114
1115#define SQL_PAS_BATCH 1
1116#define SQL_PAS_NO_BATCH 2
1117#define SQL_PAS_NO_SELECT 3
1118
1119#define SQL_IK_NONE 0x00000000L
1120#define SQL_IK_ASC 0x00000001L
1121#define SQL_IK_DESC 0x00000002L
1122#define SQL_IK_ALL (SQL_IK_ASC | SQL_IK_DESC)
1123
1124#define SQL_ISV_ASSERTIONS 0x00000001L
1125#define SQL_ISV_CHARACTER_SETS 0x00000002L
1126#define SQL_ISV_CHECK_CONSTRAINTS 0x00000004L
1127#define SQL_ISV_COLLATIONS 0x00000008L
1128#define SQL_ISV_COLUMN_DOMAIN_USAGE 0x00000010L
1129#define SQL_ISV_COLUMN_PRIVILEGES 0x00000020L
1130#define SQL_ISV_COLUMNS 0x00000040L
1131#define SQL_ISV_CONSTRAINT_COLUMN_USAGE 0x00000080L
1132#define SQL_ISV_CONSTRAINT_TABLE_USAGE 0x00000100L
1133#define SQL_ISV_DOMAIN_CONSTRAINTS 0x00000200L
1134#define SQL_ISV_DOMAINS 0x00000400L
1135#define SQL_ISV_KEY_COLUMN_USAGE 0x00000800L
1136#define SQL_ISV_REFERENTIAL_CONSTRAINTS 0x00001000L
1137#define SQL_ISV_SCHEMATA 0x00002000L
1138#define SQL_ISV_SQL_LANGUAGES 0x00004000L
1139#define SQL_ISV_TABLE_CONSTRAINTS 0x00008000L
1140#define SQL_ISV_TABLE_PRIVILEGES 0x00010000L
1141#define SQL_ISV_TABLES 0x00020000L
1142#define SQL_ISV_TRANSLATIONS 0x00040000L
1143#define SQL_ISV_USAGE_PRIVILEGES 0x00080000L
1144#define SQL_ISV_VIEW_COLUMN_USAGE 0x00100000L
1145#define SQL_ISV_VIEW_TABLE_USAGE 0x00200000L
1146#define SQL_ISV_VIEWS 0x00400000L
1147
1148#define SQL_AM_NONE 0
1149#define SQL_AM_CONNECTION 1
1150#define SQL_AM_STATEMENT 2
1151
1152#define SQL_AD_CONSTRAINT_NAME_DEFINITION 0x00000001L
1153#define SQL_AD_ADD_DOMAIN_CONSTRAINT 0x00000002L
1154#define SQL_AD_DROP_DOMAIN_CONSTRAINT 0x00000004L
1155#define SQL_AD_ADD_DOMAIN_DEFAULT 0x00000008L
1156#define SQL_AD_DROP_DOMAIN_DEFAULT 0x00000010L
1157#define SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
1158#define SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
1159#define SQL_AD_ADD_CONSTRAINT_DEFERRABLE 0x00000080L
1160#define SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE 0x00000100L
1161
1162#define SQL_CS_CREATE_SCHEMA 0x00000001L
1163#define SQL_CS_AUTHORIZATION 0x00000002L
1164#define SQL_CS_DEFAULT_CHARACTER_SET 0x00000004L
1165
1166#define SQL_CTR_CREATE_TRANSLATION 0x00000001L
1167
1168#define SQL_CA_CREATE_ASSERTION 0x00000001L
1169#define SQL_CA_CONSTRAINT_INITIALLY_DEFERRED 0x00000010L
1170#define SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000020L
1171#define SQL_CA_CONSTRAINT_DEFERRABLE 0x00000040L
1172#define SQL_CA_CONSTRAINT_NON_DEFERRABLE 0x00000080L
1173
1174#define SQL_CCS_CREATE_CHARACTER_SET 0x00000001L
1175#define SQL_CCS_COLLATE_CLAUSE 0x00000002L
1176#define SQL_CCS_LIMITED_COLLATION 0x00000004L
1177
1178#define SQL_CCOL_CREATE_COLLATION 0x00000001L
1179
1180#define SQL_CDO_CREATE_DOMAIN 0x00000001L
1181#define SQL_CDO_DEFAULT 0x00000002L
1182#define SQL_CDO_CONSTRAINT 0x00000004L
1183#define SQL_CDO_COLLATION 0x00000008L
1184#define SQL_CDO_CONSTRAINT_NAME_DEFINITION 0x00000010L
1185#define SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
1186#define SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
1187#define SQL_CDO_CONSTRAINT_DEFERRABLE 0x00000080L
1188#define SQL_CDO_CONSTRAINT_NON_DEFERRABLE 0x00000100L
1189
1190#define SQL_CT_CREATE_TABLE 0x00000001L
1191#define SQL_CT_COMMIT_PRESERVE 0x00000002L
1192#define SQL_CT_COMMIT_DELETE 0x00000004L
1193#define SQL_CT_GLOBAL_TEMPORARY 0x00000008L
1194#define SQL_CT_LOCAL_TEMPORARY 0x00000010L
1195#define SQL_CT_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
1196#define SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
1197#define SQL_CT_CONSTRAINT_DEFERRABLE 0x00000080L
1198#define SQL_CT_CONSTRAINT_NON_DEFERRABLE 0x00000100L
1199#define SQL_CT_COLUMN_CONSTRAINT 0x00000200L
1200#define SQL_CT_COLUMN_DEFAULT 0x00000400L
1201#define SQL_CT_COLUMN_COLLATION 0x00000800L
1202#define SQL_CT_TABLE_CONSTRAINT 0x00001000L
1203#define SQL_CT_CONSTRAINT_NAME_DEFINITION 0x00002000L
1204
1205#define SQL_DI_CREATE_INDEX 0x00000001L
1206#define SQL_DI_DROP_INDEX 0x00000002L
1207
1208#define SQL_DC_DROP_COLLATION 0x00000001L
1209
1210#define SQL_DD_DROP_DOMAIN 0x00000001L
1211#define SQL_DD_RESTRICT 0x00000002L
1212#define SQL_DD_CASCADE 0x00000004L
1213
1214#define SQL_DS_DROP_SCHEMA 0x00000001L
1215#define SQL_DS_RESTRICT 0x00000002L
1216#define SQL_DS_CASCADE 0x00000004L
1217
1218#define SQL_DCS_DROP_CHARACTER_SET 0x00000001L
1219
1220#define SQL_DA_DROP_ASSERTION 0x00000001L
1221
1222#define SQL_DT_DROP_TABLE 0x00000001L
1223#define SQL_DT_RESTRICT 0x00000002L
1224#define SQL_DT_CASCADE 0x00000004L
1225
1226#define SQL_DTR_DROP_TRANSLATION 0x00000001L
1227
1228#define SQL_DV_DROP_VIEW 0x00000001L
1229#define SQL_DV_RESTRICT 0x00000002L
1230#define SQL_DV_CASCADE 0x00000004L
1231
1232#define SQL_IS_INSERT_LITERALS 0x00000001L
1233#define SQL_IS_INSERT_SEARCHED 0x00000002L
1234#define SQL_IS_SELECT_INTO 0x00000004L
1235
1236#define SQL_OIC_CORE 1UL
1237#define SQL_OIC_LEVEL1 2UL
1238#define SQL_OIC_LEVEL2 3UL
1239
1240#define SQL_SFKD_CASCADE 0x00000001L
1241#define SQL_SFKD_NO_ACTION 0x00000002L
1242#define SQL_SFKD_SET_DEFAULT 0x00000004L
1243#define SQL_SFKD_SET_NULL 0x00000008L
1244
1245#define SQL_SFKU_CASCADE 0x00000001L
1246#define SQL_SFKU_NO_ACTION 0x00000002L
1247#define SQL_SFKU_SET_DEFAULT 0x00000004L
1248#define SQL_SFKU_SET_NULL 0x00000008L
1249
1250#define SQL_SG_USAGE_ON_DOMAIN 0x00000001L
1251#define SQL_SG_USAGE_ON_CHARACTER_SET 0x00000002L
1252#define SQL_SG_USAGE_ON_COLLATION 0x00000004L
1253#define SQL_SG_USAGE_ON_TRANSLATION 0x00000008L
1254#define SQL_SG_WITH_GRANT_OPTION 0x00000010L
1255#define SQL_SG_DELETE_TABLE 0x00000020L
1256#define SQL_SG_INSERT_TABLE 0x00000040L
1257#define SQL_SG_INSERT_COLUMN 0x00000080L
1258#define SQL_SG_REFERENCES_TABLE 0x00000100L
1259#define SQL_SG_REFERENCES_COLUMN 0x00000200L
1260#define SQL_SG_SELECT_TABLE 0x00000400L
1261#define SQL_SG_UPDATE_TABLE 0x00000800L
1262#define SQL_SG_UPDATE_COLUMN 0x00001000L
1263
1264#define SQL_SP_EXISTS 0x00000001L
1265#define SQL_SP_ISNOTNULL 0x00000002L
1266#define SQL_SP_ISNULL 0x00000004L
1267#define SQL_SP_MATCH_FULL 0x00000008L
1268#define SQL_SP_MATCH_PARTIAL 0x00000010L
1269#define SQL_SP_MATCH_UNIQUE_FULL 0x00000020L
1270#define SQL_SP_MATCH_UNIQUE_PARTIAL 0x00000040L
1271#define SQL_SP_OVERLAPS 0x00000080L
1272#define SQL_SP_UNIQUE 0x00000100L
1273#define SQL_SP_LIKE 0x00000200L
1274#define SQL_SP_IN 0x00000400L
1275#define SQL_SP_BETWEEN 0x00000800L
1276#define SQL_SP_COMPARISON 0x00001000L
1277#define SQL_SP_QUANTIFIED_COMPARISON 0x00002000L
1278
1279#define SQL_SRJO_CORRESPONDING_CLAUSE 0x00000001L
1280#define SQL_SRJO_CROSS_JOIN 0x00000002L
1281#define SQL_SRJO_EXCEPT_JOIN 0x00000004L
1282#define SQL_SRJO_FULL_OUTER_JOIN 0x00000008L
1283#define SQL_SRJO_INNER_JOIN 0x00000010L
1284#define SQL_SRJO_INTERSECT_JOIN 0x00000020L
1285#define SQL_SRJO_LEFT_OUTER_JOIN 0x00000040L
1286#define SQL_SRJO_NATURAL_JOIN 0x00000080L
1287#define SQL_SRJO_RIGHT_OUTER_JOIN 0x00000100L
1288#define SQL_SRJO_UNION_JOIN 0x00000200L
1289
1290#define SQL_SR_USAGE_ON_DOMAIN 0x00000001L
1291#define SQL_SR_USAGE_ON_CHARACTER_SET 0x00000002L
1292#define SQL_SR_USAGE_ON_COLLATION 0x00000004L
1293#define SQL_SR_USAGE_ON_TRANSLATION 0x00000008L
1294#define SQL_SR_GRANT_OPTION_FOR 0x00000010L
1295#define SQL_SR_CASCADE 0x00000020L
1296#define SQL_SR_RESTRICT 0x00000040L
1297#define SQL_SR_DELETE_TABLE 0x00000080L
1298#define SQL_SR_INSERT_TABLE 0x00000100L
1299#define SQL_SR_INSERT_COLUMN 0x00000200L
1300#define SQL_SR_REFERENCES_TABLE 0x00000400L
1301#define SQL_SR_REFERENCES_COLUMN 0x00000800L
1302#define SQL_SR_SELECT_TABLE 0x00001000L
1303#define SQL_SR_UPDATE_TABLE 0x00002000L
1304#define SQL_SR_UPDATE_COLUMN 0x00004000L
1305
1306#define SQL_SRVC_VALUE_EXPRESSION 0x00000001L
1307#define SQL_SRVC_NULL 0x00000002L
1308#define SQL_SRVC_DEFAULT 0x00000004L
1309#define SQL_SRVC_ROW_SUBQUERY 0x00000008L
1310
1311#define SQL_SVE_CASE 0x00000001L
1312#define SQL_SVE_CAST 0x00000002L
1313#define SQL_SVE_COALESCE 0x00000004L
1314#define SQL_SVE_NULLIF 0x00000008L
1315
1316#define SQL_SCC_XOPEN_CLI_VERSION1 0x00000001L
1317#define SQL_SCC_ISO92_CLI 0x00000002L
1318
1319#define SQL_US_UNION SQL_U_UNION
1320#define SQL_US_UNION_ALL SQL_U_UNION_ALL
1321
1322#endif
1323
1324#define SQL_DTC_ENLIST_EXPENSIVE 0x00000001L
1325#define SQL_DTC_UNENLIST_EXPENSIVE 0x00000002L
1326
1327#if (ODBCVER >= 0x0300)
1328#define SQL_FETCH_FIRST_USER 31
1329#define SQL_FETCH_FIRST_SYSTEM 32
1330#endif
1331
1332#define SQL_ENTIRE_ROWSET 0
1333
1334#define SQL_POSITION 0
1335#define SQL_REFRESH 1
1336#define SQL_UPDATE 2
1337#define SQL_DELETE 3
1338
1339#define SQL_ADD 4
1340#define SQL_SETPOS_MAX_OPTION_VALUE SQL_ADD
1341#if (ODBCVER >= 0x0300)
1342#define SQL_UPDATE_BY_BOOKMARK 5
1343#define SQL_DELETE_BY_BOOKMARK 6
1344#define SQL_FETCH_BY_BOOKMARK 7
1345
1346#endif
1347
1348#define SQL_LOCK_NO_CHANGE 0
1349#define SQL_LOCK_EXCLUSIVE 1
1350#define SQL_LOCK_UNLOCK 2
1351
1352#define SQL_SETPOS_MAX_LOCK_VALUE SQL_LOCK_UNLOCK
1353
1354#define SQL_POSITION_TO(hstmt,irow) SQLSetPos(hstmt,irow,SQL_POSITION,SQL_LOCK_NO_CHANGE)
1355#define SQL_LOCK_RECORD(hstmt,irow,fLock) SQLSetPos(hstmt,irow,SQL_POSITION,fLock)
1356#define SQL_REFRESH_RECORD(hstmt,irow,fLock) SQLSetPos(hstmt,irow,SQL_REFRESH,fLock)
1357#define SQL_UPDATE_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_UPDATE,SQL_LOCK_NO_CHANGE)
1358#define SQL_DELETE_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_DELETE,SQL_LOCK_NO_CHANGE)
1359#define SQL_ADD_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_ADD,SQL_LOCK_NO_CHANGE)
1360
1361#define SQL_BEST_ROWID 1
1362#define SQL_ROWVER 2
1363
1364#define SQL_PC_NOT_PSEUDO 1
1365
1366#define SQL_QUICK 0
1367#define SQL_ENSURE 1
1368
1369#define SQL_TABLE_STAT 0
1370
1371#if (ODBCVER >= 0x0300)
1372#define SQL_ALL_CATALOGS "%"
1373#define SQL_ALL_SCHEMAS "%"
1374#define SQL_ALL_TABLE_TYPES "%"
1375#endif /* ODBCVER >= 0x0300 */
1376
1377#define SQL_DRIVER_NOPROMPT 0
1378#define SQL_DRIVER_COMPLETE 1
1379#define SQL_DRIVER_PROMPT 2
1380#define SQL_DRIVER_COMPLETE_REQUIRED 3
1381
1382SQLRETURN WINAPI SQLDriverConnect(
1383 SQLHDBC hdbc,
1384 SQLHWND hwnd,
1385 SQLCHAR *szConnStrIn,
1386 SQLSMALLINT cbConnStrIn,
1387 SQLCHAR *szConnStrOut,
1388 SQLSMALLINT cbConnStrOutMax,
1389 SQLSMALLINT *pcbConnStrOut,
1390 SQLUSMALLINT fDriverCompletion);
1391
1392#define SQL_FETCH_BOOKMARK 8
1393
1394#define SQL_ROW_SUCCESS 0
1395#define SQL_ROW_DELETED 1
1396#define SQL_ROW_UPDATED 2
1397#define SQL_ROW_NOROW 3
1398#define SQL_ROW_ADDED 4
1399#define SQL_ROW_ERROR 5
1400#if (ODBCVER >= 0x0300)
1401#define SQL_ROW_SUCCESS_WITH_INFO 6
1402#define SQL_ROW_PROCEED 0
1403#define SQL_ROW_IGNORE 1
1404#endif
1405
1406#if (ODBCVER >= 0x0300)
1407#define SQL_PARAM_SUCCESS 0
1408#define SQL_PARAM_SUCCESS_WITH_INFO 6
1409#define SQL_PARAM_ERROR 5
1410#define SQL_PARAM_UNUSED 7
1411#define SQL_PARAM_DIAG_UNAVAILABLE 1
1412
1413#define SQL_PARAM_PROCEED 0
1414#define SQL_PARAM_IGNORE 1
1415#endif
1416
1417#define SQL_CASCADE 0
1418#define SQL_RESTRICT 1
1419#define SQL_SET_NULL 2
1420#if (ODBCVER >= 0x0250)
1421#define SQL_NO_ACTION 3
1422#define SQL_SET_DEFAULT 4
1423#endif
1424
1425#if (ODBCVER >= 0x0300)
1426
1427#define SQL_INITIALLY_DEFERRED 5
1428#define SQL_INITIALLY_IMMEDIATE 6
1429#define SQL_NOT_DEFERRABLE 7
1430
1431#endif
1432
1433#define SQL_PARAM_TYPE_UNKNOWN 0
1434#define SQL_PARAM_INPUT 1
1435#define SQL_PARAM_INPUT_OUTPUT 2
1436#define SQL_RESULT_COL 3
1437#define SQL_PARAM_OUTPUT 4
1438#define SQL_RETURN_VALUE 5
1439
1440#define SQL_PT_UNKNOWN 0
1441#define SQL_PT_PROCEDURE 1
1442#define SQL_PT_FUNCTION 2
1443
1444#define SQL_ODBC_KEYWORDS "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,"
1445
1446SQLRETURN WINAPI SQLBrowseConnect(
1447 SQLHDBC hdbc,
1448 SQLCHAR *szConnStrIn,
1449 SQLSMALLINT cbConnStrIn,
1450 SQLCHAR *szConnStrOut,
1451 SQLSMALLINT cbConnStrOutMax,
1452 SQLSMALLINT *pcbConnStrOut);
1453
1454#if (ODBCVER >= 0x0300)
1455SQLRETURN WINAPI SQLBulkOperations(
1456 SQLHSTMT StatementHandle,
1457 SQLSMALLINT Operation);
1458#endif
1459
1460SQLRETURN WINAPI SQLColAttributes(
1461 SQLHSTMT hstmt,
1462 SQLUSMALLINT icol,
1463 SQLUSMALLINT fDescType,
1464 SQLPOINTER rgbDesc,
1465 SQLSMALLINT cbDescMax,
1466 SQLSMALLINT *pcbDesc,
1467 SQLINTEGER *pfDesc);
1468
1469SQLRETURN WINAPI SQLColumnPrivileges(
1470 SQLHSTMT hstmt,
1471 SQLCHAR *szCatalogName,
1472 SQLSMALLINT cbCatalogName,
1473 SQLCHAR *szSchemaName,
1474 SQLSMALLINT cbSchemaName,
1475 SQLCHAR *szTableName,
1476 SQLSMALLINT cbTableName,
1477 SQLCHAR *szColumnName,
1478 SQLSMALLINT cbColumnName);
1479
1480SQLRETURN WINAPI SQLDescribeParam(
1481 SQLHSTMT hstmt,
1482 SQLUSMALLINT ipar,
1483 SQLSMALLINT *pfSqlType,
1484 SQLUINTEGER *pcbParamDef,
1485 SQLSMALLINT *pibScale,
1486 SQLSMALLINT *pfNullable);
1487
1488SQLRETURN WINAPI SQLExtendedFetch(
1489 SQLHSTMT hstmt,
1490 SQLUSMALLINT fFetchType,
1491 SQLINTEGER irow,
1492 SQLUINTEGER *pcrow,
1493 SQLUSMALLINT *rgfRowStatus);
1494
1495SQLRETURN WINAPI SQLForeignKeys(
1496 SQLHSTMT hstmt,
1497 SQLCHAR *szPkCatalogName,
1498 SQLSMALLINT cbPkCatalogName,
1499 SQLCHAR *szPkSchemaName,
1500 SQLSMALLINT cbPkSchemaName,
1501 SQLCHAR *szPkTableName,
1502 SQLSMALLINT cbPkTableName,
1503 SQLCHAR *szFkCatalogName,
1504 SQLSMALLINT cbFkCatalogName,
1505 SQLCHAR *szFkSchemaName,
1506 SQLSMALLINT cbFkSchemaName,
1507 SQLCHAR *szFkTableName,
1508 SQLSMALLINT cbFkTableName);
1509
1510SQLRETURN WINAPI SQLMoreResults(
1511 SQLHSTMT hstmt);
1512
1513SQLRETURN WINAPI SQLNativeSql(
1514 SQLHDBC hdbc,
1515 SQLCHAR *szSqlStrIn,
1516 SQLINTEGER cbSqlStrIn,
1517 SQLCHAR *szSqlStr,
1518 SQLINTEGER cbSqlStrMax,
1519 SQLINTEGER *pcbSqlStr);
1520
1521SQLRETURN WINAPI SQLNumParams(
1522 SQLHSTMT hstmt,
1523 SQLSMALLINT *pcpar);
1524
1525SQLRETURN WINAPI SQLParamOptions(
1526 SQLHSTMT hstmt,
1527 SQLUINTEGER crow,
1528 SQLUINTEGER *pirow);
1529
1530SQLRETURN WINAPI SQLPrimaryKeys(
1531 SQLHSTMT hstmt,
1532 SQLCHAR *szCatalogName,
1533 SQLSMALLINT cbCatalogName,
1534 SQLCHAR *szSchemaName,
1535 SQLSMALLINT cbSchemaName,
1536 SQLCHAR *szTableName,
1537 SQLSMALLINT cbTableName);
1538
1539SQLRETURN WINAPI SQLProcedureColumns(
1540 SQLHSTMT hstmt,
1541 SQLCHAR *szCatalogName,
1542 SQLSMALLINT cbCatalogName,
1543 SQLCHAR *szSchemaName,
1544 SQLSMALLINT cbSchemaName,
1545 SQLCHAR *szProcName,
1546 SQLSMALLINT cbProcName,
1547 SQLCHAR *szColumnName,
1548 SQLSMALLINT cbColumnName);
1549
1550SQLRETURN WINAPI SQLProcedures(
1551 SQLHSTMT hstmt,
1552 SQLCHAR *szCatalogName,
1553 SQLSMALLINT cbCatalogName,
1554 SQLCHAR *szSchemaName,
1555 SQLSMALLINT cbSchemaName,
1556 SQLCHAR *szProcName,
1557 SQLSMALLINT cbProcName);
1558
1559SQLRETURN WINAPI SQLSetPos(
1560 SQLHSTMT hstmt,
1561 SQLUSMALLINT irow,
1562 SQLUSMALLINT fOption,
1563 SQLUSMALLINT fLock);
1564
1565SQLRETURN WINAPI SQLTablePrivileges(
1566 SQLHSTMT hstmt,
1567 SQLCHAR *szCatalogName,
1568 SQLSMALLINT cbCatalogName,
1569 SQLCHAR *szSchemaName,
1570 SQLSMALLINT cbSchemaName,
1571 SQLCHAR *szTableName,
1572 SQLSMALLINT cbTableName);
1573
1574SQLRETURN WINAPI SQLDrivers(
1575 SQLHENV henv,
1576 SQLUSMALLINT fDirection,
1577 SQLCHAR *szDriverDesc,
1578 SQLSMALLINT cbDriverDescMax,
1579 SQLSMALLINT *pcbDriverDesc,
1580 SQLCHAR *szDriverAttributes,
1581 SQLSMALLINT cbDrvrAttrMax,
1582 SQLSMALLINT *pcbDrvrAttr);
1583
1584SQLRETURN WINAPI SQLBindParameter(
1585 SQLHSTMT hstmt,
1586 SQLUSMALLINT ipar,
1587 SQLSMALLINT fParamType,
1588 SQLSMALLINT fCType,
1589 SQLSMALLINT fSqlType,
1590 SQLUINTEGER cbColDef,
1591 SQLSMALLINT ibScale,
1592 SQLPOINTER rgbValue,
1593 SQLINTEGER cbValueMax,
1594 SQLINTEGER *pcbValue);
1595
1596#ifdef ODBC_STD
1597#define SQLAllocHandle SQLAllocHandleStd
1598#define SQLAllocEnv(phenv) SQLAllocHandleStd(SQL_HANDLE_ENV, SQL_NULL_HANDLE, phenv)
1599
1600#define SQL_YEAR SQL_CODE_YEAR
1601#define SQL_MONTH SQL_CODE_MONTH
1602#define SQL_DAY SQL_CODE_DAY
1603#define SQL_HOUR SQL_CODE_HOUR
1604#define SQL_MINUTE SQL_CODE_MINUTE
1605#define SQL_SECOND SQL_CODE_SECOND
1606#define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MONTH
1607#define SQL_DAY_TO_HOUR SQL_CODE_DAY_TO_HOUR
1608#define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINUTE
1609#define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECOND
1610#define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MINUTE
1611#define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SECOND
1612#define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND
1613#endif
1614
1615#if (ODBCVER >= 0x0300)
1616SQLRETURN WINAPI SQLAllocHandleStd(
1617 SQLSMALLINT fHandleType,
1618 SQLHANDLE hInput,
1619 SQLHANDLE *phOutput);
1620#endif
1621
1622#define SQL_DATABASE_NAME 16
1623#define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR
1624#define SQL_FETCH_PREV SQL_FETCH_PRIOR
1625#define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER
1626#define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER
1627#define SQL_CC_DELETE SQL_CB_DELETE
1628#define SQL_CR_DELETE SQL_CB_DELETE
1629#define SQL_CC_CLOSE SQL_CB_CLOSE
1630#define SQL_CR_CLOSE SQL_CB_CLOSE
1631#define SQL_CC_PRESERVE SQL_CB_PRESERVE
1632#define SQL_CR_PRESERVE SQL_CB_PRESERVE
1633#define SQL_SCROLL_FORWARD_ONLY 0L
1634#define SQL_SCROLL_KEYSET_DRIVEN (-1L)
1635#define SQL_SCROLL_DYNAMIC (-2L)
1636#define SQL_SCROLL_STATIC (-3L)
1637
1638SQLRETURN WINAPI SQLSetScrollOptions(
1639 SQLHSTMT hstmt,
1640 SQLUSMALLINT fConcurrency,
1641 SQLINTEGER crowKeyset,
1642 SQLUSMALLINT crowRowset);
1643
1644#define TRACE_VERSION 1000
1645
1646RETCODE TraceOpenLogFile(LPWSTR,LPWSTR,DWORD);
1647RETCODE TraceCloseLogFile(void);
1648VOID TraceReturn(RETCODE,RETCODE);
1649DWORD TraceVersion(void);
1650
1651/*#define TRACE_ON 0x00000001L*/
1652#define TRACE_VS_EVENT_ON 0x00000002L
1653
1654RETCODE TraceVSControl(DWORD);
1655
1656#define ODBC_VS_FLAG_UNICODE_ARG 0x00000001L
1657#define ODBC_VS_FLAG_UNICODE_COR 0x00000002L
1658#define ODBC_VS_FLAG_RETCODE 0x00000004L
1659#define ODBC_VS_FLAG_STOP 0x00000008L
1660
1661typedef struct tagODBC_VS_ARGS {
1662 const GUID *pguidEvent;
1663 DWORD dwFlags;
1664 union {
1665 WCHAR *wszArg;
1666 CHAR *szArg;
1667 } DUMMYUNIONNAME1;
1668 union {
1669 WCHAR *wszCorrelation;
1670 CHAR *szCorrelation;
1671 } DUMMYUNIONNAME2;
1672 RETCODE RetCode;
1673} ODBC_VS_ARGS, *PODBC_VS_ARGS;
1674
1675VOID FireVSDebugEvent(PODBC_VS_ARGS);
1676
1677
1678#ifdef __cplusplus
1679}
1680#endif
1681
1682#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette