-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathsqlext.h
2437 lines (2083 loc) · 96.9 KB
/
sqlext.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/********************************************************
* *
* Copyright (C) Microsoft. All rights reserved. *
* *
********************************************************/
//-----------------------------------------------------------------------------
// File: sqlext.h
//
// Contents: This is the include for applications using the Microsoft SQL Extensions
//
// Comments:
//
//-----------------------------------------------------------------------------
#if defined(_MSC_VER) && (_MSC_VER > 1000)
#pragma once
#endif
#ifndef __SQLEXT
#define __SQLEXT
#include <winapifamily.h>
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifndef __SQL
#include "sql.h"
#endif
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
/* generally useful constants */
#define SQL_SPEC_MAJOR 4 /* Major version of specification */
#define SQL_SPEC_MINOR 00 /* Minor version of specification */
#define SQL_SPEC_STRING "04.00" /* String constant for version */
#define SQL_SQLSTATE_SIZE 5 /* size of SQLSTATE */
typedef SQLTCHAR SQLSTATE[SQL_SQLSTATE_SIZE+1];
#define SQL_MAX_DSN_LENGTH 32 /* maximum data source name size */
#define SQL_MAX_OPTION_STRING_LENGTH 256
/* return code SQL_NO_DATA_FOUND is the same as SQL_NO_DATA */
#if (ODBCVER < 0x0300)
#define SQL_NO_DATA_FOUND 100
#else
#define SQL_NO_DATA_FOUND SQL_NO_DATA
#endif
/* extended function return values */
#if (ODBCVER >= 0x0400)
#define SQL_DATA_AVAILABLE 102
#define SQL_METADATA_CHANGED 103
#define SQL_MORE_DATA 104
#endif /*ODBC >= 0x0400*/
/* an end handle type */
#if (ODBCVER >= 0x0300)
#define SQL_HANDLE_SENV 5
#endif /* ODBCVER >= 0x0300 */
/* env attribute */
#if (ODBCVER >= 0x0300)
#define SQL_ATTR_ODBC_VERSION 200
#define SQL_ATTR_CONNECTION_POOLING 201
#define SQL_ATTR_CP_MATCH 202
// For private driver manager
#define SQL_ATTR_APPLICATION_KEY 203
#endif /* ODBCVER >= 0x0300 */
#if (ODBCVER >= 0x0300)
/* values for SQL_ATTR_CONNECTION_POOLING */
#define SQL_CP_OFF 0UL
#define SQL_CP_ONE_PER_DRIVER 1UL
#define SQL_CP_ONE_PER_HENV 2UL
#define SQL_CP_DRIVER_AWARE 3UL
#define SQL_CP_DEFAULT SQL_CP_OFF
/* values for SQL_ATTR_CP_MATCH */
#define SQL_CP_STRICT_MATCH 0UL
#define SQL_CP_RELAXED_MATCH 1UL
#define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH
/* values for SQL_ATTR_ODBC_VERSION */
#define SQL_OV_ODBC2 2UL
#define SQL_OV_ODBC3 3UL
#endif /* ODBCVER >= 0x0300 */
#if (ODBCVER >= 0x0380)
// new values for SQL_ATTR_ODBC_VERSION
// From ODBC 3.8 onwards, we should use <major version> * 100 + <minor version>
#define SQL_OV_ODBC3_80 380UL
#endif /* ODBCVER >= 0x0380 */
#if (ODBCVER >= 0x0400)
#define SQL_OV_ODBC4 400UL
#endif /* ODBCVER >= 0x0400 */
/* connection attributes */
#define SQL_ACCESS_MODE 101
#define SQL_AUTOCOMMIT 102
#define SQL_LOGIN_TIMEOUT 103
#define SQL_OPT_TRACE 104
#define SQL_OPT_TRACEFILE 105
#define SQL_TRANSLATE_DLL 106
#define SQL_TRANSLATE_OPTION 107
#define SQL_TXN_ISOLATION 108
#define SQL_CURRENT_QUALIFIER 109
#define SQL_ODBC_CURSORS 110
#define SQL_QUIET_MODE 111
#define SQL_PACKET_SIZE 112
/* connection attributes with new names */
#if (ODBCVER >= 0x0300)
#define SQL_ATTR_ACCESS_MODE SQL_ACCESS_MODE
#define SQL_ATTR_AUTOCOMMIT SQL_AUTOCOMMIT
#define SQL_ATTR_CONNECTION_TIMEOUT 113
#define SQL_ATTR_CURRENT_CATALOG SQL_CURRENT_QUALIFIER
#define SQL_ATTR_DISCONNECT_BEHAVIOR 114
#define SQL_ATTR_ENLIST_IN_DTC 1207
#define SQL_ATTR_ENLIST_IN_XA 1208
#define SQL_ATTR_LOGIN_TIMEOUT SQL_LOGIN_TIMEOUT
#define SQL_ATTR_ODBC_CURSORS SQL_ODBC_CURSORS
#define SQL_ATTR_PACKET_SIZE SQL_PACKET_SIZE
#define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE
#define SQL_ATTR_TRACE SQL_OPT_TRACE
#define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE
#define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL
#define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION
#define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION
#endif /* ODBCVER >= 0x0300 */
#define SQL_ATTR_CONNECTION_DEAD 1209 /* GetConnectAttr only */
#if (ODBCVER >= 0x0351)
/* ODBC Driver Manager sets this connection attribute to a unicode driver
(which supports SQLConnectW) when the application is an ANSI application
(which calls SQLConnect, SQLDriverConnect, or SQLBrowseConnect).
This is SetConnectAttr only and application does not set this attribute
This attribute was introduced because some unicode driver's some APIs may
need to behave differently on ANSI or Unicode applications. A unicode
driver, which has same behavior for both ANSI or Unicode applications,
should return SQL_ERROR when the driver manager sets this connection
attribute. When a unicode driver returns SQL_SUCCESS on this attribute,
the driver manager treates ANSI and Unicode connections differently in
connection pooling.
*/
#define SQL_ATTR_ANSI_APP 115
#endif
#if (ODBCVER >= 0x0380)
#define SQL_ATTR_RESET_CONNECTION 116
#define SQL_ATTR_ASYNC_DBC_FUNCTIONS_ENABLE 117
#endif
// Connection attribute 118 is defined in sqlspi.h
#if (ODBCVER >= 0x0380)
#define SQL_ATTR_ASYNC_DBC_EVENT 119
#endif /* ODBCVER >= 0x0380 */
// Connection attribute 120 and 121 are defined in sqlspi.h
#if (ODBCVER >= 0x0400)
#define SQL_ATTR_CREDENTIALS 122
#define SQL_ATTR_REFRESH_CONNECTION 123
#endif /* ODBCVER >= 0x0400 */
/* SQL_CONNECT_OPT_DRVR_START is not meaningful for 3.0 driver */
#if (ODBCVER < 0x0300)
#define SQL_CONNECT_OPT_DRVR_START 1000
#endif /* ODBCVER < 0x0300 */
#if (ODBCVER < 0x0300)
#define SQL_CONN_OPT_MAX SQL_PACKET_SIZE
#define SQL_CONN_OPT_MIN SQL_ACCESS_MODE
#endif /* ODBCVER < 0x0300 */
/* SQL_ACCESS_MODE options */
#define SQL_MODE_READ_WRITE 0UL
#define SQL_MODE_READ_ONLY 1UL
#define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE
/* SQL_AUTOCOMMIT options */
#define SQL_AUTOCOMMIT_OFF 0UL
#define SQL_AUTOCOMMIT_ON 1UL
#define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON
/* SQL_LOGIN_TIMEOUT options */
#define SQL_LOGIN_TIMEOUT_DEFAULT 15UL
/* SQL_OPT_TRACE options */
#define SQL_OPT_TRACE_OFF 0UL
#define SQL_OPT_TRACE_ON 1UL
#define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF
#define SQL_OPT_TRACE_FILE_DEFAULT "\\SQL.LOG"
/* SQL_ODBC_CURSORS options */
#pragma deprecated(SQL_CUR_USE_IF_NEEDED,SQL_CUR_USE_ODBC)
// SQL_CUR_USE_IF_NEEDED and SQL_CUR_USE_ODBC are deprecated.
// Please use SQL_CUR_USE_DRIVER for cursor functionalities provided by drivers
#define SQL_CUR_USE_IF_NEEDED 0UL
#define SQL_CUR_USE_ODBC 1UL
#define SQL_CUR_USE_DRIVER 2UL
#define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER
#if (ODBCVER >= 0x0300)
/* values for SQL_ATTR_DISCONNECT_BEHAVIOR */
#define SQL_DB_RETURN_TO_POOL 0UL
#define SQL_DB_DISCONNECT 1UL
#define SQL_DB_DEFAULT SQL_DB_RETURN_TO_POOL
/* values for SQL_ATTR_ENLIST_IN_DTC */
#define SQL_DTC_DONE 0L
#endif /* ODBCVER >= 0x0300 */
/* values for SQL_ATTR_CONNECTION_DEAD */
#define SQL_CD_TRUE 1L /* Connection is closed/dead */
#define SQL_CD_FALSE 0L /* Connection is open/available */
/* values for SQL_ATTR_ANSI_APP */
#if (ODBCVER >= 0x0351)
#define SQL_AA_TRUE 1L /* the application is an ANSI app */
#define SQL_AA_FALSE 0L /* the application is a Unicode app */
#endif
/* values for SQL_ATTR_RESET_CONNECTION */
#if (ODBCVER >= 0x0380)
#define SQL_RESET_CONNECTION_YES 1UL
#endif
/* values for SQL_ATTR_ASYNC_DBC_FUNCTIONS_ENABLE */
#if (ODBCVER >= 0x0380)
#define SQL_ASYNC_DBC_ENABLE_ON 1UL
#define SQL_ASYNC_DBC_ENABLE_OFF 0UL
#define SQL_ASYNC_DBC_ENABLE_DEFAULT SQL_ASYNC_DBC_ENABLE_OFF
#endif // ODBCVER >= 0x0380
/* values for SQL_ATTR_REFRESH_CONNECTION */
#if (ODBCVER >= 0x0400)
#define SQL_REFRESH_NOW -1
#define SQL_REFRESH_AUTO 0
#define SQL_REFRESH_MANUAL 1
#endif /* ODBCVER >= 0x0400 */
/* statement attributes */
#define SQL_QUERY_TIMEOUT 0
#define SQL_MAX_ROWS 1
#define SQL_NOSCAN 2
#define SQL_MAX_LENGTH 3
#define SQL_ASYNC_ENABLE 4
#define SQL_BIND_TYPE 5
#define SQL_CURSOR_TYPE 6
#define SQL_CONCURRENCY 7
#define SQL_KEYSET_SIZE 8
#define SQL_ROWSET_SIZE 9
#define SQL_SIMULATE_CURSOR 10
#define SQL_RETRIEVE_DATA 11
#define SQL_USE_BOOKMARKS 12
#define SQL_GET_BOOKMARK 13 /* GetStmtOption Only */
#define SQL_ROW_NUMBER 14 /* GetStmtOption Only */
/* statement attributes for ODBC 3.0 */
#if (ODBCVER >= 0x0300)
#define SQL_ATTR_ASYNC_ENABLE SQL_ASYNC_ENABLE
#define SQL_ATTR_CONCURRENCY SQL_CONCURRENCY
#define SQL_ATTR_CURSOR_TYPE SQL_CURSOR_TYPE
#define SQL_ATTR_ENABLE_AUTO_IPD 15
#define SQL_ATTR_FETCH_BOOKMARK_PTR 16
#define SQL_ATTR_KEYSET_SIZE SQL_KEYSET_SIZE
#define SQL_ATTR_MAX_LENGTH SQL_MAX_LENGTH
#define SQL_ATTR_MAX_ROWS SQL_MAX_ROWS
#define SQL_ATTR_NOSCAN SQL_NOSCAN
#define SQL_ATTR_PARAM_BIND_OFFSET_PTR 17
#define SQL_ATTR_PARAM_BIND_TYPE 18
#define SQL_ATTR_PARAM_OPERATION_PTR 19
#define SQL_ATTR_PARAM_STATUS_PTR 20
#define SQL_ATTR_PARAMS_PROCESSED_PTR 21
#define SQL_ATTR_PARAMSET_SIZE 22
#define SQL_ATTR_QUERY_TIMEOUT SQL_QUERY_TIMEOUT
#define SQL_ATTR_RETRIEVE_DATA SQL_RETRIEVE_DATA
#define SQL_ATTR_ROW_BIND_OFFSET_PTR 23
#define SQL_ATTR_ROW_BIND_TYPE SQL_BIND_TYPE
#define SQL_ATTR_ROW_NUMBER SQL_ROW_NUMBER /*GetStmtAttr*/
#define SQL_ATTR_ROW_OPERATION_PTR 24
#define SQL_ATTR_ROW_STATUS_PTR 25
#define SQL_ATTR_ROWS_FETCHED_PTR 26
#define SQL_ATTR_ROW_ARRAY_SIZE 27
#define SQL_ATTR_SIMULATE_CURSOR SQL_SIMULATE_CURSOR
#define SQL_ATTR_USE_BOOKMARKS SQL_USE_BOOKMARKS
#endif /* ODBCVER >= 0x0300 */
#if (ODBCVER >= 0x0380)
#define SQL_ATTR_ASYNC_STMT_EVENT 29
#endif /* ODBCVER >= 0x0380 */
#if (ODBCVER >= 0x0400)
#define SQL_ATTR_SAMPLE_SIZE 30
#define SQL_ATTR_DYNAMIC_COLUMNS 31
#define SQL_ATTR_TYPE_EXCEPTION_BEHAVIOR 32
#define SQL_ATTR_LENGTH_EXCEPTION_BEHAVIOR 33
#endif /* ODBCVER >= 0x0400 */
#if (ODBCVER < 0x0300)
#define SQL_STMT_OPT_MAX SQL_ROW_NUMBER
#define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT
#endif /* ODBCVER < 0x0300 */
/* SQL_ATTR_TYPE_EXCEPTION_BEHAVIOR values */
#if (ODBCVER >= 0x0400)
#define SQL_TE_ERROR 0x0001
#define SQL_TE_CONTINUE 0x0002
#define SQL_TE_REPORT 0x0003
#endif /* ODBCVER >= 0x0400 */
/* SQL_ATTR_LENGTH_EXCEPTION_BEHAVIOR values */
#if (ODBCVER >= 0x0400)
#define SQL_LE_CONTINUE 0x0001
#define SQL_LE_REPORT 0x0002
#endif /* ODBCVER >= 0x0400 */
/* New defines for SEARCHABLE column in SQLGetTypeInfo */
#if (ODBCVER >= 0x0300)
#define SQL_COL_PRED_CHAR SQL_LIKE_ONLY
#define SQL_COL_PRED_BASIC SQL_ALL_EXCEPT_LIKE
#endif /* ODBCVER >= 0x0300 */
/* whether an attribute is a pointer or not */
#if (ODBCVER >= 0x0300)
#define SQL_IS_POINTER (-4)
#define SQL_IS_UINTEGER (-5)
#define SQL_IS_INTEGER (-6)
#define SQL_IS_USMALLINT (-7)
#define SQL_IS_SMALLINT (-8)
#endif /* ODBCVER >= 0x0300 */
/* the value of SQL_ATTR_PARAM_BIND_TYPE */
#if (ODBCVER >= 0x0300)
#define SQL_PARAM_BIND_BY_COLUMN 0UL
#define SQL_PARAM_BIND_TYPE_DEFAULT SQL_PARAM_BIND_BY_COLUMN
#endif /* ODBCVER >= 0x0300 */
/* SQL_QUERY_TIMEOUT options */
#define SQL_QUERY_TIMEOUT_DEFAULT 0UL
/* SQL_MAX_ROWS options */
#define SQL_MAX_ROWS_DEFAULT 0UL
/* SQL_NOSCAN options */
#define SQL_NOSCAN_OFF 0UL /* 1.0 FALSE */
#define SQL_NOSCAN_ON 1UL /* 1.0 TRUE */
#define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF
/* SQL_MAX_LENGTH options */
#define SQL_MAX_LENGTH_DEFAULT 0UL
/* values for SQL_ATTR_ASYNC_ENABLE */
#define SQL_ASYNC_ENABLE_OFF 0UL
#define SQL_ASYNC_ENABLE_ON 1UL
#define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF
/* SQL_BIND_TYPE options */
#define SQL_BIND_BY_COLUMN 0UL
#define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN /* Default value */
/* SQL_CONCURRENCY options */
#define SQL_CONCUR_READ_ONLY 1
#define SQL_CONCUR_LOCK 2
#define SQL_CONCUR_ROWVER 3
#define SQL_CONCUR_VALUES 4
#define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY /* Default value */
/* SQL_CURSOR_TYPE options */
#define SQL_CURSOR_FORWARD_ONLY 0UL
#define SQL_CURSOR_KEYSET_DRIVEN 1UL
#define SQL_CURSOR_DYNAMIC 2UL
#define SQL_CURSOR_STATIC 3UL
#define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY /* Default value */
/* SQL_ROWSET_SIZE options */
#define SQL_ROWSET_SIZE_DEFAULT 1UL
/* SQL_KEYSET_SIZE options */
#define SQL_KEYSET_SIZE_DEFAULT 0UL
/* SQL_SIMULATE_CURSOR options */
#define SQL_SC_NON_UNIQUE 0UL
#define SQL_SC_TRY_UNIQUE 1UL
#define SQL_SC_UNIQUE 2UL
/* SQL_RETRIEVE_DATA options */
#define SQL_RD_OFF 0UL
#define SQL_RD_ON 1UL
#define SQL_RD_DEFAULT SQL_RD_ON
/* SQL_USE_BOOKMARKS options */
#define SQL_UB_OFF 0UL
#define SQL_UB_ON 01UL
#define SQL_UB_DEFAULT SQL_UB_OFF
/* New values for SQL_USE_BOOKMARKS attribute */
#if (ODBCVER >= 0x0300)
#define SQL_UB_FIXED SQL_UB_ON
#define SQL_UB_VARIABLE 2UL
#endif /* ODBCVER >= 0x0300 */
/* extended descriptor field */
#if (ODBCVER >= 0x0300)
#define SQL_DESC_ARRAY_SIZE 20
#define SQL_DESC_ARRAY_STATUS_PTR 21
#define SQL_DESC_AUTO_UNIQUE_VALUE SQL_COLUMN_AUTO_INCREMENT
#define SQL_DESC_BASE_COLUMN_NAME 22
#define SQL_DESC_BASE_TABLE_NAME 23
#define SQL_DESC_BIND_OFFSET_PTR 24
#define SQL_DESC_BIND_TYPE 25
#define SQL_DESC_CASE_SENSITIVE SQL_COLUMN_CASE_SENSITIVE
#define SQL_DESC_CATALOG_NAME SQL_COLUMN_QUALIFIER_NAME
#define SQL_DESC_CONCISE_TYPE SQL_COLUMN_TYPE
#define SQL_DESC_DATETIME_INTERVAL_PRECISION 26
#define SQL_DESC_DISPLAY_SIZE SQL_COLUMN_DISPLAY_SIZE
#define SQL_DESC_FIXED_PREC_SCALE SQL_COLUMN_MONEY
#define SQL_DESC_LABEL SQL_COLUMN_LABEL
#define SQL_DESC_LITERAL_PREFIX 27
#define SQL_DESC_LITERAL_SUFFIX 28
#define SQL_DESC_LOCAL_TYPE_NAME 29
#define SQL_DESC_MAXIMUM_SCALE 30
#define SQL_DESC_MINIMUM_SCALE 31
#define SQL_DESC_NUM_PREC_RADIX 32
#define SQL_DESC_PARAMETER_TYPE 33
#define SQL_DESC_ROWS_PROCESSED_PTR 34
#if (ODBCVER >= 0x0350)
#define SQL_DESC_ROWVER 35
#endif /* ODBCVER >= 0x0350 */
#define SQL_DESC_SCHEMA_NAME SQL_COLUMN_OWNER_NAME
#define SQL_DESC_SEARCHABLE SQL_COLUMN_SEARCHABLE
#define SQL_DESC_TYPE_NAME SQL_COLUMN_TYPE_NAME
#define SQL_DESC_TABLE_NAME SQL_COLUMN_TABLE_NAME
#define SQL_DESC_UNSIGNED SQL_COLUMN_UNSIGNED
#define SQL_DESC_UPDATABLE SQL_COLUMN_UPDATABLE
#endif /* ODBCVER >= 0x0300 */
#if (ODBCVER >= 0x0400)
#define SQL_DESC_MIME_TYPE 36
#endif /* ODBCVER >= 0x0400 */
/* defines for diagnostics fields */
#if (ODBCVER >= 0x0300)
#define SQL_DIAG_CURSOR_ROW_COUNT (-1249)
#define SQL_DIAG_ROW_NUMBER (-1248)
#define SQL_DIAG_COLUMN_NUMBER (-1247)
#endif /* ODBCVER >= 0x0300 */
/* SQL extended datatypes */
#define SQL_DATE 9
#if (ODBCVER >= 0x0300)
#define SQL_INTERVAL 10
#endif /* ODBCVER >= 0x0300 */
#define SQL_TIME 10
#define SQL_TIMESTAMP 11
#define SQL_LONGVARCHAR (-1)
#define SQL_BINARY (-2)
#define SQL_VARBINARY (-3)
#define SQL_LONGVARBINARY (-4)
#define SQL_BIGINT (-5)
#define SQL_TINYINT (-6)
#define SQL_BIT (-7)
#if (ODBCVER >= 0x0350)
#define SQL_GUID (-11)
#endif /* ODBCVER >= 0x0350 */
#if (ODBCVER >= 0x0300)
/* interval code */
#define SQL_CODE_YEAR 1
#define SQL_CODE_MONTH 2
#define SQL_CODE_DAY 3
#define SQL_CODE_HOUR 4
#define SQL_CODE_MINUTE 5
#define SQL_CODE_SECOND 6
#define SQL_CODE_YEAR_TO_MONTH 7
#define SQL_CODE_DAY_TO_HOUR 8
#define SQL_CODE_DAY_TO_MINUTE 9
#define SQL_CODE_DAY_TO_SECOND 10
#define SQL_CODE_HOUR_TO_MINUTE 11
#define SQL_CODE_HOUR_TO_SECOND 12
#define SQL_CODE_MINUTE_TO_SECOND 13
#define SQL_INTERVAL_YEAR (100 + SQL_CODE_YEAR)
#define SQL_INTERVAL_MONTH (100 + SQL_CODE_MONTH)
#define SQL_INTERVAL_DAY (100 + SQL_CODE_DAY)
#define SQL_INTERVAL_HOUR (100 + SQL_CODE_HOUR)
#define SQL_INTERVAL_MINUTE (100 + SQL_CODE_MINUTE)
#define SQL_INTERVAL_SECOND (100 + SQL_CODE_SECOND)
#define SQL_INTERVAL_YEAR_TO_MONTH (100 + SQL_CODE_YEAR_TO_MONTH)
#define SQL_INTERVAL_DAY_TO_HOUR (100 + SQL_CODE_DAY_TO_HOUR)
#define SQL_INTERVAL_DAY_TO_MINUTE (100 + SQL_CODE_DAY_TO_MINUTE)
#define SQL_INTERVAL_DAY_TO_SECOND (100 + SQL_CODE_DAY_TO_SECOND)
#define SQL_INTERVAL_HOUR_TO_MINUTE (100 + SQL_CODE_HOUR_TO_MINUTE)
#define SQL_INTERVAL_HOUR_TO_SECOND (100 + SQL_CODE_HOUR_TO_SECOND)
#define SQL_INTERVAL_MINUTE_TO_SECOND (100 + SQL_CODE_MINUTE_TO_SECOND)
#else
#define SQL_INTERVAL_YEAR (-80)
#define SQL_INTERVAL_MONTH (-81)
#define SQL_INTERVAL_YEAR_TO_MONTH (-82)
#define SQL_INTERVAL_DAY (-83)
#define SQL_INTERVAL_HOUR (-84)
#define SQL_INTERVAL_MINUTE (-85)
#define SQL_INTERVAL_SECOND (-86)
#define SQL_INTERVAL_DAY_TO_HOUR (-87)
#define SQL_INTERVAL_DAY_TO_MINUTE (-88)
#define SQL_INTERVAL_DAY_TO_SECOND (-89)
#define SQL_INTERVAL_HOUR_TO_MINUTE (-90)
#define SQL_INTERVAL_HOUR_TO_SECOND (-91)
#define SQL_INTERVAL_MINUTE_TO_SECOND (-92)
#endif /* ODBCVER >= 0x0300 */
#if (ODBCVER <= 0x0300)
#define SQL_UNICODE (-95)
#define SQL_UNICODE_VARCHAR (-96)
#define SQL_UNICODE_LONGVARCHAR (-97)
#define SQL_UNICODE_CHAR SQL_UNICODE
#else
/* The previous definitions for SQL_UNICODE_ are historical and obsolete */
#define SQL_UNICODE SQL_WCHAR
#define SQL_UNICODE_VARCHAR SQL_WVARCHAR
#define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR
#define SQL_UNICODE_CHAR SQL_WCHAR
#endif
#if (ODBCVER < 0x0300)
#define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR
#define SQL_TYPE_DRIVER_END SQL_UNICODE_LONGVARCHAR
#endif /* ODBCVER < 0x0300 */
/* C datatype to SQL datatype mapping SQL types
------------------- */
#define SQL_C_CHAR SQL_CHAR /* CHAR, VARCHAR, DECIMAL, NUMERIC */
#define SQL_C_LONG SQL_INTEGER /* INTEGER */
#define SQL_C_SHORT SQL_SMALLINT /* SMALLINT */
#define SQL_C_FLOAT SQL_REAL /* REAL */
#define SQL_C_DOUBLE SQL_DOUBLE /* FLOAT, DOUBLE */
#if (ODBCVER >= 0x0300)
#define SQL_C_NUMERIC SQL_NUMERIC
#endif /* ODBCVER >= 0x0300 */
#define SQL_C_DEFAULT 99
#define SQL_SIGNED_OFFSET (-20)
#define SQL_UNSIGNED_OFFSET (-22)
/* C datatype to SQL datatype mapping */
#define SQL_C_DATE SQL_DATE
#define SQL_C_TIME SQL_TIME
#define SQL_C_TIMESTAMP SQL_TIMESTAMP
#if (ODBCVER >= 0x0300)
#define SQL_C_TYPE_DATE SQL_TYPE_DATE
#define SQL_C_TYPE_TIME SQL_TYPE_TIME
#define SQL_C_TYPE_TIMESTAMP SQL_TYPE_TIMESTAMP
#if (ODBCVER >= 0x0400)
#define SQL_C_TYPE_TIME_WITH_TIMEZONE SQL_TYPE_TIME_WITH_TIMEZONE
#define SQL_C_TYPE_TIMESTAMP_WITH_TIMEZONE SQL_TYPE_TIMESTAMP_WITH_TIMEZONE
#endif /* ODBCVER >= 0x0400 */
#define SQL_C_INTERVAL_YEAR SQL_INTERVAL_YEAR
#define SQL_C_INTERVAL_MONTH SQL_INTERVAL_MONTH
#define SQL_C_INTERVAL_DAY SQL_INTERVAL_DAY
#define SQL_C_INTERVAL_HOUR SQL_INTERVAL_HOUR
#define SQL_C_INTERVAL_MINUTE SQL_INTERVAL_MINUTE
#define SQL_C_INTERVAL_SECOND SQL_INTERVAL_SECOND
#define SQL_C_INTERVAL_YEAR_TO_MONTH SQL_INTERVAL_YEAR_TO_MONTH
#define SQL_C_INTERVAL_DAY_TO_HOUR SQL_INTERVAL_DAY_TO_HOUR
#define SQL_C_INTERVAL_DAY_TO_MINUTE SQL_INTERVAL_DAY_TO_MINUTE
#define SQL_C_INTERVAL_DAY_TO_SECOND SQL_INTERVAL_DAY_TO_SECOND
#define SQL_C_INTERVAL_HOUR_TO_MINUTE SQL_INTERVAL_HOUR_TO_MINUTE
#define SQL_C_INTERVAL_HOUR_TO_SECOND SQL_INTERVAL_HOUR_TO_SECOND
#define SQL_C_INTERVAL_MINUTE_TO_SECOND SQL_INTERVAL_MINUTE_TO_SECOND
#endif /* ODBCVER >= 0x0300 */
#define SQL_C_BINARY SQL_BINARY
#define SQL_C_BIT SQL_BIT
#if (ODBCVER >= 0x0300)
#define SQL_C_SBIGINT (SQL_BIGINT+SQL_SIGNED_OFFSET) /* SIGNED BIGINT */
#define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED BIGINT */
#endif /* ODBCVER >= 0x0300 */
#define SQL_C_TINYINT SQL_TINYINT
#define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET) /* SIGNED INTEGER */
#define SQL_C_SSHORT (SQL_C_SHORT+SQL_SIGNED_OFFSET) /* SIGNED SMALLINT */
#define SQL_C_STINYINT (SQL_TINYINT+SQL_SIGNED_OFFSET) /* SIGNED TINYINT */
#define SQL_C_ULONG (SQL_C_LONG+SQL_UNSIGNED_OFFSET) /* UNSIGNED INTEGER*/
#define SQL_C_USHORT (SQL_C_SHORT+SQL_UNSIGNED_OFFSET) /* UNSIGNED SMALLINT*/
#define SQL_C_UTINYINT (SQL_TINYINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED TINYINT*/
#ifdef _WIN64
#define SQL_C_BOOKMARK SQL_C_UBIGINT /* BOOKMARK */
#else
#define SQL_C_BOOKMARK SQL_C_ULONG /* BOOKMARK */
#endif
#if (ODBCVER >= 0x0350)
#define SQL_C_GUID SQL_GUID
#endif /* ODBCVER >= 0x0350 */
#define SQL_TYPE_NULL 0
#if (ODBCVER < 0x0300)
#define SQL_TYPE_MIN SQL_BIT
#define SQL_TYPE_MAX SQL_VARCHAR
#endif
// base value of driver-specific C-Type (max is 0x7fff)
// define driver-specific C-Type, named as SQL_DRIVER_C_TYPE_BASE,
// SQL_DRIVER_C_TYPE_BASE+1, SQL_DRIVER_C_TYPE_BASE+2, etc.
#if (ODBCVER >= 0x380)
#define SQL_DRIVER_C_TYPE_BASE 0x4000
#endif
// base value of driver-specific fields/attributes (max are 0x7fff [16-bit] or 0x00007fff [32-bit])
// define driver-specific SQL-Type, named as SQL_DRIVER_SQL_TYPE_BASE,
// SQL_DRIVER_SQL_TYPE_BASE+1, SQL_DRIVER_SQL_TYPE_BASE+2, etc.
//
// Please note that there is no runtime change in this version of DM.
// However, we suggest that driver manufacturers adhere to this range
// as future versions of the DM may enforce these constraints
#if (ODBCVER >= 0x380)
#define SQL_DRIVER_SQL_TYPE_BASE 0x4000
#define SQL_DRIVER_DESC_FIELD_BASE 0x4000
#define SQL_DRIVER_DIAG_FIELD_BASE 0x4000
#define SQL_DRIVER_INFO_TYPE_BASE 0x4000
#define SQL_DRIVER_CONN_ATTR_BASE 0x00004000 // 32-bit
#define SQL_DRIVER_STMT_ATTR_BASE 0x00004000 // 32-bit
#endif
#if (ODBCVER >= 0x0300)
#define SQL_C_VARBOOKMARK SQL_C_BINARY
#endif /* ODBCVER >= 0x0300 */
/* define for SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER */
#if (ODBCVER >= 0x0300)
#define SQL_NO_ROW_NUMBER (-1)
#define SQL_NO_COLUMN_NUMBER (-1)
#define SQL_ROW_NUMBER_UNKNOWN (-2)
#define SQL_COLUMN_NUMBER_UNKNOWN (-2)
#endif
/* SQLBindParameter extensions */
#define SQL_DEFAULT_PARAM (-5)
#define SQL_IGNORE (-6)
#if (ODBCVER >= 0x0300)
#define SQL_COLUMN_IGNORE SQL_IGNORE
#endif /* ODBCVER >= 0x0300 */
#define SQL_LEN_DATA_AT_EXEC_OFFSET (-100)
#define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET)
/* binary length for driver specific attributes */
#define SQL_LEN_BINARY_ATTR_OFFSET (-100)
#define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET)
/* Defines used by Driver Manager when mapping SQLSetParam to SQLBindParameter
*/
#define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT
#define SQL_SETPARAM_VALUE_MAX (-1L)
/* Extended length/indicator values Values */
#if (ODBCVER >= 0x0400)
#define SQL_DATA_UNAVAILABLE SQL_IGNORE
#define SQL_DATA_AT_FETCH SQL_DATA_AT_EXEC
#define SQL_TYPE_EXCEPTION (-20)
#endif /* ODBCVER >= 0x400 */
/* SQLColAttributes defines */
#define SQL_COLUMN_COUNT 0
#define SQL_COLUMN_NAME 1
#define SQL_COLUMN_TYPE 2
#define SQL_COLUMN_LENGTH 3
#define SQL_COLUMN_PRECISION 4
#define SQL_COLUMN_SCALE 5
#define SQL_COLUMN_DISPLAY_SIZE 6
#define SQL_COLUMN_NULLABLE 7
#define SQL_COLUMN_UNSIGNED 8
#define SQL_COLUMN_MONEY 9
#define SQL_COLUMN_UPDATABLE 10
#define SQL_COLUMN_AUTO_INCREMENT 11
#define SQL_COLUMN_CASE_SENSITIVE 12
#define SQL_COLUMN_SEARCHABLE 13
#define SQL_COLUMN_TYPE_NAME 14
#define SQL_COLUMN_TABLE_NAME 15
#define SQL_COLUMN_OWNER_NAME 16
#define SQL_COLUMN_QUALIFIER_NAME 17
#define SQL_COLUMN_LABEL 18
#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
#if (ODBCVER < 0x0300)
#define SQL_COLUMN_DRIVER_START 1000
#endif /* ODBCVER < 0x0300 */
#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
/* SQLColAttributes subdefines for SQL_COLUMN_UPDATABLE */
#define SQL_ATTR_READONLY 0
#define SQL_ATTR_WRITE 1
#define SQL_ATTR_READWRITE_UNKNOWN 2
/* SQLColAttributes subdefines for SQL_COLUMN_SEARCHABLE */
/* These are also used by SQLGetInfo */
#define SQL_UNSEARCHABLE 0
#define SQL_LIKE_ONLY 1
#define SQL_ALL_EXCEPT_LIKE 2
#define SQL_SEARCHABLE 3
#define SQL_PRED_SEARCHABLE SQL_SEARCHABLE
/* Special return values for SQLGetData */
#define SQL_NO_TOTAL (-4)
/********************************************/
/* SQLGetFunctions: additional values for */
/* fFunction to represent functions that */
/* are not in the X/Open spec. */
/********************************************/
#if (ODBCVER >= 0x0300)
#define SQL_API_SQLALLOCHANDLESTD 73
#define SQL_API_SQLBULKOPERATIONS 24
#endif /* ODBCVER >= 0x0300 */
#define SQL_API_SQLBINDPARAMETER 72
#define SQL_API_SQLBROWSECONNECT 55
#define SQL_API_SQLCOLATTRIBUTES 6
#define SQL_API_SQLCOLUMNPRIVILEGES 56
#define SQL_API_SQLDESCRIBEPARAM 58
#define SQL_API_SQLDRIVERCONNECT 41
#define SQL_API_SQLDRIVERS 71
#define SQL_API_SQLEXTENDEDFETCH 59
#define SQL_API_SQLFOREIGNKEYS 60
#define SQL_API_SQLMORERESULTS 61
#define SQL_API_SQLNATIVESQL 62
#define SQL_API_SQLNUMPARAMS 63
#define SQL_API_SQLPARAMOPTIONS 64
#define SQL_API_SQLPRIMARYKEYS 65
#define SQL_API_SQLPROCEDURECOLUMNS 66
#define SQL_API_SQLPROCEDURES 67
#define SQL_API_SQLSETPOS 68
#define SQL_API_SQLSETSCROLLOPTIONS 69
#define SQL_API_SQLTABLEPRIVILEGES 70
#if (ODBCVER >= 0x0400)
#define SQL_API_SQLGETNESTEDHANDLE 74
#define SQL_API_SQLSTRUCTUREDTYPES 75
#define SQL_API_SQLSTRUCTUREDTYPECOLUMNS 76
#define SQL_API_SQLNEXTCOLUMN 77
#endif /* ODBCVER >= 0x0400 */
/*-------------------------------------------*/
/* SQL_EXT_API_LAST is not useful with ODBC */
/* version 3.0 because some of the values */
/* from X/Open are in the 10000 range. */
/*-------------------------------------------*/
#if (ODBCVER < 0x0300)
#define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER
#define SQL_NUM_FUNCTIONS 23
#define SQL_EXT_API_START 40
#define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1)
#endif
/*--------------------------------------------*/
/* SQL_API_ALL_FUNCTIONS returns an array */
/* of 'booleans' representing whether a */
/* function is implemented by the driver. */
/* */
/* CAUTION: Only functions defined in ODBC */
/* version 2.0 and earlier are returned, the */
/* new high-range function numbers defined by */
/* X/Open break this scheme. See the new */
/* method -- SQL_API_ODBC3_ALL_FUNCTIONS */
/*--------------------------------------------*/
#define SQL_API_ALL_FUNCTIONS 0 /* See CAUTION above */
/*----------------------------------------------*/
/* 2.X drivers export a dummy function with */
/* ordinal number SQL_API_LOADBYORDINAL to speed*/
/* loading under the windows operating system. */
/* */
/* CAUTION: Loading by ordinal is not supported */
/* for 3.0 and above drivers. */
/*----------------------------------------------*/
#define SQL_API_LOADBYORDINAL 199 /* See CAUTION above */
/*----------------------------------------------*/
/* SQL_API_ODBC3_ALL_FUNCTIONS */
/* This returns a bitmap, which allows us to */
/* handle the higher-valued function numbers. */
/* Use SQL_FUNC_EXISTS(bitmap,function_number) */
/* to determine if the function exists. */
/*----------------------------------------------*/
#if (ODBCVER >= 0x0300)
#define SQL_API_ODBC3_ALL_FUNCTIONS 999
#define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250 /* array of 250 words */
#define SQL_FUNC_EXISTS(pfExists, uwAPI) \
((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) \
& (1 << ((uwAPI) & 0x000F)) \
) ? SQL_TRUE : SQL_FALSE \
)
#endif /* ODBCVER >= 0x0300 */
/************************************************/
/* Extended definitions for SQLGetInfo */
/************************************************/
/*---------------------------------*/
/* Values in ODBC 2.0 that are not */
/* in the X/Open spec */
/*---------------------------------*/
#define SQL_INFO_FIRST 0
#define SQL_ACTIVE_CONNECTIONS 0 /* MAX_DRIVER_CONNECTIONS */
#define SQL_ACTIVE_STATEMENTS 1 /* MAX_CONCURRENT_ACTIVITIES */
#define SQL_DRIVER_HDBC 3
#define SQL_DRIVER_HENV 4
#define SQL_DRIVER_HSTMT 5
#define SQL_DRIVER_NAME 6
#define SQL_DRIVER_VER 7
#define SQL_ODBC_API_CONFORMANCE 9
#define SQL_ODBC_VER 10
#define SQL_ROW_UPDATES 11
#define SQL_ODBC_SAG_CLI_CONFORMANCE 12
#define SQL_ODBC_SQL_CONFORMANCE 15
#define SQL_PROCEDURES 21
#define SQL_CONCAT_NULL_BEHAVIOR 22
#define SQL_CURSOR_ROLLBACK_BEHAVIOR 24
#define SQL_EXPRESSIONS_IN_ORDERBY 27
#define SQL_MAX_OWNER_NAME_LEN 32 /* MAX_SCHEMA_NAME_LEN */
#define SQL_MAX_PROCEDURE_NAME_LEN 33
#define SQL_MAX_QUALIFIER_NAME_LEN 34 /* MAX_CATALOG_NAME_LEN */
#define SQL_MULT_RESULT_SETS 36
#define SQL_MULTIPLE_ACTIVE_TXN 37
#define SQL_OUTER_JOINS 38
#define SQL_OWNER_TERM 39
#define SQL_PROCEDURE_TERM 40
#define SQL_QUALIFIER_NAME_SEPARATOR 41
#define SQL_QUALIFIER_TERM 42
#define SQL_SCROLL_OPTIONS 44
#define SQL_TABLE_TERM 45
#define SQL_CONVERT_FUNCTIONS 48
#define SQL_NUMERIC_FUNCTIONS 49
#define SQL_STRING_FUNCTIONS 50
#define SQL_SYSTEM_FUNCTIONS 51
#define SQL_TIMEDATE_FUNCTIONS 52
#define SQL_CONVERT_BIGINT 53
#define SQL_CONVERT_BINARY 54
#define SQL_CONVERT_BIT 55
#define SQL_CONVERT_CHAR 56
#define SQL_CONVERT_DATE 57
#define SQL_CONVERT_DECIMAL 58
#define SQL_CONVERT_DOUBLE 59
#define SQL_CONVERT_FLOAT 60
#define SQL_CONVERT_INTEGER 61
#define SQL_CONVERT_LONGVARCHAR 62
#define SQL_CONVERT_NUMERIC 63
#define SQL_CONVERT_REAL 64
#define SQL_CONVERT_SMALLINT 65
#define SQL_CONVERT_TIME 66
#define SQL_CONVERT_TIMESTAMP 67
#define SQL_CONVERT_TINYINT 68
#define SQL_CONVERT_VARBINARY 69
#define SQL_CONVERT_VARCHAR 70
#define SQL_CONVERT_LONGVARBINARY 71
#define SQL_ODBC_SQL_OPT_IEF 73 /* SQL_INTEGRITY */
#define SQL_CORRELATION_NAME 74
#define SQL_NON_NULLABLE_COLUMNS 75
#define SQL_DRIVER_HLIB 76
#define SQL_DRIVER_ODBC_VER 77
#define SQL_LOCK_TYPES 78
#define SQL_POS_OPERATIONS 79
#define SQL_POSITIONED_STATEMENTS 80
#define SQL_BOOKMARK_PERSISTENCE 82
#define SQL_STATIC_SENSITIVITY 83
#define SQL_FILE_USAGE 84
#define SQL_COLUMN_ALIAS 87
#define SQL_GROUP_BY 88
#define SQL_KEYWORDS 89
#define SQL_OWNER_USAGE 91
#define SQL_QUALIFIER_USAGE 92
#define SQL_QUOTED_IDENTIFIER_CASE 93
#define SQL_SUBQUERIES 95
#define SQL_UNION 96
#define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103
#define SQL_MAX_CHAR_LITERAL_LEN 108
#define SQL_TIMEDATE_ADD_INTERVALS 109
#define SQL_TIMEDATE_DIFF_INTERVALS 110
#define SQL_NEED_LONG_DATA_LEN 111
#define SQL_MAX_BINARY_LITERAL_LEN 112
#define SQL_LIKE_ESCAPE_CLAUSE 113
#define SQL_QUALIFIER_LOCATION 114
#if (ODBCVER >= 0x0201 && ODBCVER < 0x0300)
#define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */
#endif /* ODBCVER >= 0x0201 && ODBCVER < 0x0300 */
/*----------------------------------------------*/
/* SQL_INFO_LAST and SQL_INFO_DRIVER_START are */
/* not useful anymore, because X/Open has */
/* values in the 10000 range. You */
/* must contact X/Open directly to get a range */
/* of numbers for driver-specific values. */
/*----------------------------------------------*/
#if (ODBCVER < 0x0300)
#define SQL_INFO_LAST SQL_QUALIFIER_LOCATION
#define SQL_INFO_DRIVER_START 1000
#endif /* ODBCVER < 0x0300 */
/*-----------------------------------------------*/
/* ODBC 3.0 SQLGetInfo values that are not part */
/* of the X/Open standard at this time. X/Open */
/* standard values are in sql.h. */
/*-----------------------------------------------*/
#if (ODBCVER >= 0x0300)
#define SQL_ACTIVE_ENVIRONMENTS 116
#define SQL_ALTER_DOMAIN 117
#define SQL_SQL_CONFORMANCE 118
#define SQL_DATETIME_LITERALS 119
#define SQL_ASYNC_MODE 10021 /* new X/Open spec */
#define SQL_BATCH_ROW_COUNT 120
#define SQL_BATCH_SUPPORT 121
#define SQL_CATALOG_LOCATION SQL_QUALIFIER_LOCATION
#define SQL_CATALOG_NAME_SEPARATOR SQL_QUALIFIER_NAME_SEPARATOR
#define SQL_CATALOG_TERM SQL_QUALIFIER_TERM
#define SQL_CATALOG_USAGE SQL_QUALIFIER_USAGE
#define SQL_CONVERT_WCHAR 122
#define SQL_CONVERT_INTERVAL_DAY_TIME 123
#define SQL_CONVERT_INTERVAL_YEAR_MONTH 124
#define SQL_CONVERT_WLONGVARCHAR 125
#define SQL_CONVERT_WVARCHAR 126
#define SQL_CREATE_ASSERTION 127
#define SQL_CREATE_CHARACTER_SET 128
#define SQL_CREATE_COLLATION 129
#define SQL_CREATE_DOMAIN 130
#define SQL_CREATE_SCHEMA 131
#define SQL_CREATE_TABLE 132
#define SQL_CREATE_TRANSLATION 133
#define SQL_CREATE_VIEW 134
#define SQL_DRIVER_HDESC 135
#define SQL_DROP_ASSERTION 136
#define SQL_DROP_CHARACTER_SET 137
#define SQL_DROP_COLLATION 138
#define SQL_DROP_DOMAIN 139
#define SQL_DROP_SCHEMA 140
#define SQL_DROP_TABLE 141
#define SQL_DROP_TRANSLATION 142
#define SQL_DROP_VIEW 143
#define SQL_DYNAMIC_CURSOR_ATTRIBUTES1 144
#define SQL_DYNAMIC_CURSOR_ATTRIBUTES2 145
#define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 146
#define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 147
#define SQL_INDEX_KEYWORDS 148
#define SQL_INFO_SCHEMA_VIEWS 149
#define SQL_KEYSET_CURSOR_ATTRIBUTES1 150
#define SQL_KEYSET_CURSOR_ATTRIBUTES2 151
#define SQL_MAX_ASYNC_CONCURRENT_STATEMENTS 10022 /* new X/Open spec */
#define SQL_ODBC_INTERFACE_CONFORMANCE 152
#define SQL_PARAM_ARRAY_ROW_COUNTS 153
#define SQL_PARAM_ARRAY_SELECTS 154
#define SQL_SCHEMA_TERM SQL_OWNER_TERM
#define SQL_SCHEMA_USAGE SQL_OWNER_USAGE
#define SQL_SQL92_DATETIME_FUNCTIONS 155
#define SQL_SQL92_FOREIGN_KEY_DELETE_RULE 156
#define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE 157
#define SQL_SQL92_GRANT 158
#define SQL_SQL92_NUMERIC_VALUE_FUNCTIONS 159
#define SQL_SQL92_PREDICATES 160
#define SQL_SQL92_RELATIONAL_JOIN_OPERATORS 161
#define SQL_SQL92_REVOKE 162
#define SQL_SQL92_ROW_VALUE_CONSTRUCTOR 163
#define SQL_SQL92_STRING_FUNCTIONS 164
#define SQL_SQL92_VALUE_EXPRESSIONS 165
#define SQL_STANDARD_CLI_CONFORMANCE 166
#define SQL_STATIC_CURSOR_ATTRIBUTES1 167
#define SQL_STATIC_CURSOR_ATTRIBUTES2 168
#define SQL_AGGREGATE_FUNCTIONS 169
#define SQL_DDL_INDEX 170
#define SQL_DM_VER 171
#define SQL_INSERT_STATEMENT 172