intersys 0.1 → 0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2566 @@
1
+ /*
2
+ * sqlext.h
3
+ *
4
+ * $Id: sqlext.h,v 1.3 2004/11/11 01:52:36 luesang Exp $
5
+ *
6
+ * ODBC defines (ext)
7
+ *
8
+ * The iODBC driver manager.
9
+ *
10
+ * Copyright (C) 1995 by Ke Jin <kejin@empress.com>
11
+ * Copyright (C) 1996-2002 by OpenLink Software <iodbc@openlinksw.com>
12
+ * All Rights Reserved.
13
+ *
14
+ * This software is released under the terms of either of the following
15
+ * licenses:
16
+ *
17
+ * - GNU Library General Public License (see LICENSE.LGPL)
18
+ * - The BSD License (see LICENSE.BSD).
19
+ *
20
+ * While not mandated by the BSD license, any patches you make to the
21
+ * iODBC source code may be contributed back into the iODBC project
22
+ * at your discretion. Contributions will benefit the Open Source and
23
+ * Data Access community as a whole. Submissions may be made at:
24
+ *
25
+ * http://www.iodbc.org
26
+ *
27
+ *
28
+ * GNU Library Generic Public License Version 2
29
+ * ============================================
30
+ * This library is free software; you can redistribute it and/or
31
+ * modify it under the terms of the GNU Library General Public
32
+ * License as published by the Free Software Foundation; either
33
+ * version 2 of the License, or (at your option) any later version.
34
+ *
35
+ * This library is distributed in the hope that it will be useful,
36
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
37
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
38
+ * Library General Public License for more details.
39
+ *
40
+ * You should have received a copy of the GNU Library General Public
41
+ * License along with this library; if not, write to the Free
42
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
43
+ *
44
+ *
45
+ * The BSD License
46
+ * ===============
47
+ * Redistribution and use in source and binary forms, with or without
48
+ * modification, are permitted provided that the following conditions
49
+ * are met:
50
+ *
51
+ * 1. Redistributions of source code must retain the above copyright
52
+ * notice, this list of conditions and the following disclaimer.
53
+ * 2. Redistributions in binary form must reproduce the above copyright
54
+ * notice, this list of conditions and the following disclaimer in
55
+ * the documentation and/or other materials provided with the
56
+ * distribution.
57
+ * 3. Neither the name of OpenLink Software Inc. nor the names of its
58
+ * contributors may be used to endorse or promote products derived
59
+ * from this software without specific prior written permission.
60
+ *
61
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
62
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
63
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
64
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR
65
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
66
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
67
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
68
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
69
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
70
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
71
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
72
+ */
73
+ #ifndef _SQLEXT_H
74
+ #define _SQLEXT_H
75
+
76
+ #ifndef _SQL_H
77
+ #include <sql.h>
78
+ #endif
79
+
80
+ #ifdef __cplusplus
81
+ extern "C" {
82
+ #endif
83
+
84
+
85
+ /*
86
+ * Useful Constants
87
+ */
88
+ #define SQL_SPEC_MAJOR 3
89
+ #define SQL_SPEC_MINOR 52
90
+ #define SQL_SPEC_STRING "03.52"
91
+
92
+ #define SQL_SQLSTATE_SIZE 5
93
+ #define SQL_MAX_DSN_LENGTH 32
94
+ #define SQL_MAX_OPTION_STRING_LENGTH 256
95
+
96
+
97
+ /*
98
+ * Handle types
99
+ */
100
+ #if (ODBCVER >= 0x0300)
101
+ #define SQL_HANDLE_SENV 5
102
+ #endif /* ODBCVER >= 0x0300 */
103
+
104
+
105
+ /*
106
+ * Function return codes
107
+ */
108
+ #if (ODBCVER < 0x0300)
109
+ #define SQL_NO_DATA_FOUND 100
110
+ #else
111
+ #define SQL_NO_DATA_FOUND SQL_NO_DATA
112
+ #endif /* ODBCVER < 0x0300 */
113
+
114
+
115
+ /*
116
+ * Special length values for attributes
117
+ */
118
+ #if (ODBCVER >= 0x0300)
119
+ #define SQL_IS_POINTER (-4)
120
+ #define SQL_IS_UINTEGER (-5)
121
+ #define SQL_IS_INTEGER (-6)
122
+ #define SQL_IS_USMALLINT (-7)
123
+ #define SQL_IS_SMALLINT (-8)
124
+ #endif /* ODBCVER >= 0x0300 */
125
+
126
+
127
+ /*
128
+ * SQL extended datatypes
129
+ */
130
+ #define SQL_DATE 9
131
+ #if (ODBCVER >= 0x0300)
132
+ #define SQL_INTERVAL 10
133
+ #endif /* ODBCVER >= 0x0300 */
134
+ #define SQL_TIME 10
135
+ #define SQL_TIMESTAMP 11
136
+ #define SQL_LONGVARCHAR (-1)
137
+ #define SQL_BINARY (-2)
138
+ #define SQL_VARBINARY (-3)
139
+ #define SQL_LONGVARBINARY (-4)
140
+ #define SQL_BIGINT (-5)
141
+ #define SQL_TINYINT (-6)
142
+ #define SQL_BIT (-7)
143
+ #if (ODBCVER >= 0x0350)
144
+ #define SQL_GUID (-11)
145
+ #endif /* ODBCVER >= 0x0350 */
146
+
147
+
148
+ /*
149
+ * SQL Interval datatypes
150
+ */
151
+ #if (ODBCVER >= 0x0300)
152
+ #define SQL_CODE_YEAR 1
153
+ #define SQL_CODE_MONTH 2
154
+ #define SQL_CODE_DAY 3
155
+ #define SQL_CODE_HOUR 4
156
+ #define SQL_CODE_MINUTE 5
157
+ #define SQL_CODE_SECOND 6
158
+ #define SQL_CODE_YEAR_TO_MONTH 7
159
+ #define SQL_CODE_DAY_TO_HOUR 8
160
+ #define SQL_CODE_DAY_TO_MINUTE 9
161
+ #define SQL_CODE_DAY_TO_SECOND 10
162
+ #define SQL_CODE_HOUR_TO_MINUTE 11
163
+ #define SQL_CODE_HOUR_TO_SECOND 12
164
+ #define SQL_CODE_MINUTE_TO_SECOND 13
165
+
166
+ #define SQL_INTERVAL_YEAR (100 + SQL_CODE_YEAR)
167
+ #define SQL_INTERVAL_MONTH (100 + SQL_CODE_MONTH)
168
+ #define SQL_INTERVAL_DAY (100 + SQL_CODE_DAY)
169
+ #define SQL_INTERVAL_HOUR (100 + SQL_CODE_HOUR)
170
+ #define SQL_INTERVAL_MINUTE (100 + SQL_CODE_MINUTE)
171
+ #define SQL_INTERVAL_SECOND (100 + SQL_CODE_SECOND)
172
+ #define SQL_INTERVAL_YEAR_TO_MONTH (100 + SQL_CODE_YEAR_TO_MONTH)
173
+ #define SQL_INTERVAL_DAY_TO_HOUR (100 + SQL_CODE_DAY_TO_HOUR)
174
+ #define SQL_INTERVAL_DAY_TO_MINUTE (100 + SQL_CODE_DAY_TO_MINUTE)
175
+ #define SQL_INTERVAL_DAY_TO_SECOND (100 + SQL_CODE_DAY_TO_SECOND)
176
+ #define SQL_INTERVAL_HOUR_TO_MINUTE (100 + SQL_CODE_HOUR_TO_MINUTE)
177
+ #define SQL_INTERVAL_HOUR_TO_SECOND (100 + SQL_CODE_HOUR_TO_SECOND)
178
+ #define SQL_INTERVAL_MINUTE_TO_SECOND (100 + SQL_CODE_MINUTE_TO_SECOND)
179
+ #else
180
+ #define SQL_INTERVAL_YEAR (-80)
181
+ #define SQL_INTERVAL_MONTH (-81)
182
+ #define SQL_INTERVAL_YEAR_TO_MONTH (-82)
183
+ #define SQL_INTERVAL_DAY (-83)
184
+ #define SQL_INTERVAL_HOUR (-84)
185
+ #define SQL_INTERVAL_MINUTE (-85)
186
+ #define SQL_INTERVAL_SECOND (-86)
187
+ #define SQL_INTERVAL_DAY_TO_HOUR (-87)
188
+ #define SQL_INTERVAL_DAY_TO_MINUTE (-88)
189
+ #define SQL_INTERVAL_DAY_TO_SECOND (-89)
190
+ #define SQL_INTERVAL_HOUR_TO_MINUTE (-90)
191
+ #define SQL_INTERVAL_HOUR_TO_SECOND (-91)
192
+ #define SQL_INTERVAL_MINUTE_TO_SECOND (-92)
193
+ #endif /* ODBCVER >= 0x0300 */
194
+
195
+
196
+ /*
197
+ * SQL unicode data types
198
+ */
199
+ #if (ODBCVER <= 0x0300)
200
+ /* These definitions are historical and obsolete */
201
+ #define SQL_UNICODE (-95)
202
+ #define SQL_UNICODE_VARCHAR (-96)
203
+ #define SQL_UNICODE_LONGVARCHAR (-97)
204
+ #define SQL_UNICODE_CHAR SQL_UNICODE
205
+ #else
206
+ #define SQL_UNICODE SQL_WCHAR
207
+ #define SQL_UNICODE_VARCHAR SQL_WVARCHAR
208
+ #define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR
209
+ #define SQL_UNICODE_CHAR SQL_WCHAR
210
+ #endif /* ODBCVER >= 0x0300 */
211
+
212
+
213
+ #if (ODBCVER < 0x0300)
214
+ #define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR
215
+ #define SQL_TYPE_DRIVER_END SQL_UNICODE_LONGVARCHAR
216
+ #endif /* ODBCVER < 0x0300 */
217
+
218
+
219
+ #define SQL_SIGNED_OFFSET (-20)
220
+ #define SQL_UNSIGNED_OFFSET (-22)
221
+
222
+
223
+ /*
224
+ * C datatype to SQL datatype mapping
225
+ */
226
+ #define SQL_C_CHAR SQL_CHAR
227
+ #define SQL_C_LONG SQL_INTEGER
228
+ #define SQL_C_SHORT SQL_SMALLINT
229
+ #define SQL_C_FLOAT SQL_REAL
230
+ #define SQL_C_DOUBLE SQL_DOUBLE
231
+ #if (ODBCVER >= 0x0300)
232
+ #define SQL_C_NUMERIC SQL_NUMERIC
233
+ #endif /* ODBCVER >= 0x0300 */
234
+ #define SQL_C_DEFAULT 99
235
+
236
+
237
+ #define SQL_C_DATE SQL_DATE
238
+ #define SQL_C_TIME SQL_TIME
239
+ #define SQL_C_TIMESTAMP SQL_TIMESTAMP
240
+ #define SQL_C_BINARY SQL_BINARY
241
+ #define SQL_C_BIT SQL_BIT
242
+ #define SQL_C_TINYINT SQL_TINYINT
243
+ #define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET)
244
+ #define SQL_C_SSHORT (SQL_C_SHORT+SQL_SIGNED_OFFSET)
245
+ #define SQL_C_STINYINT (SQL_TINYINT+SQL_SIGNED_OFFSET)
246
+ #define SQL_C_ULONG (SQL_C_LONG+SQL_UNSIGNED_OFFSET)
247
+ #define SQL_C_USHORT (SQL_C_SHORT+SQL_UNSIGNED_OFFSET)
248
+ #define SQL_C_UTINYINT (SQL_TINYINT+SQL_UNSIGNED_OFFSET)
249
+
250
+ #if defined(_WIN64)
251
+ #define SQL_C_BOOKMARK SQL_C_UBIGINT
252
+ #else
253
+ #define SQL_C_BOOKMARK SQL_C_ULONG
254
+ #endif
255
+
256
+ #if (ODBCVER >= 0x0300)
257
+ #define SQL_C_TYPE_DATE SQL_TYPE_DATE
258
+ #define SQL_C_TYPE_TIME SQL_TYPE_TIME
259
+ #define SQL_C_TYPE_TIMESTAMP SQL_TYPE_TIMESTAMP
260
+ #define SQL_C_INTERVAL_YEAR SQL_INTERVAL_YEAR
261
+ #define SQL_C_INTERVAL_MONTH SQL_INTERVAL_MONTH
262
+ #define SQL_C_INTERVAL_DAY SQL_INTERVAL_DAY
263
+ #define SQL_C_INTERVAL_HOUR SQL_INTERVAL_HOUR
264
+ #define SQL_C_INTERVAL_MINUTE SQL_INTERVAL_MINUTE
265
+ #define SQL_C_INTERVAL_SECOND SQL_INTERVAL_SECOND
266
+ #define SQL_C_INTERVAL_YEAR_TO_MONTH SQL_INTERVAL_YEAR_TO_MONTH
267
+ #define SQL_C_INTERVAL_DAY_TO_HOUR SQL_INTERVAL_DAY_TO_HOUR
268
+ #define SQL_C_INTERVAL_DAY_TO_MINUTE SQL_INTERVAL_DAY_TO_MINUTE
269
+ #define SQL_C_INTERVAL_DAY_TO_SECOND SQL_INTERVAL_DAY_TO_SECOND
270
+ #define SQL_C_INTERVAL_HOUR_TO_MINUTE SQL_INTERVAL_HOUR_TO_MINUTE
271
+ #define SQL_C_INTERVAL_HOUR_TO_SECOND SQL_INTERVAL_HOUR_TO_SECOND
272
+ #define SQL_C_INTERVAL_MINUTE_TO_SECOND SQL_INTERVAL_MINUTE_TO_SECOND
273
+ #define SQL_C_SBIGINT (SQL_BIGINT+SQL_SIGNED_OFFSET)
274
+ #define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET)
275
+ #define SQL_C_VARBOOKMARK SQL_C_BINARY
276
+ #endif /* ODBCVER >= 0x0300 */
277
+
278
+ #if (ODBCVER >= 0x0350)
279
+ #define SQL_C_GUID SQL_GUID
280
+ #endif
281
+
282
+ #define SQL_TYPE_NULL 0
283
+
284
+ #if (ODBCVER < 0x0300)
285
+ #define SQL_TYPE_MIN SQL_BIT
286
+ #define SQL_TYPE_MAX SQL_VARCHAR
287
+ #endif /* ODBCVER < 0x0300 */
288
+
289
+
290
+ /*
291
+ * ----------------------------------------------------------------------
292
+ * Level 1 Functions
293
+ * ----------------------------------------------------------------------
294
+ */
295
+
296
+ /*
297
+ * SQLBindParameter
298
+ */
299
+ #define SQL_DEFAULT_PARAM (-5)
300
+ #define SQL_IGNORE (-6)
301
+ #if (ODBCVER >= 0x0300)
302
+ #define SQL_COLUMN_IGNORE SQL_IGNORE
303
+ #endif /* ODBCVER >= 0x0300 */
304
+ #define SQL_LEN_DATA_AT_EXEC_OFFSET (-100)
305
+ #define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET)
306
+
307
+
308
+ /*
309
+ * binary length for driver specific attributes
310
+ */
311
+ #define SQL_LEN_BINARY_ATTR_OFFSET (-100)
312
+ #define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET)
313
+
314
+
315
+ /*
316
+ * SQLColAttributes - ODBC 2.x defines
317
+ */
318
+ #define SQL_COLUMN_COUNT 0
319
+ #define SQL_COLUMN_NAME 1
320
+ #define SQL_COLUMN_TYPE 2
321
+ #define SQL_COLUMN_LENGTH 3
322
+ #define SQL_COLUMN_PRECISION 4
323
+ #define SQL_COLUMN_SCALE 5
324
+ #define SQL_COLUMN_DISPLAY_SIZE 6
325
+ #define SQL_COLUMN_NULLABLE 7
326
+ #define SQL_COLUMN_UNSIGNED 8
327
+ #define SQL_COLUMN_MONEY 9
328
+ #define SQL_COLUMN_UPDATABLE 10
329
+ #define SQL_COLUMN_AUTO_INCREMENT 11
330
+ #define SQL_COLUMN_CASE_SENSITIVE 12
331
+ #define SQL_COLUMN_SEARCHABLE 13
332
+ #define SQL_COLUMN_TYPE_NAME 14
333
+ #define SQL_COLUMN_TABLE_NAME 15
334
+ #define SQL_COLUMN_OWNER_NAME 16
335
+ #define SQL_COLUMN_QUALIFIER_NAME 17
336
+ #define SQL_COLUMN_LABEL 18
337
+ #define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
338
+ #if (ODBCVER < 0x0300)
339
+ #define SQL_COLUMN_DRIVER_START 1000
340
+ #endif /* ODBCVER < 0x0300 */
341
+
342
+ #define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
343
+
344
+
345
+ /*
346
+ * SQLColAttributes - SQL_COLUMN_UPDATABLE
347
+ */
348
+ #define SQL_ATTR_READONLY 0
349
+ #define SQL_ATTR_WRITE 1
350
+ #define SQL_ATTR_READWRITE_UNKNOWN 2
351
+
352
+
353
+ /*
354
+ * SQLColAttributes - SQL_COLUMN_SEARCHABLE
355
+ */
356
+ #define SQL_UNSEARCHABLE 0
357
+ #define SQL_LIKE_ONLY 1
358
+ #define SQL_ALL_EXCEPT_LIKE 2
359
+ #define SQL_SEARCHABLE 3
360
+ #define SQL_PRED_SEARCHABLE SQL_SEARCHABLE
361
+
362
+
363
+ /*
364
+ * SQLDataSources - additional fetch directions
365
+ */
366
+ #if (ODBCVER >= 0x0300)
367
+ #define SQL_FETCH_FIRST_USER 31
368
+ #define SQL_FETCH_FIRST_SYSTEM 32
369
+ #endif /* ODBCVER >= 0x0300 */
370
+
371
+
372
+ /*
373
+ * SQLDriverConnect
374
+ */
375
+ #define SQL_DRIVER_NOPROMPT 0
376
+ #define SQL_DRIVER_COMPLETE 1
377
+ #define SQL_DRIVER_PROMPT 2
378
+ #define SQL_DRIVER_COMPLETE_REQUIRED 3
379
+
380
+
381
+ /*
382
+ * SQLGetConnectAttr - ODBC 2.x attributes
383
+ */
384
+ #define SQL_ACCESS_MODE 101
385
+ #define SQL_AUTOCOMMIT 102
386
+ #define SQL_LOGIN_TIMEOUT 103
387
+ #define SQL_OPT_TRACE 104
388
+ #define SQL_OPT_TRACEFILE 105
389
+ #define SQL_TRANSLATE_DLL 106
390
+ #define SQL_TRANSLATE_OPTION 107
391
+ #define SQL_TXN_ISOLATION 108
392
+ #define SQL_CURRENT_QUALIFIER 109
393
+ #define SQL_ODBC_CURSORS 110
394
+ #define SQL_QUIET_MODE 111
395
+ #define SQL_PACKET_SIZE 112
396
+
397
+
398
+ /*
399
+ * SQLGetConnectAttr - ODBC 3.0 attributes
400
+ */
401
+ #if (ODBCVER >= 0x0300)
402
+ #define SQL_ATTR_ACCESS_MODE SQL_ACCESS_MODE
403
+ #define SQL_ATTR_AUTOCOMMIT SQL_AUTOCOMMIT
404
+ #define SQL_ATTR_CONNECTION_TIMEOUT 113
405
+ #define SQL_ATTR_CURRENT_CATALOG SQL_CURRENT_QUALIFIER
406
+ #define SQL_ATTR_DISCONNECT_BEHAVIOR 114
407
+ #define SQL_ATTR_ENLIST_IN_DTC 1207
408
+ #define SQL_ATTR_ENLIST_IN_XA 1208
409
+ #define SQL_ATTR_LOGIN_TIMEOUT SQL_LOGIN_TIMEOUT
410
+ #define SQL_ATTR_ODBC_CURSORS SQL_ODBC_CURSORS
411
+ #define SQL_ATTR_PACKET_SIZE SQL_PACKET_SIZE
412
+ #define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE
413
+ #define SQL_ATTR_TRACE SQL_OPT_TRACE
414
+ #define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE
415
+ #define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL
416
+ #define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION
417
+ #define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION
418
+ #endif /* ODBCVER >= 0x0300 */
419
+
420
+ #define SQL_ATTR_CONNECTION_DEAD 1209 /* GetConnectAttr only */
421
+
422
+
423
+ /*
424
+ * These options have no meaning for a 3.0 driver
425
+ */
426
+ #if (ODBCVER < 0x0300)
427
+ #define SQL_CONN_OPT_MIN SQL_ACCESS_MODE
428
+ #define SQL_CONN_OPT_MAX SQL_PACKET_SIZE
429
+ #define SQL_CONNECT_OPT_DRVR_START 1000
430
+ #endif /* ODBCVER < 0x0300 */
431
+
432
+
433
+ /*
434
+ * SQLGetConnectAttr - SQL_ACCESS_MODE
435
+ */
436
+ #define SQL_MODE_READ_WRITE 0UL
437
+ #define SQL_MODE_READ_ONLY 1UL
438
+ #define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE
439
+
440
+
441
+ /*
442
+ * SQLGetConnectAttr - SQL_AUTOCOMMIT
443
+ */
444
+ #define SQL_AUTOCOMMIT_OFF 0UL
445
+ #define SQL_AUTOCOMMIT_ON 1UL
446
+ #define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON
447
+
448
+
449
+ /*
450
+ * SQLGetConnectAttr - SQL_LOGIN_TIMEOUT
451
+ */
452
+ #define SQL_LOGIN_TIMEOUT_DEFAULT 15UL
453
+
454
+
455
+ /*
456
+ * SQLGetConnectAttr - SQL_ODBC_CURSORS
457
+ */
458
+ #define SQL_CUR_USE_IF_NEEDED 0UL
459
+ #define SQL_CUR_USE_ODBC 1UL
460
+ #define SQL_CUR_USE_DRIVER 2UL
461
+ #define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER
462
+
463
+
464
+ /*
465
+ * SQLGetConnectAttr - SQL_OPT_TRACE
466
+ */
467
+ #define SQL_OPT_TRACE_OFF 0UL
468
+ #define SQL_OPT_TRACE_ON 1UL
469
+ #define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF
470
+ #if defined (WIN32)
471
+ #define SQL_OPT_TRACE_FILE_DEFAULT "\\SQL.LOG"
472
+ #define SQL_OPT_TRACE_FILE_DEFAULTW L"\\SQL.LOG"
473
+ #else
474
+ #define SQL_OPT_TRACE_FILE_DEFAULT "/tmp/odbc.log"
475
+ #define SQL_OPT_TRACE_FILE_DEFAULTW L"/tmp/odbc.log"
476
+ #endif
477
+
478
+
479
+ /*
480
+ * SQLGetConnectAttr - SQL_ATTR_ANSI_APP
481
+ */
482
+ #if (ODBCVER >= 0x0351)
483
+ #define SQL_AA_TRUE 1L /* ANSI app */
484
+ #define SQL_AA_FALSE 0L /* Unicode app */
485
+ #endif
486
+
487
+
488
+ /*
489
+ * SQLGetConnectAttr - SQL_ATTR_CONNECTION_DEAD
490
+ */
491
+ #define SQL_CD_TRUE 1L /* closed/dead */
492
+ #define SQL_CD_FALSE 0L /* open/available */
493
+
494
+
495
+ /*
496
+ * SQLGetConnectAttr - SQL_ATTR_DISCONNECT_BEHAVIOR
497
+ */
498
+ #if (ODBCVER >= 0x0300)
499
+ #define SQL_DB_RETURN_TO_POOL 0UL
500
+ #define SQL_DB_DISCONNECT 1UL
501
+ #define SQL_DB_DEFAULT SQL_DB_RETURN_TO_POOL
502
+ #endif /* ODBCVER >= 0x0300 */
503
+
504
+
505
+ /*
506
+ * SQLGetConnectAttr - SQL_ATTR_ENLIST_IN_DTC
507
+ */
508
+ #if (ODBCVER >= 0x0300)
509
+ #define SQL_DTC_DONE 0L
510
+ #endif /* ODBCVER >= 0x0300 */
511
+
512
+
513
+ /*
514
+ * SQLGetConnectAttr - Unicode drivers
515
+ */
516
+ #if (ODBCVER >= 0x0351)
517
+ #define SQL_ATTR_ANSI_APP 115
518
+ #endif
519
+
520
+
521
+ /*
522
+ * SQLGetData
523
+ */
524
+ #define SQL_NO_TOTAL (-4)
525
+
526
+
527
+ /*
528
+ * SQLGetDescField - extended descriptor field
529
+ */
530
+ #if (ODBCVER >= 0x0300)
531
+ #define SQL_DESC_ARRAY_SIZE 20
532
+ #define SQL_DESC_ARRAY_STATUS_PTR 21
533
+ #define SQL_DESC_AUTO_UNIQUE_VALUE SQL_COLUMN_AUTO_INCREMENT
534
+ #define SQL_DESC_BASE_COLUMN_NAME 22
535
+ #define SQL_DESC_BASE_TABLE_NAME 23
536
+ #define SQL_DESC_BIND_OFFSET_PTR 24
537
+ #define SQL_DESC_BIND_TYPE 25
538
+ #define SQL_DESC_CASE_SENSITIVE SQL_COLUMN_CASE_SENSITIVE
539
+ #define SQL_DESC_CATALOG_NAME SQL_COLUMN_QUALIFIER_NAME
540
+ #define SQL_DESC_CONCISE_TYPE SQL_COLUMN_TYPE
541
+ #define SQL_DESC_DATETIME_INTERVAL_PRECISION 26
542
+ #define SQL_DESC_DISPLAY_SIZE SQL_COLUMN_DISPLAY_SIZE
543
+ #define SQL_DESC_FIXED_PREC_SCALE SQL_COLUMN_MONEY
544
+ #define SQL_DESC_LABEL SQL_COLUMN_LABEL
545
+ #define SQL_DESC_LITERAL_PREFIX 27
546
+ #define SQL_DESC_LITERAL_SUFFIX 28
547
+ #define SQL_DESC_LOCAL_TYPE_NAME 29
548
+ #define SQL_DESC_MAXIMUM_SCALE 30
549
+ #define SQL_DESC_MINIMUM_SCALE 31
550
+ #define SQL_DESC_NUM_PREC_RADIX 32
551
+ #define SQL_DESC_PARAMETER_TYPE 33
552
+ #define SQL_DESC_ROWS_PROCESSED_PTR 34
553
+ #if (ODBCVER >= 0x0350)
554
+ #define SQL_DESC_ROWVER 35
555
+ #endif /* ODBCVER >= 0x0350 */
556
+ #define SQL_DESC_SCHEMA_NAME SQL_COLUMN_OWNER_NAME
557
+ #define SQL_DESC_SEARCHABLE SQL_COLUMN_SEARCHABLE
558
+ #define SQL_DESC_TYPE_NAME SQL_COLUMN_TYPE_NAME
559
+ #define SQL_DESC_TABLE_NAME SQL_COLUMN_TABLE_NAME
560
+ #define SQL_DESC_UNSIGNED SQL_COLUMN_UNSIGNED
561
+ #define SQL_DESC_UPDATABLE SQL_COLUMN_UPDATABLE
562
+ #endif /* ODBCVER >= 0x0300 */
563
+
564
+
565
+ /*
566
+ * SQLGetDiagField - defines for diagnostics fields
567
+ */
568
+ #if (ODBCVER >= 0x0300)
569
+ #define SQL_DIAG_CURSOR_ROW_COUNT (-1249)
570
+ #define SQL_DIAG_ROW_NUMBER (-1248)
571
+ #define SQL_DIAG_COLUMN_NUMBER (-1247)
572
+ #endif /* ODBCVER >= 0x0300 */
573
+
574
+
575
+ /*
576
+ * SQLGetDiagField - SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER
577
+ */
578
+ #if (ODBCVER >= 0x0300)
579
+ #define SQL_NO_ROW_NUMBER (-1)
580
+ #define SQL_NO_COLUMN_NUMBER (-1)
581
+ #define SQL_ROW_NUMBER_UNKNOWN (-2)
582
+ #define SQL_COLUMN_NUMBER_UNKNOWN (-2)
583
+ #endif
584
+
585
+
586
+ #if (ODBCVER >= 0x0300)
587
+ /*
588
+ * SQLGetEnvAttr - Attributes
589
+ */
590
+ #define SQL_ATTR_ODBC_VERSION 200
591
+ #define SQL_ATTR_CONNECTION_POOLING 201
592
+ #define SQL_ATTR_CP_MATCH 202
593
+
594
+
595
+ /*
596
+ * SQLGetEnvAttr - SQL_ATTR_ODBC_VERSION
597
+ */
598
+ #define SQL_OV_ODBC2 2UL
599
+ #define SQL_OV_ODBC3 3UL
600
+
601
+
602
+ /*
603
+ * SQLGetEnvAttr - SQL_ATTR_CONNECTION_POOLING
604
+ */
605
+ #define SQL_CP_OFF 0UL
606
+ #define SQL_CP_ONE_PER_DRIVER 1UL
607
+ #define SQL_CP_ONE_PER_HENV 2UL
608
+ #define SQL_CP_DEFAULT SQL_CP_OFF
609
+
610
+
611
+ /*
612
+ * SQLGetEnvAttr - SQL_ATTR_CP_MATCH
613
+ */
614
+ #define SQL_CP_STRICT_MATCH 0UL
615
+ #define SQL_CP_RELAXED_MATCH 1UL
616
+ #define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH
617
+ #endif /* ODBCVER >= 0x0300 */
618
+
619
+
620
+ /*
621
+ * SQLGetFunctions - extensions to the X/Open specification
622
+ */
623
+ #if (ODBCVER >= 0x0300)
624
+ #define SQL_API_SQLALLOCHANDLESTD 73
625
+ #define SQL_API_SQLBULKOPERATIONS 24
626
+ #endif /* ODBCVER >= 0x0300 */
627
+ #define SQL_API_SQLBINDPARAMETER 72
628
+ #define SQL_API_SQLBROWSECONNECT 55
629
+ #define SQL_API_SQLCOLATTRIBUTES 6
630
+ #define SQL_API_SQLCOLUMNPRIVILEGES 56
631
+ #define SQL_API_SQLDESCRIBEPARAM 58
632
+ #define SQL_API_SQLDRIVERCONNECT 41
633
+ #define SQL_API_SQLDRIVERS 71
634
+ #define SQL_API_SQLEXTENDEDFETCH 59
635
+ #define SQL_API_SQLFOREIGNKEYS 60
636
+ #define SQL_API_SQLMORERESULTS 61
637
+ #define SQL_API_SQLNATIVESQL 62
638
+ #define SQL_API_SQLNUMPARAMS 63
639
+ #define SQL_API_SQLPARAMOPTIONS 64
640
+ #define SQL_API_SQLPRIMARYKEYS 65
641
+ #define SQL_API_SQLPROCEDURECOLUMNS 66
642
+ #define SQL_API_SQLPROCEDURES 67
643
+ #define SQL_API_SQLSETPOS 68
644
+ #define SQL_API_SQLSETSCROLLOPTIONS 69
645
+ #define SQL_API_SQLTABLEPRIVILEGES 70
646
+
647
+
648
+ /*
649
+ * These are not useful anymore as the X/Open specification defines
650
+ * functions in the 10000 range
651
+ */
652
+ #if (ODBCVER < 0x0300)
653
+ #define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER
654
+ #define SQL_NUM_FUNCTIONS 23
655
+ #define SQL_EXT_API_START 40
656
+ #define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1)
657
+ #endif /* ODBCVER < 0x0300 */
658
+
659
+
660
+ /*
661
+ * SQLGetFunctions - ODBC version 2.x and earlier
662
+ */
663
+ #define SQL_API_ALL_FUNCTIONS 0
664
+
665
+
666
+ /*
667
+ * Loading by ordinal is not supported for 3.0 and above drivers
668
+ */
669
+ #define SQL_API_LOADBYORDINAL 199
670
+
671
+
672
+ /*
673
+ * SQLGetFunctions - SQL_API_ODBC3_ALL_FUNCTIONS
674
+ */
675
+ #if (ODBCVER >= 0x0300)
676
+ #define SQL_API_ODBC3_ALL_FUNCTIONS 999
677
+ #define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250
678
+
679
+ #define SQL_FUNC_EXISTS(pfExists, uwAPI) \
680
+ ((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) & (1 << ((uwAPI) & 0x000F))) \
681
+ ? SQL_TRUE : SQL_FALSE)
682
+ #endif /* ODBCVER >= 0x0300 */
683
+
684
+
685
+ /*
686
+ * SQLGetInfo - ODBC 2.x extensions to the X/Open standard
687
+ */
688
+ #define SQL_INFO_FIRST 0
689
+ #define SQL_ACTIVE_CONNECTIONS 0 /* MAX_DRIVER_CONNECTIONS */
690
+ #define SQL_ACTIVE_STATEMENTS 1 /* MAX_CONCURRENT_ACTIVITIES */
691
+ #define SQL_DRIVER_HDBC 3
692
+ #define SQL_DRIVER_HENV 4
693
+ #define SQL_DRIVER_HSTMT 5
694
+ #define SQL_DRIVER_NAME 6
695
+ #define SQL_DRIVER_VER 7
696
+ #define SQL_ODBC_API_CONFORMANCE 9
697
+ #define SQL_ODBC_VER 10
698
+ #define SQL_ROW_UPDATES 11
699
+ #define SQL_ODBC_SAG_CLI_CONFORMANCE 12
700
+ #define SQL_ODBC_SQL_CONFORMANCE 15
701
+ #define SQL_PROCEDURES 21
702
+ #define SQL_CONCAT_NULL_BEHAVIOR 22
703
+ #define SQL_CURSOR_ROLLBACK_BEHAVIOR 24
704
+ #define SQL_EXPRESSIONS_IN_ORDERBY 27
705
+ #define SQL_MAX_OWNER_NAME_LEN 32 /* MAX_SCHEMA_NAME_LEN */
706
+ #define SQL_MAX_PROCEDURE_NAME_LEN 33
707
+ #define SQL_MAX_QUALIFIER_NAME_LEN 34 /* MAX_CATALOG_NAME_LEN */
708
+ #define SQL_MULT_RESULT_SETS 36
709
+ #define SQL_MULTIPLE_ACTIVE_TXN 37
710
+ #define SQL_OUTER_JOINS 38
711
+ #define SQL_OWNER_TERM 39
712
+ #define SQL_PROCEDURE_TERM 40
713
+ #define SQL_QUALIFIER_NAME_SEPARATOR 41
714
+ #define SQL_QUALIFIER_TERM 42
715
+ #define SQL_SCROLL_OPTIONS 44
716
+ #define SQL_TABLE_TERM 45
717
+ #define SQL_CONVERT_FUNCTIONS 48
718
+ #define SQL_NUMERIC_FUNCTIONS 49
719
+ #define SQL_STRING_FUNCTIONS 50
720
+ #define SQL_SYSTEM_FUNCTIONS 51
721
+ #define SQL_TIMEDATE_FUNCTIONS 52
722
+ #define SQL_CONVERT_BIGINT 53
723
+ #define SQL_CONVERT_BINARY 54
724
+ #define SQL_CONVERT_BIT 55
725
+ #define SQL_CONVERT_CHAR 56
726
+ #define SQL_CONVERT_DATE 57
727
+ #define SQL_CONVERT_DECIMAL 58
728
+ #define SQL_CONVERT_DOUBLE 59
729
+ #define SQL_CONVERT_FLOAT 60
730
+ #define SQL_CONVERT_INTEGER 61
731
+ #define SQL_CONVERT_LONGVARCHAR 62
732
+ #define SQL_CONVERT_NUMERIC 63
733
+ #define SQL_CONVERT_REAL 64
734
+ #define SQL_CONVERT_SMALLINT 65
735
+ #define SQL_CONVERT_TIME 66
736
+ #define SQL_CONVERT_TIMESTAMP 67
737
+ #define SQL_CONVERT_TINYINT 68
738
+ #define SQL_CONVERT_VARBINARY 69
739
+ #define SQL_CONVERT_VARCHAR 70
740
+ #define SQL_CONVERT_LONGVARBINARY 71
741
+ #define SQL_ODBC_SQL_OPT_IEF 73 /* SQL_INTEGRITY */
742
+ #define SQL_CORRELATION_NAME 74
743
+ #define SQL_NON_NULLABLE_COLUMNS 75
744
+ #define SQL_DRIVER_HLIB 76
745
+ #define SQL_DRIVER_ODBC_VER 77
746
+ #define SQL_LOCK_TYPES 78
747
+ #define SQL_POS_OPERATIONS 79
748
+ #define SQL_POSITIONED_STATEMENTS 80
749
+ #define SQL_BOOKMARK_PERSISTENCE 82
750
+ #define SQL_STATIC_SENSITIVITY 83
751
+ #define SQL_FILE_USAGE 84
752
+ #define SQL_COLUMN_ALIAS 87
753
+ #define SQL_GROUP_BY 88
754
+ #define SQL_KEYWORDS 89
755
+ #define SQL_OWNER_USAGE 91
756
+ #define SQL_QUALIFIER_USAGE 92
757
+ #define SQL_QUOTED_IDENTIFIER_CASE 93
758
+ #define SQL_SUBQUERIES 95
759
+ #define SQL_UNION 96
760
+ #define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103
761
+ #define SQL_MAX_CHAR_LITERAL_LEN 108
762
+ #define SQL_TIMEDATE_ADD_INTERVALS 109
763
+ #define SQL_TIMEDATE_DIFF_INTERVALS 110
764
+ #define SQL_NEED_LONG_DATA_LEN 111
765
+ #define SQL_MAX_BINARY_LITERAL_LEN 112
766
+ #define SQL_LIKE_ESCAPE_CLAUSE 113
767
+ #define SQL_QUALIFIER_LOCATION 114
768
+
769
+ #if (ODBCVER >= 0x0201 && ODBCVER < 0x0300)
770
+ #define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */
771
+ #endif /* ODBCVER >= 0x0201 && ODBCVER < 0x0300 */
772
+
773
+
774
+ /*
775
+ * These values are not useful anymore as X/Open defines values in the
776
+ * 10000 range
777
+ */
778
+ #if (ODBCVER < 0x0300)
779
+ #define SQL_INFO_LAST SQL_QUALIFIER_LOCATION
780
+ #define SQL_INFO_DRIVER_START 1000
781
+ #endif /* ODBCVER < 0x0300 */
782
+
783
+
784
+ /*
785
+ * SQLGetInfo - ODBC 3.x extensions to the X/Open standard
786
+ */
787
+ #if (ODBCVER >= 0x0300)
788
+ #define SQL_ACTIVE_ENVIRONMENTS 116
789
+ #define SQL_ALTER_DOMAIN 117
790
+
791
+ #define SQL_SQL_CONFORMANCE 118
792
+ #define SQL_DATETIME_LITERALS 119
793
+
794
+ #define SQL_ASYNC_MODE 10021 /* new X/Open spec */
795
+ #define SQL_BATCH_ROW_COUNT 120
796
+ #define SQL_BATCH_SUPPORT 121
797
+ #define SQL_CATALOG_LOCATION SQL_QUALIFIER_LOCATION
798
+ #define SQL_CATALOG_NAME_SEPARATOR SQL_QUALIFIER_NAME_SEPARATOR
799
+ #define SQL_CATALOG_TERM SQL_QUALIFIER_TERM
800
+ #define SQL_CATALOG_USAGE SQL_QUALIFIER_USAGE
801
+ #define SQL_CONVERT_WCHAR 122
802
+ #define SQL_CONVERT_INTERVAL_DAY_TIME 123
803
+ #define SQL_CONVERT_INTERVAL_YEAR_MONTH 124
804
+ #define SQL_CONVERT_WLONGVARCHAR 125
805
+ #define SQL_CONVERT_WVARCHAR 126
806
+ #define SQL_CREATE_ASSERTION 127
807
+ #define SQL_CREATE_CHARACTER_SET 128
808
+ #define SQL_CREATE_COLLATION 129
809
+ #define SQL_CREATE_DOMAIN 130
810
+ #define SQL_CREATE_SCHEMA 131
811
+ #define SQL_CREATE_TABLE 132
812
+ #define SQL_CREATE_TRANSLATION 133
813
+ #define SQL_CREATE_VIEW 134
814
+ #define SQL_DRIVER_HDESC 135
815
+ #define SQL_DROP_ASSERTION 136
816
+ #define SQL_DROP_CHARACTER_SET 137
817
+ #define SQL_DROP_COLLATION 138
818
+ #define SQL_DROP_DOMAIN 139
819
+ #define SQL_DROP_SCHEMA 140
820
+ #define SQL_DROP_TABLE 141
821
+ #define SQL_DROP_TRANSLATION 142
822
+ #define SQL_DROP_VIEW 143
823
+ #define SQL_DYNAMIC_CURSOR_ATTRIBUTES1 144
824
+ #define SQL_DYNAMIC_CURSOR_ATTRIBUTES2 145
825
+ #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 146
826
+ #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 147
827
+ #define SQL_INDEX_KEYWORDS 148
828
+ #define SQL_INFO_SCHEMA_VIEWS 149
829
+ #define SQL_KEYSET_CURSOR_ATTRIBUTES1 150
830
+ #define SQL_KEYSET_CURSOR_ATTRIBUTES2 151
831
+ #define SQL_MAX_ASYNC_CONCURRENT_STATEMENTS 10022 /* new X/Open spec */
832
+ #define SQL_ODBC_INTERFACE_CONFORMANCE 152
833
+ #define SQL_PARAM_ARRAY_ROW_COUNTS 153
834
+ #define SQL_PARAM_ARRAY_SELECTS 154
835
+ #define SQL_SCHEMA_TERM SQL_OWNER_TERM
836
+ #define SQL_SCHEMA_USAGE SQL_OWNER_USAGE
837
+ #define SQL_SQL92_DATETIME_FUNCTIONS 155
838
+ #define SQL_SQL92_FOREIGN_KEY_DELETE_RULE 156
839
+ #define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE 157
840
+ #define SQL_SQL92_GRANT 158
841
+ #define SQL_SQL92_NUMERIC_VALUE_FUNCTIONS 159
842
+ #define SQL_SQL92_PREDICATES 160
843
+ #define SQL_SQL92_RELATIONAL_JOIN_OPERATORS 161
844
+ #define SQL_SQL92_REVOKE 162
845
+ #define SQL_SQL92_ROW_VALUE_CONSTRUCTOR 163
846
+ #define SQL_SQL92_STRING_FUNCTIONS 164
847
+ #define SQL_SQL92_VALUE_EXPRESSIONS 165
848
+ #define SQL_STANDARD_CLI_CONFORMANCE 166
849
+ #define SQL_STATIC_CURSOR_ATTRIBUTES1 167
850
+ #define SQL_STATIC_CURSOR_ATTRIBUTES2 168
851
+
852
+ #define SQL_AGGREGATE_FUNCTIONS 169
853
+ #define SQL_DDL_INDEX 170
854
+ #define SQL_DM_VER 171
855
+ #define SQL_INSERT_STATEMENT 172
856
+ #define SQL_UNION_STATEMENT SQL_UNION
857
+
858
+ #endif /* ODBCVER >= 0x0300 */
859
+
860
+ #define SQL_DTC_TRANSITION_COST 1750
861
+
862
+
863
+ /*
864
+ * SQLGetInfo - SQL_AGGREGATE_FUNCTIONS
865
+ */
866
+ #if (ODBCVER >= 0x0300)
867
+ #define SQL_AF_AVG 0x00000001L
868
+ #define SQL_AF_COUNT 0x00000002L
869
+ #define SQL_AF_MAX 0x00000004L
870
+ #define SQL_AF_MIN 0x00000008L
871
+ #define SQL_AF_SUM 0x00000010L
872
+ #define SQL_AF_DISTINCT 0x00000020L
873
+ #define SQL_AF_ALL 0x00000040L
874
+ #endif /* ODBCVER >= 0x0300 */
875
+
876
+ /*
877
+ * SQLGetInfo - SQL_ALTER_DOMAIN
878
+ */
879
+ #if (ODBCVER >= 0x0300)
880
+ #define SQL_AD_CONSTRAINT_NAME_DEFINITION 0x00000001L
881
+ #define SQL_AD_ADD_DOMAIN_CONSTRAINT 0x00000002L
882
+ #define SQL_AD_DROP_DOMAIN_CONSTRAINT 0x00000004L
883
+ #define SQL_AD_ADD_DOMAIN_DEFAULT 0x00000008L
884
+ #define SQL_AD_DROP_DOMAIN_DEFAULT 0x00000010L
885
+ #define SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
886
+ #define SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
887
+ #define SQL_AD_ADD_CONSTRAINT_DEFERRABLE 0x00000080L
888
+ #define SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE 0x00000100L
889
+ #endif /* ODBCVER >= 0x0300 */
890
+
891
+
892
+ /*
893
+ * SQLGetInfo - SQL_ALTER_TABLE
894
+ */
895
+ #if (ODBCVER >= 0x0300)
896
+ /*
897
+ * The following 5 bitmasks are defined in sql.h
898
+ *
899
+ * #define SQL_AT_ADD_COLUMN 0x00000001L
900
+ * #define SQL_AT_DROP_COLUMN 0x00000002L
901
+ * #define SQL_AT_ADD_CONSTRAINT 0x00000008L
902
+ */
903
+ #define SQL_AT_ADD_COLUMN_SINGLE 0x00000020L
904
+ #define SQL_AT_ADD_COLUMN_DEFAULT 0x00000040L
905
+ #define SQL_AT_ADD_COLUMN_COLLATION 0x00000080L
906
+ #define SQL_AT_SET_COLUMN_DEFAULT 0x00000100L
907
+ #define SQL_AT_DROP_COLUMN_DEFAULT 0x00000200L
908
+ #define SQL_AT_DROP_COLUMN_CASCADE 0x00000400L
909
+ #define SQL_AT_DROP_COLUMN_RESTRICT 0x00000800L
910
+ #define SQL_AT_ADD_TABLE_CONSTRAINT 0x00001000L
911
+ #define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE 0x00002000L
912
+ #define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT 0x00004000L
913
+ #define SQL_AT_CONSTRAINT_NAME_DEFINITION 0x00008000L
914
+ #define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED 0x00010000L
915
+ #define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00020000L
916
+ #define SQL_AT_CONSTRAINT_DEFERRABLE 0x00040000L
917
+ #define SQL_AT_CONSTRAINT_NON_DEFERRABLE 0x00080000L
918
+ #endif /* ODBCVER >= 0x0300 */
919
+
920
+
921
+ /*
922
+ * SQLGetInfo - SQL_ASYNC_MODE
923
+ */
924
+ #if (ODBCVER >= 0x0300)
925
+ #define SQL_AM_NONE 0
926
+ #define SQL_AM_CONNECTION 1
927
+ #define SQL_AM_STATEMENT 2
928
+ #endif /* ODBCVER >= 0x0300 */
929
+
930
+
931
+ /*
932
+ * SQLGetInfo - SQL_BATCH_ROW_COUNT
933
+ */
934
+ #if (ODBCVER >= 0x0300)
935
+ #define SQL_BRC_PROCEDURES 0x0000001
936
+ #define SQL_BRC_EXPLICIT 0x0000002
937
+ #define SQL_BRC_ROLLED_UP 0x0000004
938
+ #endif /* ODBCVER >= 0x0300 */
939
+
940
+
941
+ /*
942
+ * SQLGetInfo - SQL_BATCH_SUPPORT
943
+ */
944
+ #if (ODBCVER >= 0x0300)
945
+ #define SQL_BS_SELECT_EXPLICIT 0x00000001L
946
+ #define SQL_BS_ROW_COUNT_EXPLICIT 0x00000002L
947
+ #define SQL_BS_SELECT_PROC 0x00000004L
948
+ #define SQL_BS_ROW_COUNT_PROC 0x00000008L
949
+ #endif /* ODBCVER >= 0x0300 */
950
+
951
+
952
+ /*
953
+ * SQLGetInfo - SQL_BOOKMARK_PERSISTENCE
954
+ */
955
+ #define SQL_BP_CLOSE 0x00000001L
956
+ #define SQL_BP_DELETE 0x00000002L
957
+ #define SQL_BP_DROP 0x00000004L
958
+ #define SQL_BP_TRANSACTION 0x00000008L
959
+ #define SQL_BP_UPDATE 0x00000010L
960
+ #define SQL_BP_OTHER_HSTMT 0x00000020L
961
+ #define SQL_BP_SCROLL 0x00000040L
962
+
963
+
964
+ /*
965
+ * SQLGetInfo - SQL_CATALOG_LOCATION
966
+ */
967
+ #if (ODBCVER >= 0x0300)
968
+ #define SQL_CL_START SQL_QL_START
969
+ #define SQL_CL_END SQL_QL_END
970
+ #endif /* ODBCVER >= 0x0300 */
971
+
972
+
973
+ /*
974
+ * SQLGetInfo - SQL_CATALOG_USAGE
975
+ */
976
+ #if (ODBCVER >= 0x0300)
977
+ #define SQL_CU_DML_STATEMENTS SQL_QU_DML_STATEMENTS
978
+ #define SQL_CU_PROCEDURE_INVOCATION SQL_QU_PROCEDURE_INVOCATION
979
+ #define SQL_CU_TABLE_DEFINITION SQL_QU_TABLE_DEFINITION
980
+ #define SQL_CU_INDEX_DEFINITION SQL_QU_INDEX_DEFINITION
981
+ #define SQL_CU_PRIVILEGE_DEFINITION SQL_QU_PRIVILEGE_DEFINITION
982
+ #endif /* ODBCVER >= 0x0300 */
983
+
984
+
985
+ /*
986
+ * SQLGetInfo - SQL_CONCAT_NULL_BEHAVIOR
987
+ */
988
+ #define SQL_CB_NULL 0x0000
989
+ #define SQL_CB_NON_NULL 0x0001
990
+
991
+
992
+ /*
993
+ * SQLGetInfo - SQL_CONVERT_* bitmask values
994
+ */
995
+ #define SQL_CVT_CHAR 0x00000001L
996
+ #define SQL_CVT_NUMERIC 0x00000002L
997
+ #define SQL_CVT_DECIMAL 0x00000004L
998
+ #define SQL_CVT_INTEGER 0x00000008L
999
+ #define SQL_CVT_SMALLINT 0x00000010L
1000
+ #define SQL_CVT_FLOAT 0x00000020L
1001
+ #define SQL_CVT_REAL 0x00000040L
1002
+ #define SQL_CVT_DOUBLE 0x00000080L
1003
+ #define SQL_CVT_VARCHAR 0x00000100L
1004
+ #define SQL_CVT_LONGVARCHAR 0x00000200L
1005
+ #define SQL_CVT_BINARY 0x00000400L
1006
+ #define SQL_CVT_VARBINARY 0x00000800L
1007
+ #define SQL_CVT_BIT 0x00001000L
1008
+ #define SQL_CVT_TINYINT 0x00002000L
1009
+ #define SQL_CVT_BIGINT 0x00004000L
1010
+ #define SQL_CVT_DATE 0x00008000L
1011
+ #define SQL_CVT_TIME 0x00010000L
1012
+ #define SQL_CVT_TIMESTAMP 0x00020000L
1013
+ #define SQL_CVT_LONGVARBINARY 0x00040000L
1014
+ #if (ODBCVER >= 0x0300)
1015
+ #define SQL_CVT_INTERVAL_YEAR_MONTH 0x00080000L
1016
+ #define SQL_CVT_INTERVAL_DAY_TIME 0x00100000L
1017
+ #define SQL_CVT_WCHAR 0x00200000L
1018
+ #define SQL_CVT_WLONGVARCHAR 0x00400000L
1019
+ #define SQL_CVT_WVARCHAR 0x00800000L
1020
+ #endif /* ODBCVER >= 0x0300 */
1021
+
1022
+
1023
+ /*
1024
+ * SQLGetInfo - SQL_CONVERT_FUNCTIONS
1025
+ */
1026
+ #define SQL_FN_CVT_CONVERT 0x00000001L
1027
+ #if (ODBCVER >= 0x0300)
1028
+ #define SQL_FN_CVT_CAST 0x00000002L
1029
+ #endif /* ODBCVER >= 0x0300 */
1030
+
1031
+
1032
+ /*
1033
+ * SQLGetInfo - SQL_CORRELATION_NAME
1034
+ */
1035
+ #define SQL_CN_NONE 0x0000
1036
+ #define SQL_CN_DIFFERENT 0x0001
1037
+ #define SQL_CN_ANY 0x0002
1038
+
1039
+
1040
+ /*
1041
+ * SQLGetInfo - SQL_CREATE_ASSERTION
1042
+ */
1043
+ #if (ODBCVER >= 0x0300)
1044
+ #define SQL_CA_CREATE_ASSERTION 0x00000001L
1045
+ #define SQL_CA_CONSTRAINT_INITIALLY_DEFERRED 0x00000010L
1046
+ #define SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000020L
1047
+ #define SQL_CA_CONSTRAINT_DEFERRABLE 0x00000040L
1048
+ #define SQL_CA_CONSTRAINT_NON_DEFERRABLE 0x00000080L
1049
+ #endif /* ODBCVER >= 0x0300 */
1050
+
1051
+
1052
+ /*
1053
+ * SQLGetInfo - SQL_CREATE_CHARACTER_SET
1054
+ */
1055
+ #if (ODBCVER >= 0x0300)
1056
+ #define SQL_CCS_CREATE_CHARACTER_SET 0x00000001L
1057
+ #define SQL_CCS_COLLATE_CLAUSE 0x00000002L
1058
+ #define SQL_CCS_LIMITED_COLLATION 0x00000004L
1059
+ #endif /* ODBCVER >= 0x0300 */
1060
+
1061
+
1062
+ /*
1063
+ * SQLGetInfo - SQL_CREATE_COLLATION
1064
+ */
1065
+ #if (ODBCVER >= 0x0300)
1066
+ #define SQL_CCOL_CREATE_COLLATION 0x00000001L
1067
+ #endif /* ODBCVER >= 0x0300 */
1068
+
1069
+
1070
+ /*
1071
+ * SQLGetInfo - SQL_CREATE_DOMAIN
1072
+ */
1073
+ #if (ODBCVER >= 0x0300)
1074
+ #define SQL_CDO_CREATE_DOMAIN 0x00000001L
1075
+ #define SQL_CDO_DEFAULT 0x00000002L
1076
+ #define SQL_CDO_CONSTRAINT 0x00000004L
1077
+ #define SQL_CDO_COLLATION 0x00000008L
1078
+ #define SQL_CDO_CONSTRAINT_NAME_DEFINITION 0x00000010L
1079
+ #define SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
1080
+ #define SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
1081
+ #define SQL_CDO_CONSTRAINT_DEFERRABLE 0x00000080L
1082
+ #define SQL_CDO_CONSTRAINT_NON_DEFERRABLE 0x00000100L
1083
+ #endif /* ODBCVER >= 0x0300 */
1084
+
1085
+
1086
+ /*
1087
+ * SQLGetInfo - SQL_CREATE_SCHEMA
1088
+ */
1089
+ #if (ODBCVER >= 0x0300)
1090
+ #define SQL_CS_CREATE_SCHEMA 0x00000001L
1091
+ #define SQL_CS_AUTHORIZATION 0x00000002L
1092
+ #define SQL_CS_DEFAULT_CHARACTER_SET 0x00000004L
1093
+ #endif /* ODBCVER >= 0x0300 */
1094
+
1095
+
1096
+ /*
1097
+ * SQLGetInfo - SQL_CREATE_TABLE
1098
+ */
1099
+ #if (ODBCVER >= 0x0300)
1100
+ #define SQL_CT_CREATE_TABLE 0x00000001L
1101
+ #define SQL_CT_COMMIT_PRESERVE 0x00000002L
1102
+ #define SQL_CT_COMMIT_DELETE 0x00000004L
1103
+ #define SQL_CT_GLOBAL_TEMPORARY 0x00000008L
1104
+ #define SQL_CT_LOCAL_TEMPORARY 0x00000010L
1105
+ #define SQL_CT_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
1106
+ #define SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
1107
+ #define SQL_CT_CONSTRAINT_DEFERRABLE 0x00000080L
1108
+ #define SQL_CT_CONSTRAINT_NON_DEFERRABLE 0x00000100L
1109
+ #define SQL_CT_COLUMN_CONSTRAINT 0x00000200L
1110
+ #define SQL_CT_COLUMN_DEFAULT 0x00000400L
1111
+ #define SQL_CT_COLUMN_COLLATION 0x00000800L
1112
+ #define SQL_CT_TABLE_CONSTRAINT 0x00001000L
1113
+ #define SQL_CT_CONSTRAINT_NAME_DEFINITION 0x00002000L
1114
+ #endif /* ODBCVER >= 0x0300 */
1115
+
1116
+
1117
+ /*
1118
+ * SQLGetInfo - SQL_CREATE_TRANSLATION
1119
+ */
1120
+ #if (ODBCVER >= 0x0300)
1121
+ #define SQL_CTR_CREATE_TRANSLATION 0x00000001L
1122
+ #endif /* ODBCVER >= 0x0300 */
1123
+
1124
+
1125
+ /*
1126
+ * SQLGetInfo - SQL_CREATE_VIEW
1127
+ */
1128
+ #define SQL_CV_CREATE_VIEW 0x00000001L
1129
+ #define SQL_CV_CHECK_OPTION 0x00000002L
1130
+ #define SQL_CV_CASCADED 0x00000004L
1131
+ #define SQL_CV_LOCAL 0x00000008L
1132
+
1133
+
1134
+ /*
1135
+ * SQLGetInfo - SQL_DATETIME_LITERALS
1136
+ */
1137
+ #if (ODBCVER >= 0x0300)
1138
+ #define SQL_DL_SQL92_DATE 0x00000001L
1139
+ #define SQL_DL_SQL92_TIME 0x00000002L
1140
+ #define SQL_DL_SQL92_TIMESTAMP 0x00000004L
1141
+ #define SQL_DL_SQL92_INTERVAL_YEAR 0x00000008L
1142
+ #define SQL_DL_SQL92_INTERVAL_MONTH 0x00000010L
1143
+ #define SQL_DL_SQL92_INTERVAL_DAY 0x00000020L
1144
+ #define SQL_DL_SQL92_INTERVAL_HOUR 0x00000040L
1145
+ #define SQL_DL_SQL92_INTERVAL_MINUTE 0x00000080L
1146
+ #define SQL_DL_SQL92_INTERVAL_SECOND 0x00000100L
1147
+ #define SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH 0x00000200L
1148
+ #define SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR 0x00000400L
1149
+ #define SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE 0x00000800L
1150
+ #define SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND 0x00001000L
1151
+ #define SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE 0x00002000L
1152
+ #define SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND 0x00004000L
1153
+ #define SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND 0x00008000L
1154
+ #endif /* ODBCVER >= 0x0300 */
1155
+
1156
+
1157
+ /*
1158
+ * SQLGetInfo - SQL_DDL_INDEX
1159
+ */
1160
+ #if (ODBCVER >= 0x0300)
1161
+ #define SQL_DI_CREATE_INDEX 0x00000001L
1162
+ #define SQL_DI_DROP_INDEX 0x00000002L
1163
+ #endif /* ODBCVER >= 0x0300 */
1164
+
1165
+
1166
+ /*
1167
+ * SQLGetInfo - SQL_DROP_ASSERTION
1168
+ */
1169
+ #if (ODBCVER >= 0x0300)
1170
+ #define SQL_DA_DROP_ASSERTION 0x00000001L
1171
+ #endif /* ODBCVER >= 0x0300 */
1172
+
1173
+
1174
+ /*
1175
+ * SQLGetInfo - SQL_DROP_CHARACTER_SET
1176
+ */
1177
+ #if (ODBCVER >= 0x0300)
1178
+ #define SQL_DCS_DROP_CHARACTER_SET 0x00000001L
1179
+ #endif /* ODBCVER >= 0x0300 */
1180
+
1181
+
1182
+ /*
1183
+ * SQLGetInfo - SQL_DROP_COLLATION
1184
+ */
1185
+ #if (ODBCVER >= 0x0300)
1186
+ #define SQL_DC_DROP_COLLATION 0x00000001L
1187
+ #endif /* ODBCVER >= 0x0300 */
1188
+
1189
+
1190
+ /*
1191
+ * SQLGetInfo - SQL_DROP_DOMAIN
1192
+ */
1193
+ #if (ODBCVER >= 0x0300)
1194
+ #define SQL_DD_DROP_DOMAIN 0x00000001L
1195
+ #define SQL_DD_RESTRICT 0x00000002L
1196
+ #define SQL_DD_CASCADE 0x00000004L
1197
+ #endif /* ODBCVER >= 0x0300 */
1198
+
1199
+
1200
+ /*
1201
+ * SQLGetInfo - SQL_DROP_SCHEMA
1202
+ */
1203
+ #if (ODBCVER >= 0x0300)
1204
+ #define SQL_DS_DROP_SCHEMA 0x00000001L
1205
+ #define SQL_DS_RESTRICT 0x00000002L
1206
+ #define SQL_DS_CASCADE 0x00000004L
1207
+ #endif /* ODBCVER >= 0x0300 */
1208
+
1209
+
1210
+ /*
1211
+ * SQLGetInfo - SQL_DROP_TABLE
1212
+ */
1213
+ #if (ODBCVER >= 0x0300)
1214
+ #define SQL_DT_DROP_TABLE 0x00000001L
1215
+ #define SQL_DT_RESTRICT 0x00000002L
1216
+ #define SQL_DT_CASCADE 0x00000004L
1217
+ #endif /* ODBCVER >= 0x0300 */
1218
+
1219
+
1220
+ /*
1221
+ * SQLGetInfo - SQL_DROP_TRANSLATION
1222
+ */
1223
+ #if (ODBCVER >= 0x0300)
1224
+ #define SQL_DTR_DROP_TRANSLATION 0x00000001L
1225
+ #endif /* ODBCVER >= 0x0300 */
1226
+
1227
+
1228
+ /*
1229
+ * SQLGetInfo - SQL_DROP_VIEW
1230
+ */
1231
+ #if (ODBCVER >= 0x0300)
1232
+ #define SQL_DV_DROP_VIEW 0x00000001L
1233
+ #define SQL_DV_RESTRICT 0x00000002L
1234
+ #define SQL_DV_CASCADE 0x00000004L
1235
+ #endif /* ODBCVER >= 0x0300 */
1236
+
1237
+
1238
+ /*
1239
+ * SQLGetInfo - SQL_DTC_TRANSITION_COST
1240
+ */
1241
+ #define SQL_DTC_ENLIST_EXPENSIVE 0x00000001L
1242
+ #define SQL_DTC_UNENLIST_EXPENSIVE 0x00000002L
1243
+
1244
+
1245
+ /*
1246
+ * SQLGetInfo - SQL_DYNAMIC_CURSOR_ATTRIBUTES1
1247
+ * SQLGetInfo - SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1
1248
+ * SQLGetInfo - SQL_KEYSET_CURSOR_ATTRIBUTES1
1249
+ * SQLGetInfo - SQL_STATIC_CURSOR_ATTRIBUTES1
1250
+ */
1251
+ /*
1252
+ * SQLFetchScroll - FetchOrientation
1253
+ */
1254
+ #if (ODBCVER >= 0x0300)
1255
+ #define SQL_CA1_NEXT 0x00000001L
1256
+ #define SQL_CA1_ABSOLUTE 0x00000002L
1257
+ #define SQL_CA1_RELATIVE 0x00000004L
1258
+ #define SQL_CA1_BOOKMARK 0x00000008L
1259
+ #endif /* ODBCVER >= 0x0300 */
1260
+
1261
+
1262
+ /*
1263
+ * SQLSetPos - LockType
1264
+ */
1265
+ #if (ODBCVER >= 0x0300)
1266
+ #define SQL_CA1_LOCK_NO_CHANGE 0x00000040L
1267
+ #define SQL_CA1_LOCK_EXCLUSIVE 0x00000080L
1268
+ #define SQL_CA1_LOCK_UNLOCK 0x00000100L
1269
+ #endif /* ODBCVER >= 0x0300 */
1270
+
1271
+
1272
+ /*
1273
+ * SQLSetPos Operations
1274
+ */
1275
+ #if (ODBCVER >= 0x0300)
1276
+ #define SQL_CA1_POS_POSITION 0x00000200L
1277
+ #define SQL_CA1_POS_UPDATE 0x00000400L
1278
+ #define SQL_CA1_POS_DELETE 0x00000800L
1279
+ #define SQL_CA1_POS_REFRESH 0x00001000L
1280
+ #endif /* ODBCVER >= 0x0300 */
1281
+
1282
+
1283
+ /*
1284
+ * positioned updates and deletes
1285
+ */
1286
+ #if (ODBCVER >= 0x0300)
1287
+ #define SQL_CA1_POSITIONED_UPDATE 0x00002000L
1288
+ #define SQL_CA1_POSITIONED_DELETE 0x00004000L
1289
+ #define SQL_CA1_SELECT_FOR_UPDATE 0x00008000L
1290
+ #endif /* ODBCVER >= 0x0300 */
1291
+
1292
+
1293
+ /*
1294
+ * SQLBulkOperations operations
1295
+ */
1296
+ #if (ODBCVER >= 0x0300)
1297
+ #define SQL_CA1_BULK_ADD 0x00010000L
1298
+ #define SQL_CA1_BULK_UPDATE_BY_BOOKMARK 0x00020000L
1299
+ #define SQL_CA1_BULK_DELETE_BY_BOOKMARK 0x00040000L
1300
+ #define SQL_CA1_BULK_FETCH_BY_BOOKMARK 0x00080000L
1301
+ #endif /* ODBCVER >= 0x0300 */
1302
+
1303
+
1304
+ /*
1305
+ * SQLGetInfo - SQL_DYNAMIC_CURSOR_ATTRIBUTES2
1306
+ * SQLGetInfo - SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
1307
+ * SQLGetInfo - SQL_KEYSET_CURSOR_ATTRIBUTES2
1308
+ * SQLGetInfo - SQL_STATIC_CURSOR_ATTRIBUTES2
1309
+ */
1310
+ /*
1311
+ * SQL_ATTR_SCROLL_CONCURRENCY
1312
+ */
1313
+ #if (ODBCVER >= 0x0300)
1314
+ #define SQL_CA2_READ_ONLY_CONCURRENCY 0x00000001L
1315
+ #define SQL_CA2_LOCK_CONCURRENCY 0x00000002L
1316
+ #define SQL_CA2_OPT_ROWVER_CONCURRENCY 0x00000004L
1317
+ #define SQL_CA2_OPT_VALUES_CONCURRENCY 0x00000008L
1318
+ #endif /* ODBCVER >= 0x0300 */
1319
+
1320
+
1321
+ /*
1322
+ * sensitivity of the cursor to its own inserts, deletes, and updates
1323
+ */
1324
+ #if (ODBCVER >= 0x0300)
1325
+ #define SQL_CA2_SENSITIVITY_ADDITIONS 0x00000010L
1326
+ #define SQL_CA2_SENSITIVITY_DELETIONS 0x00000020L
1327
+ #define SQL_CA2_SENSITIVITY_UPDATES 0x00000040L
1328
+ #endif /* ODBCVER >= 0x0300 */
1329
+
1330
+
1331
+ /*
1332
+ * SQL_ATTR_MAX_ROWS
1333
+ */
1334
+ #if (ODBCVER >= 0x0300)
1335
+ #define SQL_CA2_MAX_ROWS_SELECT 0x00000080L
1336
+ #define SQL_CA2_MAX_ROWS_INSERT 0x00000100L
1337
+ #define SQL_CA2_MAX_ROWS_DELETE 0x00000200L
1338
+ #define SQL_CA2_MAX_ROWS_UPDATE 0x00000400L
1339
+ #define SQL_CA2_MAX_ROWS_CATALOG 0x00000800L
1340
+ #define SQL_CA2_MAX_ROWS_AFFECTS_ALL (SQL_CA2_MAX_ROWS_SELECT | \
1341
+ SQL_CA2_MAX_ROWS_INSERT | \
1342
+ SQL_CA2_MAX_ROWS_DELETE | \
1343
+ SQL_CA2_MAX_ROWS_UPDATE | \
1344
+ SQL_CA2_MAX_ROWS_CATALOG)
1345
+ #endif /* ODBCVER >= 0x0300 */
1346
+
1347
+
1348
+ /*
1349
+ * SQL_DIAG_CURSOR_ROW_COUNT
1350
+ */
1351
+ #if (ODBCVER >= 0x0300)
1352
+ #define SQL_CA2_CRC_EXACT 0x00001000L
1353
+ #define SQL_CA2_CRC_APPROXIMATE 0x00002000L
1354
+ #endif /* ODBCVER >= 0x0300 */
1355
+
1356
+
1357
+ /*
1358
+ * the kinds of positioned statements that can be simulated
1359
+ */
1360
+ #if (ODBCVER >= 0x0300)
1361
+ #define SQL_CA2_SIMULATE_NON_UNIQUE 0x00004000L
1362
+ #define SQL_CA2_SIMULATE_TRY_UNIQUE 0x00008000L
1363
+ #define SQL_CA2_SIMULATE_UNIQUE 0x00010000L
1364
+ #endif /* ODBCVER >= 0x0300 */
1365
+
1366
+
1367
+ /*
1368
+ * SQLGetInfo - SQL_FETCH_DIRECTION
1369
+ */
1370
+ #if (ODBCVER < 0x0300)
1371
+ #define SQL_FD_FETCH_RESUME 0x00000040L
1372
+ #endif /* ODBCVER < 0x0300 */
1373
+ #define SQL_FD_FETCH_BOOKMARK 0x00000080L
1374
+
1375
+
1376
+ /*
1377
+ * SQLGetInfo - SQL_FILE_USAGE
1378
+ */
1379
+ #define SQL_FILE_NOT_SUPPORTED 0x0000
1380
+ #define SQL_FILE_TABLE 0x0001
1381
+ #define SQL_FILE_QUALIFIER 0x0002
1382
+ #define SQL_FILE_CATALOG SQL_FILE_QUALIFIER
1383
+
1384
+
1385
+ /*
1386
+ * SQLGetInfo - SQL_GETDATA_EXTENSIONS
1387
+ */
1388
+ #define SQL_GD_BLOCK 0x00000004L
1389
+ #define SQL_GD_BOUND 0x00000008L
1390
+
1391
+
1392
+ /*
1393
+ * SQLGetInfo - SQL_GROUP_BY
1394
+ */
1395
+ #define SQL_GB_NOT_SUPPORTED 0x0000
1396
+ #define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001
1397
+ #define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002
1398
+ #define SQL_GB_NO_RELATION 0x0003
1399
+ #if (ODBCVER >= 0x0300)
1400
+ #define SQL_GB_COLLATE 0x0004
1401
+ #endif /* ODBCVER >= 0x0300 */
1402
+
1403
+
1404
+ /*
1405
+ * SQLGetInfo - SQL_INDEX_KEYWORDS
1406
+ */
1407
+ #if (ODBCVER >= 0x0300)
1408
+ #define SQL_IK_NONE 0x00000000L
1409
+ #define SQL_IK_ASC 0x00000001L
1410
+ #define SQL_IK_DESC 0x00000002L
1411
+ #define SQL_IK_ALL (SQL_IK_ASC | SQL_IK_DESC)
1412
+ #endif /* ODBCVER >= 0x0300 */
1413
+
1414
+
1415
+ /*
1416
+ * SQLGetInfo - SQL_INFO_SCHEMA_VIEWS
1417
+ */
1418
+ #if (ODBCVER >= 0x0300)
1419
+ #define SQL_ISV_ASSERTIONS 0x00000001L
1420
+ #define SQL_ISV_CHARACTER_SETS 0x00000002L
1421
+ #define SQL_ISV_CHECK_CONSTRAINTS 0x00000004L
1422
+ #define SQL_ISV_COLLATIONS 0x00000008L
1423
+ #define SQL_ISV_COLUMN_DOMAIN_USAGE 0x00000010L
1424
+ #define SQL_ISV_COLUMN_PRIVILEGES 0x00000020L
1425
+ #define SQL_ISV_COLUMNS 0x00000040L
1426
+ #define SQL_ISV_CONSTRAINT_COLUMN_USAGE 0x00000080L
1427
+ #define SQL_ISV_CONSTRAINT_TABLE_USAGE 0x00000100L
1428
+ #define SQL_ISV_DOMAIN_CONSTRAINTS 0x00000200L
1429
+ #define SQL_ISV_DOMAINS 0x00000400L
1430
+ #define SQL_ISV_KEY_COLUMN_USAGE 0x00000800L
1431
+ #define SQL_ISV_REFERENTIAL_CONSTRAINTS 0x00001000L
1432
+ #define SQL_ISV_SCHEMATA 0x00002000L
1433
+ #define SQL_ISV_SQL_LANGUAGES 0x00004000L
1434
+ #define SQL_ISV_TABLE_CONSTRAINTS 0x00008000L
1435
+ #define SQL_ISV_TABLE_PRIVILEGES 0x00010000L
1436
+ #define SQL_ISV_TABLES 0x00020000L
1437
+ #define SQL_ISV_TRANSLATIONS 0x00040000L
1438
+ #define SQL_ISV_USAGE_PRIVILEGES 0x00080000L
1439
+ #define SQL_ISV_VIEW_COLUMN_USAGE 0x00100000L
1440
+ #define SQL_ISV_VIEW_TABLE_USAGE 0x00200000L
1441
+ #define SQL_ISV_VIEWS 0x00400000L
1442
+ #endif /* ODBCVER >= 0x0300 */
1443
+
1444
+
1445
+ /*
1446
+ * SQLGetInfo - SQL_INSERT_STATEMENT
1447
+ */
1448
+ #if (ODBCVER >= 0x0300)
1449
+ #define SQL_IS_INSERT_LITERALS 0x00000001L
1450
+ #define SQL_IS_INSERT_SEARCHED 0x00000002L
1451
+ #define SQL_IS_SELECT_INTO 0x00000004L
1452
+ #endif /* ODBCVER >= 0x0300 */
1453
+
1454
+
1455
+ /*
1456
+ * SQLGetInfo - SQL_LOCK_TYPES
1457
+ */
1458
+ #define SQL_LCK_NO_CHANGE 0x00000001L
1459
+ #define SQL_LCK_EXCLUSIVE 0x00000002L
1460
+ #define SQL_LCK_UNLOCK 0x00000004L
1461
+
1462
+
1463
+ /*
1464
+ * SQLGetInfo - SQL_POS_OPERATIONS
1465
+ */
1466
+ #define SQL_POS_POSITION 0x00000001L
1467
+ #define SQL_POS_REFRESH 0x00000002L
1468
+ #define SQL_POS_UPDATE 0x00000004L
1469
+ #define SQL_POS_DELETE 0x00000008L
1470
+ #define SQL_POS_ADD 0x00000010L
1471
+
1472
+
1473
+ /*
1474
+ * SQLGetInfo - SQL_NON_NULLABLE_COLUMNS
1475
+ */
1476
+ #define SQL_NNC_NULL 0x0000
1477
+ #define SQL_NNC_NON_NULL 0x0001
1478
+
1479
+
1480
+ /*
1481
+ * SQLGetInfo - SQL_NULL_COLLATION
1482
+ */
1483
+ #define SQL_NC_START 0x0002
1484
+ #define SQL_NC_END 0x0004
1485
+
1486
+
1487
+ /*
1488
+ * SQLGetInfo - SQL_NUMERIC_FUNCTIONS
1489
+ */
1490
+ #define SQL_FN_NUM_ABS 0x00000001L
1491
+ #define SQL_FN_NUM_ACOS 0x00000002L
1492
+ #define SQL_FN_NUM_ASIN 0x00000004L
1493
+ #define SQL_FN_NUM_ATAN 0x00000008L
1494
+ #define SQL_FN_NUM_ATAN2 0x00000010L
1495
+ #define SQL_FN_NUM_CEILING 0x00000020L
1496
+ #define SQL_FN_NUM_COS 0x00000040L
1497
+ #define SQL_FN_NUM_COT 0x00000080L
1498
+ #define SQL_FN_NUM_EXP 0x00000100L
1499
+ #define SQL_FN_NUM_FLOOR 0x00000200L
1500
+ #define SQL_FN_NUM_LOG 0x00000400L
1501
+ #define SQL_FN_NUM_MOD 0x00000800L
1502
+ #define SQL_FN_NUM_SIGN 0x00001000L
1503
+ #define SQL_FN_NUM_SIN 0x00002000L
1504
+ #define SQL_FN_NUM_SQRT 0x00004000L
1505
+ #define SQL_FN_NUM_TAN 0x00008000L
1506
+ #define SQL_FN_NUM_PI 0x00010000L
1507
+ #define SQL_FN_NUM_RAND 0x00020000L
1508
+ #define SQL_FN_NUM_DEGREES 0x00040000L
1509
+ #define SQL_FN_NUM_LOG10 0x00080000L
1510
+ #define SQL_FN_NUM_POWER 0x00100000L
1511
+ #define SQL_FN_NUM_RADIANS 0x00200000L
1512
+ #define SQL_FN_NUM_ROUND 0x00400000L
1513
+ #define SQL_FN_NUM_TRUNCATE 0x00800000L
1514
+
1515
+
1516
+ /*
1517
+ * SQLGetInfo - SQL_ODBC_API_CONFORMANCE
1518
+ */
1519
+ #define SQL_OAC_NONE 0x0000
1520
+ #define SQL_OAC_LEVEL1 0x0001
1521
+ #define SQL_OAC_LEVEL2 0x0002
1522
+
1523
+
1524
+ /*
1525
+ * SQLGetInfo - SQL_ODBC_INTERFACE_CONFORMANCE
1526
+ */
1527
+ #if (ODBCVER >= 0x0300)
1528
+ #define SQL_OIC_CORE 1UL
1529
+ #define SQL_OIC_LEVEL1 2UL
1530
+ #define SQL_OIC_LEVEL2 3UL
1531
+ #endif /* ODBCVER >= 0x0300 */
1532
+
1533
+
1534
+ /*
1535
+ * SQLGetInfo - SQL_ODBC_SAG_CLI_CONFORMANCE
1536
+ */
1537
+ #define SQL_OSCC_NOT_COMPLIANT 0x0000
1538
+ #define SQL_OSCC_COMPLIANT 0x0001
1539
+
1540
+
1541
+ /*
1542
+ * SQLGetInfo - SQL_ODBC_SQL_CONFORMANCE
1543
+ */
1544
+ #define SQL_OSC_MINIMUM 0x0000
1545
+ #define SQL_OSC_CORE 0x0001
1546
+ #define SQL_OSC_EXTENDED 0x0002
1547
+
1548
+
1549
+ /*
1550
+ * SQLGetInfo - SQL_OWNER_USAGE
1551
+ */
1552
+ #define SQL_OU_DML_STATEMENTS 0x00000001L
1553
+ #define SQL_OU_PROCEDURE_INVOCATION 0x00000002L
1554
+ #define SQL_OU_TABLE_DEFINITION 0x00000004L
1555
+ #define SQL_OU_INDEX_DEFINITION 0x00000008L
1556
+ #define SQL_OU_PRIVILEGE_DEFINITION 0x00000010L
1557
+
1558
+
1559
+ /*
1560
+ * SQLGetInfo - SQL_PARAM_ARRAY_ROW_COUNTS
1561
+ */
1562
+ #if (ODBCVER >= 0x0300)
1563
+ #define SQL_PARC_BATCH 1
1564
+ #define SQL_PARC_NO_BATCH 2
1565
+ #endif /* ODBCVER >= 0x0300 */
1566
+
1567
+
1568
+ /*
1569
+ * SQLGetInfo - SQL_PARAM_ARRAY_SELECTS
1570
+ */
1571
+ #if (ODBCVER >= 0x0300)
1572
+ #define SQL_PAS_BATCH 1
1573
+ #define SQL_PAS_NO_BATCH 2
1574
+ #define SQL_PAS_NO_SELECT 3
1575
+ #endif /* ODBCVER >= 0x0300 */
1576
+
1577
+
1578
+ /*
1579
+ * SQLGetInfo - SQL_POSITIONED_STATEMENTS
1580
+ */
1581
+ #define SQL_PS_POSITIONED_DELETE 0x00000001L
1582
+ #define SQL_PS_POSITIONED_UPDATE 0x00000002L
1583
+ #define SQL_PS_SELECT_FOR_UPDATE 0x00000004L
1584
+
1585
+
1586
+ /*
1587
+ * SQLGetInfo - SQL_QUALIFIER_LOCATION
1588
+ */
1589
+ #define SQL_QL_START 0x0001
1590
+ #define SQL_QL_END 0x0002
1591
+
1592
+
1593
+ /*
1594
+ * SQLGetInfo - SQL_QUALIFIER_USAGE
1595
+ */
1596
+ #define SQL_QU_DML_STATEMENTS 0x00000001L
1597
+ #define SQL_QU_PROCEDURE_INVOCATION 0x00000002L
1598
+ #define SQL_QU_TABLE_DEFINITION 0x00000004L
1599
+ #define SQL_QU_INDEX_DEFINITION 0x00000008L
1600
+ #define SQL_QU_PRIVILEGE_DEFINITION 0x00000010L
1601
+
1602
+
1603
+ /*
1604
+ * SQLGetInfo - SQL_SCHEMA_USAGE
1605
+ */
1606
+ #if (ODBCVER >= 0x0300)
1607
+ #define SQL_SU_DML_STATEMENTS SQL_OU_DML_STATEMENTS
1608
+ #define SQL_SU_PROCEDURE_INVOCATION SQL_OU_PROCEDURE_INVOCATION
1609
+ #define SQL_SU_TABLE_DEFINITION SQL_OU_TABLE_DEFINITION
1610
+ #define SQL_SU_INDEX_DEFINITION SQL_OU_INDEX_DEFINITION
1611
+ #define SQL_SU_PRIVILEGE_DEFINITION SQL_OU_PRIVILEGE_DEFINITION
1612
+ #endif /* ODBCVER >= 0x0300 */
1613
+
1614
+
1615
+ /*
1616
+ * SQLGetInfo - SQL_SCROLL_OPTIONS
1617
+ */
1618
+ #define SQL_SO_FORWARD_ONLY 0x00000001L
1619
+ #define SQL_SO_KEYSET_DRIVEN 0x00000002L
1620
+ #define SQL_SO_DYNAMIC 0x00000004L
1621
+ #define SQL_SO_MIXED 0x00000008L
1622
+ #define SQL_SO_STATIC 0x00000010L
1623
+
1624
+
1625
+ /*
1626
+ * SQLGetInfo - SQL_SQL_CONFORMANCE
1627
+ */
1628
+ #if (ODBCVER >= 0x0300)
1629
+ #define SQL_SC_SQL92_ENTRY 0x00000001L
1630
+ #define SQL_SC_FIPS127_2_TRANSITIONAL 0x00000002L
1631
+ #define SQL_SC_SQL92_INTERMEDIATE 0x00000004L
1632
+ #define SQL_SC_SQL92_FULL 0x00000008L
1633
+ #endif /* ODBCVER >= 0x0300 */
1634
+
1635
+
1636
+ /*
1637
+ * SQLGetInfo - SQL_SQL92_DATETIME_FUNCTIONS
1638
+ */
1639
+ #if (ODBCVER >= 0x0300)
1640
+ #define SQL_SDF_CURRENT_DATE 0x00000001L
1641
+ #define SQL_SDF_CURRENT_TIME 0x00000002L
1642
+ #define SQL_SDF_CURRENT_TIMESTAMP 0x00000004L
1643
+ #endif /* ODBCVER >= 0x0300 */
1644
+
1645
+
1646
+ /*
1647
+ * SQLGetInfo - SQL_SQL92_FOREIGN_KEY_DELETE_RULE
1648
+ */
1649
+ #if (ODBCVER >= 0x0300)
1650
+ #define SQL_SFKD_CASCADE 0x00000001L
1651
+ #define SQL_SFKD_NO_ACTION 0x00000002L
1652
+ #define SQL_SFKD_SET_DEFAULT 0x00000004L
1653
+ #define SQL_SFKD_SET_NULL 0x00000008L
1654
+ #endif /* ODBCVER >= 0x0300 */
1655
+
1656
+
1657
+ /*
1658
+ * SQLGetInfo - SQL_SQL92_FOREIGN_KEY_UPDATE_RULE
1659
+ */
1660
+ #if (ODBCVER >= 0x0300)
1661
+ #define SQL_SFKU_CASCADE 0x00000001L
1662
+ #define SQL_SFKU_NO_ACTION 0x00000002L
1663
+ #define SQL_SFKU_SET_DEFAULT 0x00000004L
1664
+ #define SQL_SFKU_SET_NULL 0x00000008L
1665
+ #endif /* ODBCVER >= 0x0300 */
1666
+
1667
+
1668
+ /*
1669
+ * SQLGetInfo - SQL_SQL92_GRANT
1670
+ */
1671
+ #if (ODBCVER >= 0x0300)
1672
+ #define SQL_SG_USAGE_ON_DOMAIN 0x00000001L
1673
+ #define SQL_SG_USAGE_ON_CHARACTER_SET 0x00000002L
1674
+ #define SQL_SG_USAGE_ON_COLLATION 0x00000004L
1675
+ #define SQL_SG_USAGE_ON_TRANSLATION 0x00000008L
1676
+ #define SQL_SG_WITH_GRANT_OPTION 0x00000010L
1677
+ #define SQL_SG_DELETE_TABLE 0x00000020L
1678
+ #define SQL_SG_INSERT_TABLE 0x00000040L
1679
+ #define SQL_SG_INSERT_COLUMN 0x00000080L
1680
+ #define SQL_SG_REFERENCES_TABLE 0x00000100L
1681
+ #define SQL_SG_REFERENCES_COLUMN 0x00000200L
1682
+ #define SQL_SG_SELECT_TABLE 0x00000400L
1683
+ #define SQL_SG_UPDATE_TABLE 0x00000800L
1684
+ #define SQL_SG_UPDATE_COLUMN 0x00001000L
1685
+ #endif /* ODBCVER >= 0x0300 */
1686
+
1687
+
1688
+ /*
1689
+ * SQLGetInfo - SQL_SQL92_NUMERIC_VALUE_FUNCTIONS
1690
+ */
1691
+ #if (ODBCVER >= 0x0300)
1692
+ #define SQL_SNVF_BIT_LENGTH 0x00000001L
1693
+ #define SQL_SNVF_CHAR_LENGTH 0x00000002L
1694
+ #define SQL_SNVF_CHARACTER_LENGTH 0x00000004L
1695
+ #define SQL_SNVF_EXTRACT 0x00000008L
1696
+ #define SQL_SNVF_OCTET_LENGTH 0x00000010L
1697
+ #define SQL_SNVF_POSITION 0x00000020L
1698
+ #endif /* ODBCVER >= 0x0300 */
1699
+
1700
+
1701
+ /*
1702
+ * SQLGetInfo - SQL_SQL92_PREDICATES
1703
+ */
1704
+ #if (ODBCVER >= 0x0300)
1705
+ #define SQL_SP_EXISTS 0x00000001L
1706
+ #define SQL_SP_ISNOTNULL 0x00000002L
1707
+ #define SQL_SP_ISNULL 0x00000004L
1708
+ #define SQL_SP_MATCH_FULL 0x00000008L
1709
+ #define SQL_SP_MATCH_PARTIAL 0x00000010L
1710
+ #define SQL_SP_MATCH_UNIQUE_FULL 0x00000020L
1711
+ #define SQL_SP_MATCH_UNIQUE_PARTIAL 0x00000040L
1712
+ #define SQL_SP_OVERLAPS 0x00000080L
1713
+ #define SQL_SP_UNIQUE 0x00000100L
1714
+ #define SQL_SP_LIKE 0x00000200L
1715
+ #define SQL_SP_IN 0x00000400L
1716
+ #define SQL_SP_BETWEEN 0x00000800L
1717
+ #define SQL_SP_COMPARISON 0x00001000L
1718
+ #define SQL_SP_QUANTIFIED_COMPARISON 0x00002000L
1719
+ #endif /* ODBCVER >= 0x0300 */
1720
+
1721
+
1722
+ /*
1723
+ * SQLGetInfo - SQL_SQL92_RELATIONAL_JOIN_OPERATORS
1724
+ */
1725
+ #if (ODBCVER >= 0x0300)
1726
+ #define SQL_SRJO_CORRESPONDING_CLAUSE 0x00000001L
1727
+ #define SQL_SRJO_CROSS_JOIN 0x00000002L
1728
+ #define SQL_SRJO_EXCEPT_JOIN 0x00000004L
1729
+ #define SQL_SRJO_FULL_OUTER_JOIN 0x00000008L
1730
+ #define SQL_SRJO_INNER_JOIN 0x00000010L
1731
+ #define SQL_SRJO_INTERSECT_JOIN 0x00000020L
1732
+ #define SQL_SRJO_LEFT_OUTER_JOIN 0x00000040L
1733
+ #define SQL_SRJO_NATURAL_JOIN 0x00000080L
1734
+ #define SQL_SRJO_RIGHT_OUTER_JOIN 0x00000100L
1735
+ #define SQL_SRJO_UNION_JOIN 0x00000200L
1736
+ #endif /* ODBCVER >= 0x0300 */
1737
+
1738
+
1739
+ /*
1740
+ * SQLGetInfo - SQL_SQL92_REVOKE
1741
+ */
1742
+ #if (ODBCVER >= 0x0300)
1743
+ #define SQL_SR_USAGE_ON_DOMAIN 0x00000001L
1744
+ #define SQL_SR_USAGE_ON_CHARACTER_SET 0x00000002L
1745
+ #define SQL_SR_USAGE_ON_COLLATION 0x00000004L
1746
+ #define SQL_SR_USAGE_ON_TRANSLATION 0x00000008L
1747
+ #define SQL_SR_GRANT_OPTION_FOR 0x00000010L
1748
+ #define SQL_SR_CASCADE 0x00000020L
1749
+ #define SQL_SR_RESTRICT 0x00000040L
1750
+ #define SQL_SR_DELETE_TABLE 0x00000080L
1751
+ #define SQL_SR_INSERT_TABLE 0x00000100L
1752
+ #define SQL_SR_INSERT_COLUMN 0x00000200L
1753
+ #define SQL_SR_REFERENCES_TABLE 0x00000400L
1754
+ #define SQL_SR_REFERENCES_COLUMN 0x00000800L
1755
+ #define SQL_SR_SELECT_TABLE 0x00001000L
1756
+ #define SQL_SR_UPDATE_TABLE 0x00002000L
1757
+ #define SQL_SR_UPDATE_COLUMN 0x00004000L
1758
+ #endif /* ODBCVER >= 0x0300 */
1759
+
1760
+
1761
+ /*
1762
+ * SQLGetInfo - SQL_SQL92_ROW_VALUE_CONSTRUCTOR
1763
+ */
1764
+ #if (ODBCVER >= 0x0300)
1765
+ #define SQL_SRVC_VALUE_EXPRESSION 0x00000001L
1766
+ #define SQL_SRVC_NULL 0x00000002L
1767
+ #define SQL_SRVC_DEFAULT 0x00000004L
1768
+ #define SQL_SRVC_ROW_SUBQUERY 0x00000008L
1769
+ #endif /* ODBCVER >= 0x0300 */
1770
+
1771
+
1772
+ /*
1773
+ * SQLGetInfo - SQL_SQL92_STRING_FUNCTIONS
1774
+ */
1775
+ #if (ODBCVER >= 0x0300)
1776
+ #define SQL_SSF_CONVERT 0x00000001L
1777
+ #define SQL_SSF_LOWER 0x00000002L
1778
+ #define SQL_SSF_UPPER 0x00000004L
1779
+ #define SQL_SSF_SUBSTRING 0x00000008L
1780
+ #define SQL_SSF_TRANSLATE 0x00000010L
1781
+ #define SQL_SSF_TRIM_BOTH 0x00000020L
1782
+ #define SQL_SSF_TRIM_LEADING 0x00000040L
1783
+ #define SQL_SSF_TRIM_TRAILING 0x00000080L
1784
+ #endif /* ODBCVER >= 0x0300 */
1785
+
1786
+
1787
+ /*
1788
+ * SQLGetInfo - SQL_SQL92_VALUE_EXPRESSIONS
1789
+ */
1790
+ #if (ODBCVER >= 0x0300)
1791
+ #define SQL_SVE_CASE 0x00000001L
1792
+ #define SQL_SVE_CAST 0x00000002L
1793
+ #define SQL_SVE_COALESCE 0x00000004L
1794
+ #define SQL_SVE_NULLIF 0x00000008L
1795
+ #endif /* ODBCVER >= 0x0300 */
1796
+
1797
+
1798
+ /*
1799
+ * SQLGetInfo - SQL_STANDARD_CLI_CONFORMANCE
1800
+ */
1801
+ #if (ODBCVER >= 0x0300)
1802
+ #define SQL_SCC_XOPEN_CLI_VERSION1 0x00000001L
1803
+ #define SQL_SCC_ISO92_CLI 0x00000002L
1804
+ #endif /* ODBCVER >= 0x0300 */
1805
+
1806
+
1807
+ /*
1808
+ * SQLGetInfo - SQL_STATIC_SENSITIVITY
1809
+ */
1810
+ #define SQL_SS_ADDITIONS 0x00000001L
1811
+ #define SQL_SS_DELETIONS 0x00000002L
1812
+ #define SQL_SS_UPDATES 0x00000004L
1813
+
1814
+
1815
+ /*
1816
+ * SQLGetInfo - SQL_SUBQUERIES
1817
+ */
1818
+ #define SQL_SQ_COMPARISON 0x00000001L
1819
+ #define SQL_SQ_EXISTS 0x00000002L
1820
+ #define SQL_SQ_IN 0x00000004L
1821
+ #define SQL_SQ_QUANTIFIED 0x00000008L
1822
+ #define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L
1823
+
1824
+
1825
+ /*
1826
+ * SQLGetInfo - SQL_SYSTEM_FUNCTIONS
1827
+ */
1828
+ #define SQL_FN_SYS_USERNAME 0x00000001L
1829
+ #define SQL_FN_SYS_DBNAME 0x00000002L
1830
+ #define SQL_FN_SYS_IFNULL 0x00000004L
1831
+
1832
+
1833
+ /*
1834
+ * SQLGetInfo - SQL_STRING_FUNCTIONS
1835
+ */
1836
+ #define SQL_FN_STR_CONCAT 0x00000001L
1837
+ #define SQL_FN_STR_INSERT 0x00000002L
1838
+ #define SQL_FN_STR_LEFT 0x00000004L
1839
+ #define SQL_FN_STR_LTRIM 0x00000008L
1840
+ #define SQL_FN_STR_LENGTH 0x00000010L
1841
+ #define SQL_FN_STR_LOCATE 0x00000020L
1842
+ #define SQL_FN_STR_LCASE 0x00000040L
1843
+ #define SQL_FN_STR_REPEAT 0x00000080L
1844
+ #define SQL_FN_STR_REPLACE 0x00000100L
1845
+ #define SQL_FN_STR_RIGHT 0x00000200L
1846
+ #define SQL_FN_STR_RTRIM 0x00000400L
1847
+ #define SQL_FN_STR_SUBSTRING 0x00000800L
1848
+ #define SQL_FN_STR_UCASE 0x00001000L
1849
+ #define SQL_FN_STR_ASCII 0x00002000L
1850
+ #define SQL_FN_STR_CHAR 0x00004000L
1851
+ #define SQL_FN_STR_DIFFERENCE 0x00008000L
1852
+ #define SQL_FN_STR_LOCATE_2 0x00010000L
1853
+ #define SQL_FN_STR_SOUNDEX 0x00020000L
1854
+ #define SQL_FN_STR_SPACE 0x00040000L
1855
+ #if (ODBCVER >= 0x0300)
1856
+ #define SQL_FN_STR_BIT_LENGTH 0x00080000L
1857
+ #define SQL_FN_STR_CHAR_LENGTH 0x00100000L
1858
+ #define SQL_FN_STR_CHARACTER_LENGTH 0x00200000L
1859
+ #define SQL_FN_STR_OCTET_LENGTH 0x00400000L
1860
+ #define SQL_FN_STR_POSITION 0x00800000L
1861
+ #endif /* ODBCVER >= 0x0300 */
1862
+
1863
+
1864
+ /*
1865
+ * SQLGetInfo - SQL_TIMEDATE_ADD_INTERVALS
1866
+ * SQLGetInfo - SQL_TIMEDATE_DIFF_INTERVALS
1867
+ */
1868
+ #define SQL_FN_TSI_FRAC_SECOND 0x00000001L
1869
+ #define SQL_FN_TSI_SECOND 0x00000002L
1870
+ #define SQL_FN_TSI_MINUTE 0x00000004L
1871
+ #define SQL_FN_TSI_HOUR 0x00000008L
1872
+ #define SQL_FN_TSI_DAY 0x00000010L
1873
+ #define SQL_FN_TSI_WEEK 0x00000020L
1874
+ #define SQL_FN_TSI_MONTH 0x00000040L
1875
+ #define SQL_FN_TSI_QUARTER 0x00000080L
1876
+ #define SQL_FN_TSI_YEAR 0x00000100L
1877
+
1878
+
1879
+ /*
1880
+ * SQLGetInfo - SQL_TIMEDATE_FUNCTIONS
1881
+ */
1882
+ #define SQL_FN_TD_NOW 0x00000001L
1883
+ #define SQL_FN_TD_CURDATE 0x00000002L
1884
+ #define SQL_FN_TD_DAYOFMONTH 0x00000004L
1885
+ #define SQL_FN_TD_DAYOFWEEK 0x00000008L
1886
+ #define SQL_FN_TD_DAYOFYEAR 0x00000010L
1887
+ #define SQL_FN_TD_MONTH 0x00000020L
1888
+ #define SQL_FN_TD_QUARTER 0x00000040L
1889
+ #define SQL_FN_TD_WEEK 0x00000080L
1890
+ #define SQL_FN_TD_YEAR 0x00000100L
1891
+ #define SQL_FN_TD_CURTIME 0x00000200L
1892
+ #define SQL_FN_TD_HOUR 0x00000400L
1893
+ #define SQL_FN_TD_MINUTE 0x00000800L
1894
+ #define SQL_FN_TD_SECOND 0x00001000L
1895
+ #define SQL_FN_TD_TIMESTAMPADD 0x00002000L
1896
+ #define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L
1897
+ #define SQL_FN_TD_DAYNAME 0x00008000L
1898
+ #define SQL_FN_TD_MONTHNAME 0x00010000L
1899
+ #if (ODBCVER >= 0x0300)
1900
+ #define SQL_FN_TD_CURRENT_DATE 0x00020000L
1901
+ #define SQL_FN_TD_CURRENT_TIME 0x00040000L
1902
+ #define SQL_FN_TD_CURRENT_TIMESTAMP 0x00080000L
1903
+ #define SQL_FN_TD_EXTRACT 0x00100000L
1904
+ #endif /* ODBCVER >= 0x0300 */
1905
+
1906
+
1907
+ /*
1908
+ * SQLGetInfo - SQL_TXN_ISOLATION_OPTION
1909
+ */
1910
+ #if (ODBCVER < 0x0300)
1911
+ #define SQL_TXN_VERSIONING 0x00000010L
1912
+ #endif /* ODBCVER < 0x0300 */
1913
+
1914
+
1915
+ /*
1916
+ * SQLGetInfo - SQL_UNION
1917
+ */
1918
+ #define SQL_U_UNION 0x00000001L
1919
+ #define SQL_U_UNION_ALL 0x00000002L
1920
+
1921
+
1922
+ /*
1923
+ * SQLGetInfo - SQL_UNION_STATEMENT
1924
+ */
1925
+ #if (ODBCVER >= 0x0300)
1926
+ #define SQL_US_UNION SQL_U_UNION
1927
+ #define SQL_US_UNION_ALL SQL_U_UNION_ALL
1928
+ #endif /* ODBCVER >= 0x0300 */
1929
+
1930
+
1931
+ /*
1932
+ * SQLGetStmtAttr - ODBC 2.x attributes
1933
+ */
1934
+ #define SQL_QUERY_TIMEOUT 0
1935
+ #define SQL_MAX_ROWS 1
1936
+ #define SQL_NOSCAN 2
1937
+ #define SQL_MAX_LENGTH 3
1938
+ #define SQL_ASYNC_ENABLE 4
1939
+ #define SQL_BIND_TYPE 5
1940
+ #define SQL_CURSOR_TYPE 6
1941
+ #define SQL_CONCURRENCY 7
1942
+ #define SQL_KEYSET_SIZE 8
1943
+ #define SQL_ROWSET_SIZE 9
1944
+ #define SQL_SIMULATE_CURSOR 10
1945
+ #define SQL_RETRIEVE_DATA 11
1946
+ #define SQL_USE_BOOKMARKS 12
1947
+ #define SQL_GET_BOOKMARK 13
1948
+ #define SQL_ROW_NUMBER 14
1949
+
1950
+
1951
+ /*
1952
+ * SQLGetStmtAttr - ODBC 3.x attributes
1953
+ */
1954
+ #if (ODBCVER >= 0x0300)
1955
+ #define SQL_ATTR_ASYNC_ENABLE 4
1956
+ #define SQL_ATTR_CONCURRENCY SQL_CONCURRENCY
1957
+ #define SQL_ATTR_CURSOR_TYPE SQL_CURSOR_TYPE
1958
+ #define SQL_ATTR_ENABLE_AUTO_IPD 15
1959
+ #define SQL_ATTR_FETCH_BOOKMARK_PTR 16
1960
+ #define SQL_ATTR_KEYSET_SIZE SQL_KEYSET_SIZE
1961
+ #define SQL_ATTR_MAX_LENGTH SQL_MAX_LENGTH
1962
+ #define SQL_ATTR_MAX_ROWS SQL_MAX_ROWS
1963
+ #define SQL_ATTR_NOSCAN SQL_NOSCAN
1964
+ #define SQL_ATTR_PARAM_BIND_OFFSET_PTR 17
1965
+ #define SQL_ATTR_PARAM_BIND_TYPE 18
1966
+ #define SQL_ATTR_PARAM_OPERATION_PTR 19
1967
+ #define SQL_ATTR_PARAM_STATUS_PTR 20
1968
+ #define SQL_ATTR_PARAMS_PROCESSED_PTR 21
1969
+ #define SQL_ATTR_PARAMSET_SIZE 22
1970
+ #define SQL_ATTR_QUERY_TIMEOUT SQL_QUERY_TIMEOUT
1971
+ #define SQL_ATTR_RETRIEVE_DATA SQL_RETRIEVE_DATA
1972
+ #define SQL_ATTR_ROW_BIND_OFFSET_PTR 23
1973
+ #define SQL_ATTR_ROW_BIND_TYPE SQL_BIND_TYPE
1974
+ #define SQL_ATTR_ROW_NUMBER SQL_ROW_NUMBER /*GetStmtAttr*/
1975
+ #define SQL_ATTR_ROW_OPERATION_PTR 24
1976
+ #define SQL_ATTR_ROW_STATUS_PTR 25
1977
+ #define SQL_ATTR_ROWS_FETCHED_PTR 26
1978
+ #define SQL_ATTR_ROW_ARRAY_SIZE 27
1979
+ #define SQL_ATTR_SIMULATE_CURSOR SQL_SIMULATE_CURSOR
1980
+ #define SQL_ATTR_USE_BOOKMARKS SQL_USE_BOOKMARKS
1981
+ #endif /* ODBCVER >= 0x0300 */
1982
+
1983
+ #if (ODBCVER < 0x0300)
1984
+ #define SQL_STMT_OPT_MAX SQL_ROW_NUMBER
1985
+ #define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT
1986
+ #endif /* ODBCVER < 0x0300 */
1987
+
1988
+
1989
+ /*
1990
+ * SQLGetStmtAttr - SQL_ATTR_ASYNC_ENABLE
1991
+ */
1992
+ #define SQL_ASYNC_ENABLE_OFF 0UL
1993
+ #define SQL_ASYNC_ENABLE_ON 1UL
1994
+ #define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF
1995
+
1996
+
1997
+ /*
1998
+ * SQLGetStmtAttr - SQL_ATTR_PARAM_BIND_TYPE
1999
+ */
2000
+ #if (ODBCVER >= 0x0300)
2001
+ #define SQL_PARAM_BIND_BY_COLUMN 0UL
2002
+ #define SQL_PARAM_BIND_TYPE_DEFAULT SQL_PARAM_BIND_BY_COLUMN
2003
+ #endif /* ODBCVER >= 0x0300 */
2004
+
2005
+
2006
+ /*
2007
+ * SQLGetStmtAttr - SQL_BIND_TYPE
2008
+ */
2009
+ #define SQL_BIND_BY_COLUMN 0UL
2010
+ #define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN
2011
+
2012
+
2013
+ /*
2014
+ * SQLGetStmtAttr - SQL_CONCURRENCY
2015
+ */
2016
+ #define SQL_CONCUR_READ_ONLY 1
2017
+ #define SQL_CONCUR_LOCK 2
2018
+ #define SQL_CONCUR_ROWVER 3
2019
+ #define SQL_CONCUR_VALUES 4
2020
+ #define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY
2021
+
2022
+
2023
+ /*
2024
+ * SQLGetStmtAttr - SQL_CURSOR_TYPE
2025
+ */
2026
+ #define SQL_CURSOR_FORWARD_ONLY 0UL
2027
+ #define SQL_CURSOR_KEYSET_DRIVEN 1UL
2028
+ #define SQL_CURSOR_DYNAMIC 2UL
2029
+ #define SQL_CURSOR_STATIC 3UL
2030
+ #define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY
2031
+
2032
+
2033
+ /*
2034
+ * SQLGetStmtAttr - SQL_KEYSET_SIZE
2035
+ */
2036
+ #define SQL_KEYSET_SIZE_DEFAULT 0UL
2037
+
2038
+
2039
+ /*
2040
+ * SQLGetStmtAttr - SQL_MAX_LENGTH
2041
+ */
2042
+ #define SQL_MAX_LENGTH_DEFAULT 0UL
2043
+
2044
+
2045
+ /*
2046
+ * SQLGetStmtAttr - SQL_MAX_ROWS
2047
+ */
2048
+ #define SQL_MAX_ROWS_DEFAULT 0UL
2049
+
2050
+
2051
+ /*
2052
+ * SQLGetStmtAttr - SQL_NOSCAN
2053
+ */
2054
+ #define SQL_NOSCAN_OFF 0UL /* 1.0 FALSE */
2055
+ #define SQL_NOSCAN_ON 1UL /* 1.0 TRUE */
2056
+ #define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF
2057
+
2058
+
2059
+ /*
2060
+ * SQLGetStmtAttr - SQL_QUERY_TIMEOUT
2061
+ */
2062
+ #define SQL_QUERY_TIMEOUT_DEFAULT 0UL
2063
+
2064
+
2065
+ /*
2066
+ * SQLGetStmtAttr - SQL_RETRIEVE_DATA
2067
+ */
2068
+ #define SQL_RD_OFF 0UL
2069
+ #define SQL_RD_ON 1UL
2070
+ #define SQL_RD_DEFAULT SQL_RD_ON
2071
+
2072
+
2073
+ /*
2074
+ * SQLGetStmtAttr - SQL_ROWSET_SIZE
2075
+ */
2076
+ #define SQL_ROWSET_SIZE_DEFAULT 1UL
2077
+
2078
+
2079
+ /*
2080
+ * SQLGetStmtAttr - SQL_SIMULATE_CURSOR
2081
+ */
2082
+ #define SQL_SC_NON_UNIQUE 0UL
2083
+ #define SQL_SC_TRY_UNIQUE 1UL
2084
+ #define SQL_SC_UNIQUE 2UL
2085
+
2086
+
2087
+ /*
2088
+ * SQLGetStmtAttr - SQL_USE_BOOKMARKS
2089
+ */
2090
+ #define SQL_UB_OFF 0UL
2091
+ #define SQL_UB_ON 1UL
2092
+ #define SQL_UB_DEFAULT SQL_UB_OFF
2093
+ #if (ODBCVER >= 0x0300)
2094
+ #define SQL_UB_FIXED SQL_UB_ON
2095
+ #define SQL_UB_VARIABLE 2UL
2096
+ #endif /* ODBCVER >= 0x0300 */
2097
+
2098
+
2099
+ /*
2100
+ * SQLGetTypeInfo - SEARCHABLE
2101
+ */
2102
+ #if (ODBCVER >= 0x0300)
2103
+ #define SQL_COL_PRED_CHAR SQL_LIKE_ONLY
2104
+ #define SQL_COL_PRED_BASIC SQL_ALL_EXCEPT_LIKE
2105
+ #endif /* ODBCVER >= 0x0300 */
2106
+
2107
+
2108
+ /*
2109
+ * SQLSetPos
2110
+ */
2111
+ #define SQL_ENTIRE_ROWSET 0
2112
+
2113
+
2114
+ /*
2115
+ * SQLSetPos - Operation
2116
+ */
2117
+ #define SQL_POSITION 0
2118
+ #define SQL_REFRESH 1
2119
+ #define SQL_UPDATE 2
2120
+ #define SQL_DELETE 3
2121
+
2122
+
2123
+ /*
2124
+ * SQLBulkOperations - Operation
2125
+ */
2126
+ #define SQL_ADD 4
2127
+ #define SQL_SETPOS_MAX_OPTION_VALUE SQL_ADD
2128
+ #if (ODBCVER >= 0x0300)
2129
+ #define SQL_UPDATE_BY_BOOKMARK 5
2130
+ #define SQL_DELETE_BY_BOOKMARK 6
2131
+ #define SQL_FETCH_BY_BOOKMARK 7
2132
+ #endif /* ODBCVER >= 0x0300 */
2133
+
2134
+
2135
+ /*
2136
+ * SQLSetPos - LockType
2137
+ */
2138
+ #define SQL_LOCK_NO_CHANGE 0
2139
+ #define SQL_LOCK_EXCLUSIVE 1
2140
+ #define SQL_LOCK_UNLOCK 2
2141
+ #define SQL_SETPOS_MAX_LOCK_VALUE SQL_LOCK_UNLOCK
2142
+
2143
+
2144
+ /*
2145
+ * SQLSetPos macros
2146
+ */
2147
+ #define SQL_POSITION_TO(hstmt,irow) \
2148
+ SQLSetPos(hstmt,irow,SQL_POSITION,SQL_LOCK_NO_CHANGE)
2149
+ #define SQL_LOCK_RECORD(hstmt,irow,fLock) \
2150
+ SQLSetPos(hstmt,irow,SQL_POSITION,fLock)
2151
+ #define SQL_REFRESH_RECORD(hstmt,irow,fLock) \
2152
+ SQLSetPos(hstmt,irow,SQL_REFRESH,fLock)
2153
+ #define SQL_UPDATE_RECORD(hstmt,irow) \
2154
+ SQLSetPos(hstmt,irow,SQL_UPDATE,SQL_LOCK_NO_CHANGE)
2155
+ #define SQL_DELETE_RECORD(hstmt,irow) \
2156
+ SQLSetPos(hstmt,irow,SQL_DELETE,SQL_LOCK_NO_CHANGE)
2157
+ #define SQL_ADD_RECORD(hstmt,irow) \
2158
+ SQLSetPos(hstmt,irow,SQL_ADD,SQL_LOCK_NO_CHANGE)
2159
+
2160
+
2161
+ /*
2162
+ * SQLSpecialColumns - Column types and scopes
2163
+ */
2164
+ #define SQL_BEST_ROWID 1
2165
+ #define SQL_ROWVER 2
2166
+
2167
+
2168
+ /*
2169
+ * All the ODBC keywords
2170
+ */
2171
+ #define SQL_ODBC_KEYWORDS \
2172
+ "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,"\
2173
+ "ASC,ASSERTION,AT,AUTHORIZATION,AVG,"\
2174
+ "BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,"\
2175
+ "CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,"\
2176
+ "COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"\
2177
+ "CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"\
2178
+ "CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"\
2179
+ "DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"\
2180
+ "DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,"\
2181
+ "DISTINCT,DOMAIN,DOUBLE,DROP,"\
2182
+ "ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,"\
2183
+ "EXISTS,EXTERNAL,EXTRACT,"\
2184
+ "FALSE,FETCH,FIRST,FLOAT,FOR,FOREIGN,FORTRAN,FOUND,FROM,FULL,"\
2185
+ "GET,GLOBAL,GO,GOTO,GRANT,GROUP,HAVING,HOUR,"\
2186
+ "IDENTITY,IMMEDIATE,IN,INCLUDE,INDEX,INDICATOR,INITIALLY,INNER,"\
2187
+ "INPUT,INSENSITIVE,INSERT,INT,INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,"\
2188
+ "JOIN,KEY,LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,"\
2189
+ "MATCH,MAX,MIN,MINUTE,MODULE,MONTH,"\
2190
+ "NAMES,NATIONAL,NATURAL,NCHAR,NEXT,NO,NONE,NOT,NULL,NULLIF,NUMERIC,"\
2191
+ "OCTET_LENGTH,OF,ON,ONLY,OPEN,OPTION,OR,ORDER,OUTER,OUTPUT,OVERLAPS,"\
2192
+ "PAD,PARTIAL,PASCAL,PLI,POSITION,PRECISION,PREPARE,PRESERVE,"\
2193
+ "PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,"\
2194
+ "READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS"\
2195
+ "SCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,SIZE,"\
2196
+ "SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,"\
2197
+ "SUBSTRING,SUM,SYSTEM_USER,"\
2198
+ "TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"\
2199
+ "TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"\
2200
+ "UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"\
2201
+ "VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,"\
2202
+ "YEAR,ZONE"
2203
+
2204
+ /*
2205
+ * ----------------------------------------------------------------------
2206
+ * Level 2 Functions
2207
+ * ----------------------------------------------------------------------
2208
+ */
2209
+
2210
+ /*
2211
+ * SQLExtendedFetch - fFetchType
2212
+ */
2213
+ #define SQL_FETCH_BOOKMARK 8
2214
+
2215
+
2216
+ /*
2217
+ * SQLExtendedFetch - rgfRowStatus
2218
+ */
2219
+ #define SQL_ROW_SUCCESS 0
2220
+ #define SQL_ROW_DELETED 1
2221
+ #define SQL_ROW_UPDATED 2
2222
+ #define SQL_ROW_NOROW 3
2223
+ #define SQL_ROW_ADDED 4
2224
+ #define SQL_ROW_ERROR 5
2225
+ #if (ODBCVER >= 0x0300)
2226
+ #define SQL_ROW_SUCCESS_WITH_INFO 6
2227
+ #define SQL_ROW_PROCEED 0
2228
+ #define SQL_ROW_IGNORE 1
2229
+ #endif
2230
+
2231
+
2232
+ /*
2233
+ * SQL_DESC_ARRAY_STATUS_PTR
2234
+ */
2235
+ #if (ODBCVER >= 0x0300)
2236
+ #define SQL_PARAM_SUCCESS 0
2237
+ #define SQL_PARAM_SUCCESS_WITH_INFO 6
2238
+ #define SQL_PARAM_ERROR 5
2239
+ #define SQL_PARAM_UNUSED 7
2240
+ #define SQL_PARAM_DIAG_UNAVAILABLE 1
2241
+
2242
+ #define SQL_PARAM_PROCEED 0
2243
+ #define SQL_PARAM_IGNORE 1
2244
+ #endif /* ODBCVER >= 0x0300 */
2245
+
2246
+
2247
+ /*
2248
+ * SQLForeignKeys - UPDATE_RULE/DELETE_RULE
2249
+ */
2250
+ #define SQL_CASCADE 0
2251
+ #define SQL_RESTRICT 1
2252
+ #define SQL_SET_NULL 2
2253
+
2254
+ #if (ODBCVER >= 0x0250)
2255
+ #define SQL_NO_ACTION 3
2256
+ #define SQL_SET_DEFAULT 4
2257
+ #endif /* ODBCVER >= 0x0250 */
2258
+
2259
+
2260
+ /*
2261
+ * SQLForeignKeys - DEFERABILITY
2262
+ */
2263
+ #if (ODBCVER >= 0x0300)
2264
+ #define SQL_INITIALLY_DEFERRED 5
2265
+ #define SQL_INITIALLY_IMMEDIATE 6
2266
+ #define SQL_NOT_DEFERRABLE 7
2267
+ #endif /* ODBCVER >= 0x0300 */
2268
+
2269
+
2270
+ /*
2271
+ * SQLBindParameter - fParamType
2272
+ * SQLProcedureColumns - COLUMN_TYPE
2273
+ */
2274
+ #define SQL_PARAM_TYPE_UNKNOWN 0
2275
+ #define SQL_PARAM_INPUT 1
2276
+ #define SQL_PARAM_INPUT_OUTPUT 2
2277
+ #define SQL_RESULT_COL 3
2278
+ #define SQL_PARAM_OUTPUT 4
2279
+ #define SQL_RETURN_VALUE 5
2280
+
2281
+
2282
+ /*
2283
+ * SQLProcedures - PROCEDURE_TYPE
2284
+ */
2285
+ #define SQL_PT_UNKNOWN 0
2286
+ #define SQL_PT_PROCEDURE 1
2287
+ #define SQL_PT_FUNCTION 2
2288
+
2289
+
2290
+ /*
2291
+ * SQLSetParam to SQLBindParameter conversion
2292
+ */
2293
+ #define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT
2294
+ #define SQL_SETPARAM_VALUE_MAX (-1L)
2295
+
2296
+
2297
+ /*
2298
+ * SQLStatistics - fAccuracy
2299
+ */
2300
+ #define SQL_QUICK 0
2301
+ #define SQL_ENSURE 1
2302
+
2303
+
2304
+ /*
2305
+ * SQLStatistics - TYPE
2306
+ */
2307
+ #define SQL_TABLE_STAT 0
2308
+
2309
+
2310
+ /*
2311
+ * SQLTables
2312
+ */
2313
+ #if (ODBCVER >= 0x0300)
2314
+ #define SQL_ALL_CATALOGS "%"
2315
+ #define SQL_ALL_SCHEMAS "%"
2316
+ #define SQL_ALL_TABLE_TYPES "%"
2317
+ #endif /* ODBCVER >= 0x0300 */
2318
+
2319
+ /*
2320
+ * SQLSpecialColumns - PSEUDO_COLUMN
2321
+ */
2322
+ #define SQL_PC_NOT_PSEUDO 1
2323
+
2324
+
2325
+ /*
2326
+ * Deprecated defines from prior versions of ODBC
2327
+ */
2328
+ #define SQL_DATABASE_NAME 16
2329
+ #define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR
2330
+ #define SQL_FETCH_PREV SQL_FETCH_PRIOR
2331
+ #define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER
2332
+ #define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER
2333
+ #define SQL_CC_DELETE SQL_CB_DELETE
2334
+ #define SQL_CR_DELETE SQL_CB_DELETE
2335
+ #define SQL_CC_CLOSE SQL_CB_CLOSE
2336
+ #define SQL_CR_CLOSE SQL_CB_CLOSE
2337
+ #define SQL_CC_PRESERVE SQL_CB_PRESERVE
2338
+ #define SQL_CR_PRESERVE SQL_CB_PRESERVE
2339
+ #if (ODBCVER < 0x0200)
2340
+ #define SQL_FETCH_RESUME 7
2341
+ #endif
2342
+ #define SQL_SCROLL_FORWARD_ONLY 0L
2343
+ #define SQL_SCROLL_KEYSET_DRIVEN (-1L)
2344
+ #define SQL_SCROLL_DYNAMIC (-2L)
2345
+ #define SQL_SCROLL_STATIC (-3L)
2346
+
2347
+
2348
+ /*
2349
+ * Level 1 function prototypes
2350
+ */
2351
+ SQLRETURN SQL_API SQLDriverConnect (
2352
+ SQLHDBC hdbc,
2353
+ SQLHWND hwnd,
2354
+ SQLCHAR * szConnStrIn,
2355
+ SQLSMALLINT cbConnStrIn,
2356
+ SQLCHAR * szConnStrOut,
2357
+ SQLSMALLINT cbConnStrOutMax,
2358
+ SQLSMALLINT * pcbConnStrOut,
2359
+ SQLUSMALLINT fDriverCompletion);
2360
+
2361
+ /*
2362
+ * Level 2 function prototypes
2363
+ */
2364
+
2365
+ SQLRETURN SQL_API SQLBrowseConnect (
2366
+ SQLHDBC hdbc,
2367
+ SQLCHAR * szConnStrIn,
2368
+ SQLSMALLINT cbConnStrIn,
2369
+ SQLCHAR * szConnStrOut,
2370
+ SQLSMALLINT cbConnStrOutMax,
2371
+ SQLSMALLINT * pcbConnStrOut);
2372
+
2373
+ #if (ODBCVER >= 0x0300)
2374
+ SQLRETURN SQL_API SQLBulkOperations (
2375
+ SQLHSTMT StatementHandle,
2376
+ SQLSMALLINT Operation);
2377
+ #endif /* ODBCVER >= 0x0300 */
2378
+
2379
+ SQLRETURN SQL_API SQLColAttributes (
2380
+ SQLHSTMT hstmt,
2381
+ SQLUSMALLINT icol,
2382
+ SQLUSMALLINT fDescType,
2383
+ SQLPOINTER rgbDesc,
2384
+ SQLSMALLINT cbDescMax,
2385
+ SQLSMALLINT * pcbDesc,
2386
+ SQLLEN * pfDesc);
2387
+
2388
+ SQLRETURN SQL_API SQLColumnPrivileges (
2389
+ SQLHSTMT hstmt,
2390
+ SQLCHAR * szCatalogName,
2391
+ SQLSMALLINT cbCatalogName,
2392
+ SQLCHAR * szSchemaName,
2393
+ SQLSMALLINT cbSchemaName,
2394
+ SQLCHAR * szTableName,
2395
+ SQLSMALLINT cbTableName,
2396
+ SQLCHAR * szColumnName,
2397
+ SQLSMALLINT cbColumnName);
2398
+
2399
+ SQLRETURN SQL_API SQLDescribeParam (
2400
+ SQLHSTMT hstmt,
2401
+ SQLUSMALLINT ipar,
2402
+ SQLSMALLINT * pfSqlType,
2403
+ SQLULEN * pcbParamDef,
2404
+ SQLSMALLINT * pibScale,
2405
+ SQLSMALLINT * pfNullable);
2406
+
2407
+ SQLRETURN SQL_API SQLExtendedFetch (
2408
+ SQLHSTMT hstmt,
2409
+ SQLUSMALLINT fFetchType,
2410
+ SQLLEN irow,
2411
+ SQLULEN * pcrow,
2412
+ SQLUSMALLINT * rgfRowStatus);
2413
+
2414
+ SQLRETURN SQL_API SQLForeignKeys (
2415
+ SQLHSTMT hstmt,
2416
+ SQLCHAR * szPkCatalogName,
2417
+ SQLSMALLINT cbPkCatalogName,
2418
+ SQLCHAR * szPkSchemaName,
2419
+ SQLSMALLINT cbPkSchemaName,
2420
+ SQLCHAR * szPkTableName,
2421
+ SQLSMALLINT cbPkTableName,
2422
+ SQLCHAR * szFkCatalogName,
2423
+ SQLSMALLINT cbFkCatalogName,
2424
+ SQLCHAR * szFkSchemaName,
2425
+ SQLSMALLINT cbFkSchemaName,
2426
+ SQLCHAR * szFkTableName,
2427
+ SQLSMALLINT cbFkTableName);
2428
+
2429
+ SQLRETURN SQL_API SQLMoreResults (
2430
+ SQLHSTMT hstmt);
2431
+
2432
+ SQLRETURN SQL_API SQLNativeSql (
2433
+ SQLHDBC hdbc,
2434
+ SQLCHAR * szSqlStrIn,
2435
+ SQLINTEGER cbSqlStrIn,
2436
+ SQLCHAR * szSqlStr,
2437
+ SQLINTEGER cbSqlStrMax,
2438
+ SQLINTEGER * pcbSqlStr);
2439
+
2440
+ SQLRETURN SQL_API SQLNumParams (
2441
+ SQLHSTMT hstmt,
2442
+ SQLSMALLINT * pcpar);
2443
+
2444
+ SQLRETURN SQL_API SQLParamOptions (
2445
+ SQLHSTMT hstmt,
2446
+ SQLULEN crow,
2447
+ SQLULEN * pirow);
2448
+
2449
+ SQLRETURN SQL_API SQLPrimaryKeys (
2450
+ SQLHSTMT hstmt,
2451
+ SQLCHAR * szCatalogName,
2452
+ SQLSMALLINT cbCatalogName,
2453
+ SQLCHAR * szSchemaName,
2454
+ SQLSMALLINT cbSchemaName,
2455
+ SQLCHAR * szTableName,
2456
+ SQLSMALLINT cbTableName);
2457
+
2458
+ SQLRETURN SQL_API SQLProcedureColumns (
2459
+ SQLHSTMT hstmt,
2460
+ SQLCHAR * szCatalogName,
2461
+ SQLSMALLINT cbCatalogName,
2462
+ SQLCHAR * szSchemaName,
2463
+ SQLSMALLINT cbSchemaName,
2464
+ SQLCHAR * szProcName,
2465
+ SQLSMALLINT cbProcName,
2466
+ SQLCHAR * szColumnName,
2467
+ SQLSMALLINT cbColumnName);
2468
+
2469
+ SQLRETURN SQL_API SQLProcedures (
2470
+ SQLHSTMT hstmt,
2471
+ SQLCHAR * szCatalogName,
2472
+ SQLSMALLINT cbCatalogName,
2473
+ SQLCHAR * szSchemaName,
2474
+ SQLSMALLINT cbSchemaName,
2475
+ SQLCHAR * szProcName,
2476
+ SQLSMALLINT cbProcName);
2477
+
2478
+ SQLRETURN SQL_API SQLSetPos (
2479
+ SQLHSTMT hstmt,
2480
+ SQLSETPOSIROW irow,
2481
+ SQLUSMALLINT fOption,
2482
+ SQLUSMALLINT fLock);
2483
+
2484
+ SQLRETURN SQL_API SQLTablePrivileges (
2485
+ SQLHSTMT hstmt,
2486
+ SQLCHAR * szCatalogName,
2487
+ SQLSMALLINT cbCatalogName,
2488
+ SQLCHAR * szSchemaName,
2489
+ SQLSMALLINT cbSchemaName,
2490
+ SQLCHAR * szTableName,
2491
+ SQLSMALLINT cbTableName);
2492
+
2493
+ SQLRETURN SQL_API SQLDrivers (
2494
+ SQLHENV henv,
2495
+ SQLUSMALLINT fDirection,
2496
+ SQLCHAR * szDriverDesc,
2497
+ SQLSMALLINT cbDriverDescMax,
2498
+ SQLSMALLINT * pcbDriverDesc,
2499
+ SQLCHAR * szDriverAttributes,
2500
+ SQLSMALLINT cbDrvrAttrMax,
2501
+ SQLSMALLINT * pcbDrvrAttr);
2502
+
2503
+ SQLRETURN SQL_API SQLBindParameter (
2504
+ SQLHSTMT hstmt,
2505
+ SQLUSMALLINT ipar,
2506
+ SQLSMALLINT fParamType,
2507
+ SQLSMALLINT fCType,
2508
+ SQLSMALLINT fSqlType,
2509
+ SQLULEN cbColDef,
2510
+ SQLSMALLINT ibScale,
2511
+ SQLPOINTER rgbValue,
2512
+ SQLLEN cbValueMax,
2513
+ SQLLEN * pcbValue);
2514
+
2515
+ /*
2516
+ * Depreciated - use SQLSetStmtOptions
2517
+ */
2518
+ SQLRETURN SQL_API SQLSetScrollOptions ( /* Use SQLSetStmtOptions */
2519
+ SQLHSTMT hstmt,
2520
+ SQLUSMALLINT fConcurrency,
2521
+ SQLLEN crowKeyset,
2522
+ SQLUSMALLINT crowRowset);
2523
+
2524
+
2525
+ /*
2526
+ * SQLAllocHandleStd - make SQLAllocHandle compatible with X/Open standard
2527
+ *
2528
+ * NOTE: An application should not call SQLAllocHandleStd directly
2529
+ */
2530
+ #ifdef ODBC_STD
2531
+ #define SQLAllocHandle SQLAllocHandleStd
2532
+ #define SQLAllocEnv(phenv) \
2533
+ SQLAllocHandleStd(SQL_HANDLE_ENV, SQL_NULL_HANDLE, phenv)
2534
+
2535
+ #if (ODBCVER >= 0x0300)
2536
+ SQLRETURN SQL_API SQLAllocHandleStd (
2537
+ SQLSMALLINT fHandleType,
2538
+ SQLHANDLE hInput,
2539
+ SQLHANDLE * phOutput);
2540
+ #endif
2541
+
2542
+
2543
+ /* Internal type subcodes */
2544
+ #define SQL_YEAR SQL_CODE_YEAR
2545
+ #define SQL_MONTH SQL_CODE_MONTH
2546
+ #define SQL_DAY SQL_CODE_DAY
2547
+ #define SQL_HOUR SQL_CODE_HOUR
2548
+ #define SQL_MINUTE SQL_CODE_MINUTE
2549
+ #define SQL_SECOND SQL_CODE_SECOND
2550
+ #define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MONTH
2551
+ #define SQL_DAY_TO_HOUR SQL_CODE_DAY_TO_HOUR
2552
+ #define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINUTE
2553
+ #define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECOND
2554
+ #define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MINUTE
2555
+ #define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SECOND
2556
+ #define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND
2557
+ #endif /* ODBC_STD */
2558
+
2559
+
2560
+ #ifdef __cplusplus
2561
+ }
2562
+ #endif
2563
+
2564
+ #include "sqlucode.h"
2565
+
2566
+ #endif /* _SQLEXT_H */