forked from recruitcojp/OdbcHive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SQLGetInfo.cpp
601 lines (518 loc) · 17.8 KB
/
SQLGetInfo.cpp
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
#include "hiveodbc.h"
#define CHECK_LEN(x) \
( cbInfoValueMax > 0 && sizeof(x) > cbInfoValueMax ? \
debuglog("ret len over!\n"), FALSE : TRUE )
#define RESULT_LEN(x) \
( pcbInfoValue ? *pcbInfoValue = sizeof(x), TRUE : FALSE )
SQLRETURN SQL_API SQLGetInfo(
SQLHDBC hdbc,
SQLUSMALLINT fInfoType,
SQLPOINTER rgbInfoValue,
SQLSMALLINT cbInfoValueMax,
SQLSMALLINT FAR *pcbInfoValue)
{
if ( func_init("SQLGetInfo") != 0 ){ return SQL_ERROR; }
switch( fInfoType ) {
case SQL_ACCESSIBLE_PROCEDURES:
if( rgbInfoValue && cbInfoValueMax > 1 ) {
strcpy( (char*)rgbInfoValue, "N" ); // other driver
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_ACCESSIBLE_TABLES:
if( rgbInfoValue && cbInfoValueMax > 1 ) {
strcpy( (char*)rgbInfoValue, "N" ); // other driver
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_ACTIVE_CONNECTIONS:
if( rgbInfoValue ) {
*(SQLUSMALLINT *)rgbInfoValue = 10; // other driver
if( pcbInfoValue ) *pcbInfoValue = sizeof( SQLUSMALLINT );
}
return SQL_SUCCESS;
case SQL_ACTIVE_STATEMENTS:
if( rgbInfoValue ) {
*(SQLUSMALLINT *)rgbInfoValue = 0;
}
if( pcbInfoValue ) *pcbInfoValue = sizeof( SQLUSMALLINT );
return SQL_SUCCESS;
case SQL_ALTER_TABLE:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue =
SQL_AT_ADD_COLUMN | SQL_AT_DROP_COLUMN;
}
if( pcbInfoValue ) *pcbInfoValue = sizeof( SQLUINTEGER );
return SQL_SUCCESS;
case SQL_BOOKMARK_PERSISTENCE:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0; // other driver
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CATALOG_LOCATION:
if( rgbInfoValue ) {
*(SQLUSMALLINT *)rgbInfoValue = 0; // other driver
}
if( pcbInfoValue ) *pcbInfoValue = sizeof( SQLUSMALLINT );
return SQL_SUCCESS;
case SQL_CATALOG_NAME_SEPARATOR:
if( rgbInfoValue && cbInfoValueMax > 1 ) {
strcpy( (char*)rgbInfoValue, "" ); // other driver
}
if( pcbInfoValue ) *pcbInfoValue = 0;
return SQL_SUCCESS;
case SQL_CATALOG_TERM:
if( rgbInfoValue && cbInfoValueMax > 7 ) {
strcpy( (char*)rgbInfoValue, "catalog" );
}
if( pcbInfoValue ) *pcbInfoValue = 7;
return SQL_SUCCESS;
case SQL_CATALOG_USAGE:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
}
if( pcbInfoValue ) *pcbInfoValue = sizeof( SQLUINTEGER );
return SQL_SUCCESS;
case SQL_COLUMN_ALIAS:
if( rgbInfoValue && cbInfoValueMax > 1 ) {
strcpy( (char*)rgbInfoValue, "N" ); // other driver
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_CONCAT_NULL_BEHAVIOR:
if( rgbInfoValue && cbInfoValueMax > 1 ) {
*(short *)rgbInfoValue = SQL_CB_NULL; // other driver
}
if( pcbInfoValue ) *pcbInfoValue = sizeof(short);
return SQL_SUCCESS;
case SQL_CONVERT_BIGINT:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_BINARY:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_BIT:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_CHAR:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0x00008002; // other driver
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_DATE:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0x00008101; // other driver
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_DECIMAL:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_DOUBLE:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_FLOAT:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_FUNCTIONS:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0; // 何もなし
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_INTEGER:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_LONGVARBINARY:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_LONGVARCHAR:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CONVERT_NUMERIC:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0x00008101; // other driver
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_CURSOR_COMMIT_BEHAVIOR:
if( rgbInfoValue ) {
*(SQLUSMALLINT *)rgbInfoValue = SQL_CB_PRESERVE;
CHECK_LEN(SQLUSMALLINT);
}
RESULT_LEN(SQLUSMALLINT);
return SQL_SUCCESS;
case SQL_CURSOR_ROLLBACK_BEHAVIOR:
if( rgbInfoValue ) {
*(SQLUSMALLINT *)rgbInfoValue = SQL_CB_DELETE;
CHECK_LEN(SQLUSMALLINT);
}
RESULT_LEN(SQLUSMALLINT);
return SQL_SUCCESS;
case SQL_DATABASE_NAME:
if( rgbInfoValue && cbInfoValueMax > 10 ) {
strcpy( (char*)rgbInfoValue, "hiveodbc" );
}
if( pcbInfoValue ) *pcbInfoValue = 10;
return SQL_SUCCESS;
case SQL_DBMS_NAME:
if( rgbInfoValue && cbInfoValueMax > 10 ) {
strcpy( (char*)rgbInfoValue, "hiveodbc" );
}
if( pcbInfoValue ) *pcbInfoValue = 8;
return SQL_SUCCESS;
case SQL_DBMS_VER:
if( rgbInfoValue && cbInfoValueMax > 10 ) {
strcpy( (char*)rgbInfoValue, "01.01.0000" );
}
if( pcbInfoValue ) *pcbInfoValue = 10;
return SQL_SUCCESS;
case SQL_DATA_SOURCE_READ_ONLY:
if( rgbInfoValue ) {
strcpy( (char*)rgbInfoValue, "N" );
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_DEFAULT_TXN_ISOLATION:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = SQL_TXN_READ_COMMITTED;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_DRIVER_ODBC_VER:
if( rgbInfoValue && cbInfoValueMax > 5 ) {
strcpy( (char*)rgbInfoValue, "01.00" );
}
if( pcbInfoValue ) *pcbInfoValue = 5;
return SQL_SUCCESS;
case SQL_DRIVER_NAME:
if( rgbInfoValue && cbInfoValueMax > 10 ) {
strcpy( (char*)rgbInfoValue, "hiveodbc.dll" );
}
if( pcbInfoValue ) *pcbInfoValue = 12;
return SQL_SUCCESS;
case SQL_DRIVER_VER:
if( rgbInfoValue && cbInfoValueMax > 10 ) {
strcpy( (char*)rgbInfoValue, "01.00.0000" );
}
if( pcbInfoValue ) *pcbInfoValue = 10;
return SQL_SUCCESS;
case SQL_DYNAMIC_CURSOR_ATTRIBUTES1:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = SQL_CA1_NEXT;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_EXPRESSIONS_IN_ORDERBY:
if( rgbInfoValue && cbInfoValueMax > 1 ) {
strcpy( (char*)rgbInfoValue, "N" );
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_FETCH_DIRECTION:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = SQL_FD_FETCH_NEXT;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = SQL_CA1_NEXT;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_GETDATA_EXTENSIONS:
if( rgbInfoValue ) {
*(long *)rgbInfoValue = SQL_GD_ANY_COLUMN |
SQL_GD_ANY_ORDER | SQL_GD_BOUND |
SQL_GD_BLOCK;
}
if( pcbInfoValue ) *pcbInfoValue = 4;
return SQL_SUCCESS;
case SQL_GROUP_BY:
if( rgbInfoValue ) {
*(short *)rgbInfoValue = SQL_GB_GROUP_BY_EQUALS_SELECT;
CHECK_LEN(SQLUSMALLINT);
}
RESULT_LEN(SQLUSMALLINT);
return SQL_SUCCESS;
case SQL_IDENTIFIER_QUOTE_CHAR:
if( rgbInfoValue ) {
strcpy( (char*)rgbInfoValue, "" );
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_IDENTIFIER_CASE:
if( rgbInfoValue ) {
*(short *)rgbInfoValue = SQL_IC_UPPER;
CHECK_LEN(SQLUSMALLINT);
}
RESULT_LEN(SQLUSMALLINT);
return SQL_SUCCESS;
case SQL_KEYSET_CURSOR_ATTRIBUTES1:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = SQL_CA1_NEXT;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_LIKE_ESCAPE_CLAUSE:
if( rgbInfoValue ) {
strcpy( (char*)rgbInfoValue, "N" );
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_LOCK_TYPES:
if( rgbInfoValue ) {
*(long *)rgbInfoValue = SQL_LCK_NO_CHANGE;
}
if( pcbInfoValue ) *pcbInfoValue = 4;
return SQL_SUCCESS;
case SQL_MAX_CATALOG_NAME_LEN:
if( rgbInfoValue ) {
*(SQLUSMALLINT *)rgbInfoValue = 0; // other driver
CHECK_LEN(SQLUSMALLINT);
}
RESULT_LEN(SQLUSMALLINT);
return SQL_SUCCESS;
case SQL_MAX_COLUMN_NAME_LEN:
if( rgbInfoValue ) {
*(short *)rgbInfoValue = 31;
}
if( pcbInfoValue ) *pcbInfoValue = 2;
return SQL_SUCCESS;
case SQL_MAX_CURSOR_NAME_LEN:
if( rgbInfoValue ) {
*(short *)rgbInfoValue = 31; // other driver (max 18)
}
if( pcbInfoValue ) *pcbInfoValue = 2;
return SQL_SUCCESS;
case SQL_MAX_PROCEDURE_NAME_LEN:
if( rgbInfoValue ) {
*(SQLUSMALLINT *)rgbInfoValue = 27; // other driver 31?
CHECK_LEN(SQLUSMALLINT);
}
RESULT_LEN(SQLUSMALLINT);
return SQL_SUCCESS;
case SQL_MAX_SCHEMA_NAME_LEN:
if( rgbInfoValue ) {
*(SQLUSMALLINT *)rgbInfoValue = 0; // other driver
CHECK_LEN(SQLUSMALLINT);
}
RESULT_LEN(SQLUSMALLINT);
return SQL_SUCCESS;
case SQL_MAX_TABLE_NAME_LEN:
if( rgbInfoValue ) {
*(short *)rgbInfoValue = 31;
}
if( pcbInfoValue ) *pcbInfoValue = 2;
return SQL_SUCCESS;
case SQL_MULT_RESULT_SETS:
if( rgbInfoValue ) {
strcpy( (char*)rgbInfoValue, "N" );
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_MULTIPLE_ACTIVE_TXN:
if( rgbInfoValue ) {
strcpy( (char*)rgbInfoValue, "Y" );
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_NULL_COLLATION:
if( rgbInfoValue ) {
*(short *)rgbInfoValue = 0; // ?
}
if( pcbInfoValue ) *pcbInfoValue = 2;
return SQL_SUCCESS;
case SQL_NEED_LONG_DATA_LEN:
if( rgbInfoValue ) {
*(char *)rgbInfoValue = 'N';
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_NUMERIC_FUNCTIONS:
if( rgbInfoValue ) {
*(long *)rgbInfoValue = 0; // 何もなし
}
if( pcbInfoValue ) *pcbInfoValue = 4;
return SQL_SUCCESS;
case SQL_ODBC_API_CONFORMANCE:
if( rgbInfoValue ) {
*(short *)rgbInfoValue = SQL_OAC_LEVEL1;
}
if( pcbInfoValue ) *pcbInfoValue = sizeof( SQLUSMALLINT );
return SQL_SUCCESS;
case SQL_ORDER_BY_COLUMNS_IN_SELECT:
if( rgbInfoValue && cbInfoValueMax > 1 ) {
strcpy( (char*)rgbInfoValue, "N" );
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_OUTER_JOINS:
if( rgbInfoValue && cbInfoValueMax > 1 ) {
strcpy( (char*)rgbInfoValue, "Y" );
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_OWNER_TERM:
if( rgbInfoValue && cbInfoValueMax > 5 ) {
strcpy( (char*)rgbInfoValue, "OWNER" );
}
if( pcbInfoValue ) *pcbInfoValue = 5;
return SQL_SUCCESS;
case SQL_POSITIONED_STATEMENTS:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_POS_OPERATIONS:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = 0;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_PROCEDURES:
if( rgbInfoValue ) {
strcpy( (char*)rgbInfoValue, "Y" );
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_QUOTED_IDENTIFIER_CASE:
if( rgbInfoValue ) {
*(short *)rgbInfoValue = SQL_IC_UPPER;
}
if( pcbInfoValue ) *pcbInfoValue = 2;
return SQL_SUCCESS;
case SQL_ROW_UPDATES:
if( rgbInfoValue ) {
strcpy( (char*)rgbInfoValue, "Y" );
}
if( pcbInfoValue ) *pcbInfoValue = 1;
return SQL_SUCCESS;
case SQL_SCROLL_CONCURRENCY:
if( rgbInfoValue ) {
*(long *)rgbInfoValue = SQL_SCCO_READ_ONLY;
}
if( pcbInfoValue ) *pcbInfoValue = 4;
return SQL_SUCCESS;
case SQL_SCROLL_OPTIONS:
if( rgbInfoValue ) {
*(long *)rgbInfoValue = SQL_SO_FORWARD_ONLY;
}
if( pcbInfoValue ) *pcbInfoValue = 4;
return SQL_SUCCESS;
case SQL_SEARCH_PATTERN_ESCAPE:
if( rgbInfoValue && cbInfoValueMax > 1 ) {
strcpy( (char*)rgbInfoValue, "" );
}
if( pcbInfoValue ) *pcbInfoValue = 0;
return SQL_SUCCESS;
case SQL_STATIC_CURSOR_ATTRIBUTES1: // ODBC 3.0
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = SQL_CA1_NEXT;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
case SQL_STATIC_SENSITIVITY:
if( rgbInfoValue ) {
*(long *)rgbInfoValue = 0; // 何も出来ない
}
if( pcbInfoValue ) *pcbInfoValue = 4;
return SQL_SUCCESS;
case SQL_STRING_FUNCTIONS:
if( rgbInfoValue ) {
*(long *)rgbInfoValue = 0; // 何もなし
}
if( pcbInfoValue ) *pcbInfoValue = 4;
return SQL_SUCCESS;
case SQL_SYSTEM_FUNCTIONS:
if( rgbInfoValue ) {
*(long *)rgbInfoValue = 0; // 何もなし
}
if( pcbInfoValue ) *pcbInfoValue = 4;
return SQL_SUCCESS;
case SQL_TIMEDATE_FUNCTIONS:
if( rgbInfoValue ) {
*(long *)rgbInfoValue = 0; // 何もなし
}
if( pcbInfoValue ) *pcbInfoValue = 4;
return SQL_SUCCESS;
case SQL_TXN_CAPABLE:
if( rgbInfoValue ) {
*(short *)rgbInfoValue = SQL_TC_DDL_COMMIT;
}
if( pcbInfoValue ) *pcbInfoValue = 2;
return SQL_SUCCESS;
case SQL_TXN_ISOLATION_OPTION:
if( rgbInfoValue ) {
*(long *)rgbInfoValue =
SQL_TXN_READ_COMMITTED |
SQL_TXN_REPEATABLE_READ |
SQL_TXN_SERIALIZABLE ;
}
if( pcbInfoValue ) *pcbInfoValue = 4;
return SQL_SUCCESS;
case SQL_UNION:
if( rgbInfoValue ) {
*(SQLUINTEGER *)rgbInfoValue = SQL_U_UNION | SQL_U_UNION_ALL;
CHECK_LEN(SQLUINTEGER);
}
RESULT_LEN(SQLUINTEGER);
return SQL_SUCCESS;
}
if( pcbInfoValue ) *pcbInfoValue = 0;
debuglog("unknown SQLGetInfo(%d)", fInfoType );
return SQL_ERROR;
}