Products Support Documentation Download
sqlext.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Raima Database Manager *
3  * ODBC extension header *
4  * *
5  * Copyright (c) 2010 Raima Inc. All rights reserved. *
6  * *
7  * Use of this software, whether in source code format, or in executable, *
8  * binary object code form, is governed by the Raima Inc. LICENSE *
9  * which is fully described in the LICENSE.TXT file, included within this *
10  * distribution of files. *
11  **************************************************************************/
12 
17 #if !defined(SQLEXT_H_INCLUDED_)
18 #define SQLEXT_H_INCLUDED_
19 
20 #if defined(__cplusplus) && !defined(CPP_HEADER_INCLUDED)
21 #error sqlext.h is only for C applications. Do not include it directly in C++ applications. Use cpp-sqlext.h instead
22 #endif
23 
24 #include "sql.h"
25 
26 
27 /* ----------------------------------------------------------------------------
28  generally useful constants
29 */
30 #define SQL_SPEC_MAJOR 3 /* Major version of specification */
31 #define SQL_SPEC_MINOR 52 /* Minor version of specification */
32 #define SQL_SPEC_STRING "03.52" /* String constant for version */
33 
34 #define SQL_SQLSTATE_SIZE 5 /* size of SQLSTATE */
35 #define SQL_MAX_DSN_LENGTH 32 /* maximum data source name size */
36 
37 #define SQL_MAX_OPTION_STRING_LENGTH 256
38 
39 /* ----------------------------------------------------------------------------
40  return code SQL_NO_DATA_FOUND is the same as SQL_NO_DATA
41 */
42 #define SQL_NO_DATA_FOUND SQL_NO_DATA
43 
44 /* ----------------------------------------------------------------------------
45  an end handle type
46 */
47 #define SQL_HANDLE_SENV 5
48 
49 /* ----------------------------------------------------------------------------
50  env attribute
51 */
52 #define SQL_ATTR_ODBC_VERSION 200
53 #define SQL_ATTR_CONNECTION_POOLING 201
54 #define SQL_ATTR_CP_MATCH 202
55 
56 /* ----------------------------------------------------------------------------
57  values for SQL_ATTR_CONNECTION_POOLING
58 */
59 #define SQL_CP_OFF 0
60 #define SQL_CP_ONE_PER_DRIVER 1
61 #define SQL_CP_ONE_PER_HENV 2
62 #define SQL_CP_DEFAULT SQL_CP_OFF
63 
64 /* ----------------------------------------------------------------------------
65  values for SQL_ATTR_CP_MATCH
66 */
67 #define SQL_CP_STRICT_MATCH 0
68 #define SQL_CP_RELAXED_MATCH 1
69 #define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH
70 
71 /* ----------------------------------------------------------------------------
72  values for SQL_ATTR_ODBC_VERSION
73 */
74 #define SQL_OV_ODBC2 2
75 #define SQL_OV_ODBC3 3
76 
77 /* ----------------------------------------------------------------------------
78  options for SQLSetConnectAttr/SQLGetConnectAttr
79 */
80 #define SQL_ACCESS_MODE 101
81 #define SQL_AUTOCOMMIT 102
82 #define SQL_LOGIN_TIMEOUT 103
83 #define SQL_OPT_TRACE 104
84 #define SQL_OPT_TRACEFILE 105
85 #define SQL_TRANSLATE_DLL 106
86 #define SQL_TRANSLATE_OPTION 107
87 #define SQL_TXN_ISOLATION 108
88 #define SQL_CURRENT_QUALIFIER 109
89 #define SQL_ODBC_CURSORS 110
90 #define SQL_QUIET_MODE 111
91 #define SQL_PACKET_SIZE 112
92 
93 /* ----------------------------------------------------------------------------
94  connection attributes with new names
95 */
96 #define SQL_ATTR_ACCESS_MODE SQL_ACCESS_MODE
97 #define SQL_ATTR_AUTOCOMMIT SQL_AUTOCOMMIT
98 #define SQL_ATTR_CONNECTION_TIMEOUT 113
99 #define SQL_ATTR_CURRENT_CATALOG SQL_CURRENT_QUALIFIER
100 #define SQL_ATTR_DISCONNECT_BEHAVIOR 114
101 #define SQL_ATTR_ANSI_APP 115
102 #define SQL_ATTR_ENLIST_IN_DTC 1207
103 #define SQL_ATTR_ENLIST_IN_XA 1208
104 #define SQL_ATTR_LOGIN_TIMEOUT SQL_LOGIN_TIMEOUT
105 #define SQL_ATTR_ODBC_CURSORS SQL_ODBC_CURSORS
106 #define SQL_ATTR_PACKET_SIZE SQL_PACKET_SIZE
107 #define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE
108 #define SQL_ATTR_TRACE SQL_OPT_TRACE
109 #define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE
110 #define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL
111 #define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION
112 #define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION
113 
114 #define SQL_ATTR_CONNECTION_DEAD 1209
115 
116 /* ----------------------------------------------------------------------------
117  SQL_CONNECT_OPT_DRVR_START is not meaningful for 3.0 driver
118 */
119 #if (ODBCVER < 0x0300)
120 #define SQL_CONNECT_OPT_DRVR_START 1000
121 #endif
122 
123 #if (ODBCVER < 0x0300)
124 #define SQL_CONN_OPT_MAX SQL_PACKET_SIZE
125 #define SQL_CONN_OPT_MIN SQL_ACCESS_MODE
126 #endif
127 
128 /* ----------------------------------------------------------------------------
129  SQL_ACCESS_MODE options
130 */
131 #define SQL_MODE_READ_WRITE 0
132 #define SQL_MODE_READ_ONLY 1
133 #define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE
134 
135 /* ----------------------------------------------------------------------------
136  SQL_AUTOCOMMIT options
137 */
138 #define SQL_AUTOCOMMIT_OFF 0
139 #define SQL_AUTOCOMMIT_ON 1
140 #define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON
141 
142 /* ----------------------------------------------------------------------------
143  SQL_LOGIN_TIMEOUT options
144 */
145 #define SQL_LOGIN_TIMEOUT_DEFAULT 15
146 
147 /* ----------------------------------------------------------------------------
148  SQL_OPT_TRACE options
149 */
150 #define SQL_OPT_TRACE_OFF 0
151 #define SQL_OPT_TRACE_ON 1
152 #define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF
153 #define SQL_OPT_TRACE_FILE_DEFAULT "\\SQL.LOG"
154 
155 /* ----------------------------------------------------------------------------
156  SQL_ODBC_CURSORS options
157 */
158 #define SQL_CUR_USE_IF_NEEDED 0
159 #define SQL_CUR_USE_ODBC 1
160 #define SQL_CUR_USE_DRIVER 2
161 #define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER
162 
163 /* ----------------------------------------------------------------------------
164  values for SQL_ATTR_DISCONNECT_BEHAVIOR
165 */
166 #define SQL_DB_RETURN_TO_POOL 0
167 #define SQL_DB_DISCONNECT 1
168 #define SQL_DB_DEFAULT SQL_DB_RETURN_TO_POOL
169 
170 /* ----------------------------------------------------------------------------
171  values for SQL_ATTR_ENLIST_IN_DTC
172 */
173 #define SQL_DTC_DONE 0L
174 
175 /* ----------------------------------------------------------------------------
176  values for SQL_ATTR_CONNECTION_DEAD
177 */
178 #define SQL_CD_TRUE 1L
179 #define SQL_CD_FALSE 0L
180 
181 /* ----------------------------------------------------------------------------
182  values for SQL_ATTR_ANSI_APP
183 */
184 #define SQL_AA_TRUE 1L /* the application is an ANSI app */
185 #define SQL_AA_FALSE 0L /* the application is a Unicode app */
186 
187 /* ----------------------------------------------------------------------------
188  statement attributes
189 */
190 #define SQL_QUERY_TIMEOUT 0
191 #define SQL_MAX_ROWS 1
192 #define SQL_NOSCAN 2
193 #define SQL_MAX_LENGTH 3
194 #define SQL_ASYNC_ENABLE 4
195 #define SQL_BIND_TYPE 5
196 #define SQL_CURSOR_TYPE 6
197 #define SQL_CONCURRENCY 7
198 #define SQL_KEYSET_SIZE 8
199 #define SQL_ROWSET_SIZE 9
200 #define SQL_SIMULATE_CURSOR 10
201 #define SQL_RETRIEVE_DATA 11
202 #define SQL_USE_BOOKMARKS 12
203 #define SQL_GET_BOOKMARK 13
204 #define SQL_ROW_NUMBER 14
205 
206 /* ----------------------------------------------------------------------------
207  statement attributes for ODBC 3.0
208 */
209 #define SQL_ATTR_ASYNC_ENABLE 4
210 #define SQL_ATTR_CONCURRENCY SQL_CONCURRENCY
211 #define SQL_ATTR_CURSOR_TYPE SQL_CURSOR_TYPE
212 #define SQL_ATTR_ENABLE_AUTO_IPD 15
213 #define SQL_ATTR_FETCH_BOOKMARK_PTR 16
214 #define SQL_ATTR_KEYSET_SIZE SQL_KEYSET_SIZE
215 #define SQL_ATTR_MAX_LENGTH SQL_MAX_LENGTH
216 #define SQL_ATTR_MAX_ROWS SQL_MAX_ROWS
217 #define SQL_ATTR_NOSCAN SQL_NOSCAN
218 #define SQL_ATTR_PARAM_BIND_OFFSET_PTR 17
219 #define SQL_ATTR_PARAM_BIND_TYPE 18
220 #define SQL_ATTR_PARAM_OPERATION_PTR 19
221 #define SQL_ATTR_PARAM_STATUS_PTR 20
222 #define SQL_ATTR_PARAMS_PROCESSED_PTR 21
223 #define SQL_ATTR_PARAMSET_SIZE 22
224 #define SQL_ATTR_QUERY_TIMEOUT SQL_QUERY_TIMEOUT
225 #define SQL_ATTR_RETRIEVE_DATA SQL_RETRIEVE_DATA
226 #define SQL_ATTR_ROW_BIND_OFFSET_PTR 23
227 #define SQL_ATTR_ROW_BIND_TYPE SQL_BIND_TYPE
228 #define SQL_ATTR_ROW_NUMBER SQL_ROW_NUMBER
229 #define SQL_ATTR_ROW_OPERATION_PTR 24
230 #define SQL_ATTR_ROW_STATUS_PTR 25
231 #define SQL_ATTR_ROWS_FETCHED_PTR 26
232 #define SQL_ATTR_ROW_ARRAY_SIZE 27
233 #define SQL_ATTR_SIMULATE_CURSOR SQL_SIMULATE_CURSOR
234 #define SQL_ATTR_USE_BOOKMARKS SQL_USE_BOOKMARKS
235 
236 #define SQL_STMT_OPT_MAX SQL_ROW_NUMBER
237 #define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT
238 
239 /* ----------------------------------------------------------------------------
240  new defines for SEARCHABLE column in SQLGetTypeInfo
241 */
242 #define SQL_COL_PRED_CHAR SQL_LIKE_ONLY
243 #define SQL_COL_PRED_BASIC SQL_ALL_EXCEPT_LIKE
244 
245 /* ----------------------------------------------------------------------------
246  whether an attribute is a pointer or not
247 */
248 #define SQL_IS_POINTER (-4)
249 #define SQL_IS_UINTEGER (-5)
250 #define SQL_IS_INTEGER (-6)
251 #define SQL_IS_USMALLINT (-7)
252 #define SQL_IS_SMALLINT (-8)
253 
254 /* ----------------------------------------------------------------------------
255  the value of SQL_ATTR_PARAM_BIND_TYPE
256 */
257 #define SQL_PARAM_BIND_BY_COLUMN 0
258 #define SQL_PARAM_BIND_TYPE_DEFAULT SQL_PARAM_BIND_BY_COLUMN
259 
260 /* ----------------------------------------------------------------------------
261  SQL_QUERY_TIMEOUT options
262 */
263 #define SQL_QUERY_TIMEOUT_DEFAUL 0
264 
265 /* ----------------------------------------------------------------------------
266  SQL_MAX_ROWS options
267 */
268 #define SQL_MAX_ROWS_DEFAULT 0
269 
270 /* ----------------------------------------------------------------------------
271  SQL_NOSCAN options
272 */
273 #define SQL_NOSCAN_OFF 0
274 #define SQL_NOSCAN_ON 1
275 #define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF
276 
277 /* ----------------------------------------------------------------------------
278  SQL_MAX_LENGTH options
279  */
280 #define SQL_MAX_LENGTH_DEFAULT 0
281 
282 /* ----------------------------------------------------------------------------
283  values for SQL_ATTR_ASYNC_ENABLE
284 */
285 #define SQL_ASYNC_ENABLE_OFF 0
286 #define SQL_ASYNC_ENABLE_ON 1
287 #define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF
288 
289 /* ----------------------------------------------------------------------------
290  SQL_BIND_TYPE options
291  */
292 #define SQL_BIND_BY_COLUMN 0
293 #define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN
294 
295 /* ----------------------------------------------------------------------------
296  SQL_CONCURRENCY options
297 */
298 #define SQL_CONCUR_READ_ONLY 1
299 #define SQL_CONCUR_LOCK 2
300 #define SQL_CONCUR_ROWVER 3
301 #define SQL_CONCUR_VALUES 4
302 #define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY
303 
304 /* ----------------------------------------------------------------------------
305  SQL_CURSOR_TYPE options
306 */
307 #define SQL_CURSOR_FORWARD_ONLY 0
308 #define SQL_CURSOR_KEYSET_DRIVEN 1
309 #define SQL_CURSOR_DYNAMIC 2
310 #define SQL_CURSOR_STATIC 3
311 #define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY
312 
313 /* ----------------------------------------------------------------------------
314  SQL_ROWSET_SIZE options
315 */
316 #define SQL_ROWSET_SIZE_DEFAULT 1
317 
318 /* ----------------------------------------------------------------------------
319  SQL_KEYSET_SIZE options
320 */
321 #define SQL_KEYSET_SIZE_DEFAULT 0
322 
323 /* ----------------------------------------------------------------------------
324  SQL_SIMULATE_CURSOR options
325  */
326 #define SQL_SC_NON_UNIQUE 0
327 #define SQL_SC_TRY_UNIQUE 1
328 #define SQL_SC_UNIQUE 2
329 
330 /* ----------------------------------------------------------------------------
331  SQL_RETRIEVE_DATA options
332 */
333 #define SQL_RD_OFF 0
334 #define SQL_RD_ON 1
335 #define SQL_RD_DEFAULT SQL_RD_ON
336 
337 /* ----------------------------------------------------------------------------
338  SQL_USE_BOOKMARKS options
339 */
340 #define SQL_UB_OFF 0
341 #define SQL_UB_ON 1
342 #define SQL_UB_DEFAULT SQL_UB_OFF
343 
344 /* ----------------------------------------------------------------------------
345  new values for SQL_USE_BOOKMARKS attribute
346 */
347 #define SQL_UB_FIXED SQL_UB_ON
348 #define SQL_UB_VARIABLE 2L
349 
350 /* ----------------------------------------------------------------------------
351  extended descriptor field
352 */
353 #define SQL_DESC_ARRAY_SIZE 20
354 #define SQL_DESC_ARRAY_STATUS_PTR 21
355 #define SQL_DESC_AUTO_UNIQUE_VALUE SQL_COLUMN_AUTO_INCREMENT
356 #define SQL_DESC_BASE_COLUMN_NAME 22
357 #define SQL_DESC_BASE_TABLE_NAME 23
358 #define SQL_DESC_BIND_OFFSET_PTR 24
359 #define SQL_DESC_BIND_TYPE 25
360 #define SQL_DESC_CASE_SENSITIVE SQL_COLUMN_CASE_SENSITIVE
361 #define SQL_DESC_CATALOG_NAME SQL_COLUMN_QUALIFIER_NAME
362 #define SQL_DESC_CONCISE_TYPE SQL_COLUMN_TYPE
363 #define SQL_DESC_DATETIME_INTERVAL_PRECISION 26
364 #define SQL_DESC_DISPLAY_SIZE SQL_COLUMN_DISPLAY_SIZE
365 #define SQL_DESC_FIXED_PREC_SCALE SQL_COLUMN_MONEY
366 #define SQL_DESC_LABEL SQL_COLUMN_LABEL
367 #define SQL_DESC_LITERAL_PREFIX 27
368 #define SQL_DESC_LITERAL_SUFFIX 28
369 #define SQL_DESC_LOCAL_TYPE_NAME 29
370 #define SQL_DESC_MAXIMUM_SCALE 30
371 #define SQL_DESC_MINIMUM_SCALE 31
372 #define SQL_DESC_NUM_PREC_RADIX 32
373 #define SQL_DESC_PARAMETER_TYPE 33
374 #define SQL_DESC_ROWS_PROCESSED_PTR 34
375 #define SQL_DESC_ROWVER 35
376 #define SQL_DESC_SCHEMA_NAME SQL_COLUMN_OWNER_NAME
377 #define SQL_DESC_SEARCHABLE SQL_COLUMN_SEARCHABLE
378 #define SQL_DESC_TYPE_NAME SQL_COLUMN_TYPE_NAME
379 #define SQL_DESC_TABLE_NAME SQL_COLUMN_TABLE_NAME
380 #define SQL_DESC_UNSIGNED SQL_COLUMN_UNSIGNED
381 #define SQL_DESC_UPDATABLE SQL_COLUMN_UPDATABLE
382 
383 /* ----------------------------------------------------------------------------
384  defines for diagnostics fields
385 */
386 #define SQL_DIAG_CURSOR_ROW_COUNT (-1249)
387 #define SQL_DIAG_ROW_NUMBER (-1248)
388 #define SQL_DIAG_COLUMN_NUMBER (-1247)
389 
390 /* ----------------------------------------------------------------------------
391  SQL extended datatypes
392 */
393 #define SQL_DATE 9
394 #define SQL_INTERVAL 10
395 #define SQL_TIME 10
396 #define SQL_TIMESTAMP 11
397 #define SQL_LONGVARCHAR (-1)
398 #define SQL_BINARY (-2)
399 #define SQL_VARBINARY (-3)
400 #define SQL_LONGVARBINARY (-4)
401 #define SQL_BIGINT (-5)
402 #define SQL_TINYINT (-6)
403 #define SQL_BIT (-7)
404 #define SQL_GUID (-11)
405 
406 /* ----------------------------------------------------------------------------
407  interval code
408 */
409 #define SQL_CODE_YEAR 1
410 #define SQL_CODE_MONTH 2
411 #define SQL_CODE_DAY 3
412 #define SQL_CODE_HOUR 4
413 #define SQL_CODE_MINUTE 5
414 #define SQL_CODE_SECOND 6
415 #define SQL_CODE_YEAR_TO_MONTH 7
416 #define SQL_CODE_DAY_TO_HOUR 8
417 #define SQL_CODE_DAY_TO_MINUTE 9
418 #define SQL_CODE_DAY_TO_SECOND 10
419 #define SQL_CODE_HOUR_TO_MINUTE 11
420 #define SQL_CODE_HOUR_TO_SECOND 12
421 #define SQL_CODE_MINUTE_TO_SECOND 13
422 
423 #define SQL_INTERVAL_YEAR (100 + SQL_CODE_YEAR)
424 #define SQL_INTERVAL_MONTH (100 + SQL_CODE_MONTH)
425 #define SQL_INTERVAL_DAY (100 + SQL_CODE_DAY)
426 #define SQL_INTERVAL_HOUR (100 + SQL_CODE_HOUR)
427 #define SQL_INTERVAL_MINUTE (100 + SQL_CODE_MINUTE)
428 #define SQL_INTERVAL_SECOND (100 + SQL_CODE_SECOND)
429 #define SQL_INTERVAL_YEAR_TO_MONTH (100 + SQL_CODE_YEAR_TO_MONTH)
430 #define SQL_INTERVAL_DAY_TO_HOUR (100 + SQL_CODE_DAY_TO_HOUR)
431 #define SQL_INTERVAL_DAY_TO_MINUTE (100 + SQL_CODE_DAY_TO_MINUTE)
432 #define SQL_INTERVAL_DAY_TO_SECOND (100 + SQL_CODE_DAY_TO_SECOND)
433 #define SQL_INTERVAL_HOUR_TO_MINUTE (100 + SQL_CODE_HOUR_TO_MINUTE)
434 #define SQL_INTERVAL_HOUR_TO_SECOND (100 + SQL_CODE_HOUR_TO_SECOND)
435 #define SQL_INTERVAL_MINUTE_TO_SECOND (100 + SQL_CODE_MINUTE_TO_SECOND)
436 
437 #define SQL_UNICODE SQL_WCHAR
438 #define SQL_UNICODE_VARCHAR SQL_WVARCHAR
439 #define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR
440 #define SQL_UNICODE_CHAR SQL_WCHAR
441 
442 /* ----------------------------------------------------------------------------
443  Deprecated defines from prior versions of ODBC
444 */
445 #define SQL_DATABASE_NAME 16 /* for SQLGetInfo() */
446 
447 /* ----------------------------------------------------------------------------
448  C datatype to SQL datatype mapping
449 */
450 #define SQL_C_CHAR SQL_CHAR
451 #define SQL_C_LONG SQL_INTEGER
452 #define SQL_C_SHORT SQL_SMALLINT
453 #define SQL_C_FLOAT SQL_REAL
454 #define SQL_C_DOUBLE SQL_DOUBLE
455 #define SQL_C_NUMERIC SQL_NUMERIC
456 #define SQL_C_DEFAULT 99
457 
458 #define SQL_SIGNED_OFFSET (-20)
459 #define SQL_UNSIGNED_OFFSET (-22)
460 
461 #define SQL_C_DATE SQL_DATE
462 #define SQL_C_TIME SQL_TIME
463 #define SQL_C_TIMESTAMP SQL_TIMESTAMP
464 #define SQL_C_TYPE_DATE SQL_TYPE_DATE
465 #define SQL_C_TYPE_TIME SQL_TYPE_TIME
466 #define SQL_C_TYPE_TIMESTAMP SQL_TYPE_TIMESTAMP
467 #define SQL_C_INTERVAL_YEAR SQL_INTERVAL_YEAR
468 #define SQL_C_INTERVAL_MONTH SQL_INTERVAL_MONTH
469 #define SQL_C_INTERVAL_DAY SQL_INTERVAL_DAY
470 #define SQL_C_INTERVAL_HOUR SQL_INTERVAL_HOUR
471 #define SQL_C_INTERVAL_MINUTE SQL_INTERVAL_MINUTE
472 #define SQL_C_INTERVAL_SECOND SQL_INTERVAL_SECOND
473 #define SQL_C_INTERVAL_YEAR_TO_MONTH SQL_INTERVAL_YEAR_TO_MONTH
474 #define SQL_C_INTERVAL_DAY_TO_HOUR SQL_INTERVAL_DAY_TO_HOUR
475 #define SQL_C_INTERVAL_DAY_TO_MINUTE SQL_INTERVAL_DAY_TO_MINUTE
476 #define SQL_C_INTERVAL_DAY_TO_SECOND SQL_INTERVAL_DAY_TO_SECOND
477 #define SQL_C_INTERVAL_HOUR_TO_MINUTE SQL_INTERVAL_HOUR_TO_MINUTE
478 #define SQL_C_INTERVAL_HOUR_TO_SECOND SQL_INTERVAL_HOUR_TO_SECOND
479 #define SQL_C_INTERVAL_MINUTE_TO_SECOND SQL_INTERVAL_MINUTE_TO_SECOND
480 #define SQL_C_BINARY SQL_BINARY
481 #define SQL_C_BIT SQL_BIT
482 #define SQL_C_SBIGINT (SQL_BIGINT+SQL_SIGNED_OFFSET)
483 #define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET)
484 #define SQL_C_TINYINT SQL_TINYINT
485 #define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET)
486 #define SQL_C_SSHORT (SQL_C_SHORT+SQL_SIGNED_OFFSET)
487 #define SQL_C_STINYINT (SQL_TINYINT+SQL_SIGNED_OFFSET)
488 #define SQL_C_ULONG (SQL_C_LONG+SQL_UNSIGNED_OFFSET)
489 #define SQL_C_USHORT (SQL_C_SHORT+SQL_UNSIGNED_OFFSET)
490 #define SQL_C_UTINYINT (SQL_TINYINT+SQL_UNSIGNED_OFFSET)
491 #define SQL_C_BOOKMARK SQL_C_ULONG
492 #define SQL_C_GUID SQL_GUID
493 
494 #define SQL_TYPE_NULL 0
495 #define SQL_TYPE_MIN SQL_BIT
496 #define SQL_TYPE_MAX SQL_VARCHAR
497 
498 /* Staring with ODBC 3.8, Microsoft specifies these values to use
499  * as the base value for the driver-specific type, descriptor,
500  * diagnostic, info, and attributes. We start using them with
501  * the current version for better future compatibility */
502 /* #if (ODBCVER >= 0x380) */
503 #define SQL_DRIVER_C_TYPE_BASE 0x4000
504 #define SQL_DRIVER_SQL_TYPE_BASE 0x4000
505 #define SQL_DRIVER_DESC_FIELD_BASE 0x4000
506 #define SQL_DRIVER_DIAG_FIELD_BASE 0x4000
507 #define SQL_DRIVER_INFO_TYPE_BASE 0x4000
508 #define SQL_DRIVER_CONN_ATTR_BASE 0x00004000 /* 32-bit */
509 #define SQL_DRIVER_STMT_ATTR_BASE 0x00004000 /* 32-bit */
510 /* #endif */
511 
512 #define SQL_C_VARBOOKMARK SQL_C_BINARY
513 
514 
515 /* ----------------------------------------------------------------------------
516  define for SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER
517 */
518 #define SQL_NO_ROW_NUMBER (-1)
519 #define SQL_NO_COLUMN_NUMBER (-1)
520 #define SQL_ROW_NUMBER_UNKNOWN (-2)
521 #define SQL_COLUMN_NUMBER_UNKNOWN (-2)
522 
523 /* ----------------------------------------------------------------------------
524  SQLBindParameter extensions
525 */
526 #define SQL_DEFAULT_PARAM (-5)
527 #define SQL_IGNORE (-6)
528 #define SQL_COLUMN_IGNORE SQL_IGNORE
529 #define SQL_LEN_DATA_AT_EXEC_OFFSET (-100)
530 #define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET)
531 
532 /* ----------------------------------------------------------------------------
533  binary length for driver specific attributes
534  */
535 #define SQL_LEN_BINARY_ATTR_OFFSET (-100)
536 #define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET)
537 
538 /* ----------------------------------------------------------------------------
539  defines used by Driver Manager when mapping SQLSetParam to SQLBindParameter
540 */
541 #define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT
542 #define SQL_SETPARAM_VALUE_MAX (-1L)
543 
544 /* ----------------------------------------------------------------------------
545  SQLColAttributes defines
546  */
547 #define SQL_COLUMN_COUNT 0
548 #define SQL_COLUMN_NAME 1
549 #define SQL_COLUMN_TYPE 2
550 #define SQL_COLUMN_LENGTH 3
551 #define SQL_COLUMN_PRECISION 4
552 #define SQL_COLUMN_SCALE 5
553 #define SQL_COLUMN_DISPLAY_SIZE 6
554 #define SQL_COLUMN_NULLABLE 7
555 #define SQL_COLUMN_UNSIGNED 8
556 #define SQL_COLUMN_MONEY 9
557 #define SQL_COLUMN_UPDATABLE 10
558 #define SQL_COLUMN_AUTO_INCREMENT 11
559 #define SQL_COLUMN_CASE_SENSITIVE 12
560 #define SQL_COLUMN_SEARCHABLE 13
561 #define SQL_COLUMN_TYPE_NAME 14
562 #define SQL_COLUMN_TABLE_NAME 15
563 #define SQL_COLUMN_OWNER_NAME 16
564 #define SQL_COLUMN_QUALIFIER_NAME 17
565 #define SQL_COLUMN_LABEL 18
566 #define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
567 #define SQL_COLUMN_DRIVER_START 1000
568 
569 #define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
570 
571 /* ----------------------------------------------------------------------------
572  SQLColAttributes subdefines for SQL_COLUMN_UPDATABLE
573 */
574 #define SQL_ATTR_READONLY 0
575 #define SQL_ATTR_WRITE 1
576 #define SQL_ATTR_READWRITE_UNKNOWN 2
577 
578 /* ----------------------------------------------------------------------------
579  SQLColAttributes and SQLGetInfo subdefines for SQL_COLUMN_SEARCHABLE
580 */
581 #define SQL_UNSEARCHABLE 0
582 #define SQL_LIKE_ONLY 1
583 #define SQL_ALL_EXCEPT_LIKE 2
584 #define SQL_SEARCHABLE 3
585 #define SQL_PRED_SEARCHABLE SQL_SEARCHABLE
586 
587 /* ----------------------------------------------------------------------------
588  special return values for SQLGetData
589 */
590 #define SQL_NO_TOTAL (-4)
591 
592 /* ----------------------------------------------------------------------------
593  SQLGetFunctions: additional values for fFunction to represent functions
594  that are not in the X/Open spec.
595 */
596 #define SQL_API_SQLALLOCHANDLESTD 73
597 #define SQL_API_SQLBULKOPERATIONS 24
598 #define SQL_API_SQLBINDPARAMETER 72
599 #define SQL_API_SQLBROWSECONNECT 55
600 #define SQL_API_SQLCOLATTRIBUTES 6
601 #define SQL_API_SQLCOLUMNPRIVILEGES 56
602 #define SQL_API_SQLDESCRIBEPARAM 58
603 #define SQL_API_SQLDRIVERCONNECT 41
604 #define SQL_API_SQLDRIVERS 71
605 #define SQL_API_SQLEXTENDEDFETCH 59
606 #define SQL_API_SQLFOREIGNKEYS 60
607 #define SQL_API_SQLMORERESULTS 61
608 #define SQL_API_SQLNATIVESQL 62
609 #define SQL_API_SQLNUMPARAMS 63
610 #define SQL_API_SQLPARAMOPTIONS 64
611 #define SQL_API_SQLPRIMARYKEYS 65
612 #define SQL_API_SQLPROCEDURECOLUMNS 66
613 #define SQL_API_SQLPROCEDURES 67
614 #define SQL_API_SQLSETPOS 68
615 #define SQL_API_SQLSETSCROLLOPTIONS 69
616 #define SQL_API_SQLTABLEPRIVILEGES 70
617 
618 #if defined(NOT_USED)
619 
620 #if (ODBCVER < 0x0300)
621 #define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER
622 #define SQL_NUM_FUNCTIONS 23
623 #define SQL_EXT_API_START 40
624 #define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1)
625 #endif
626 
627 #endif /* NOT_USED */
628 
629 #define SQL_API_ALL_FUNCTIONS 0
630 #define SQL_API_LOADBYORDINAL 199
631 
632 #define SQL_API_ODBC3_ALL_FUNCTIONS 999
633 #define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250 /* array of 250 words */
634 
635 #define SQL_FUNC_EXISTS(pfExists, uwAPI) \
636  ((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) \
637  & (1 << ((uwAPI) & 0x000F)) \
638  ) ? SQL_TRUE : SQL_FALSE \
639  )
640 
641 /* ----------------------------------------------------------------------------
642  Values in ODBC 2.0 that are not in the X/Open spec
643 */
644 #define SQL_INFO_FIRST 0
645 #define SQL_ACTIVE_CONNECTIONS 0 /* MAX_DRIVER_CONNECTIONS */
646 #define SQL_ACTIVE_STATEMENTS 1 /* MAX_CONCURRENT_ACTIVITIES */
647 #define SQL_DRIVER_HDBC 3
648 #define SQL_DRIVER_HENV 4
649 #define SQL_DRIVER_HSTMT 5
650 #define SQL_DRIVER_NAME 6
651 #define SQL_DRIVER_VER 7
652 #define SQL_ODBC_API_CONFORMANCE 9
653 #define SQL_ODBC_VER 10
654 #define SQL_ROW_UPDATES 11
655 #define SQL_ODBC_SAG_CLI_CONFORMANCE 12
656 #define SQL_ODBC_SQL_CONFORMANCE 15
657 #define SQL_PROCEDURES 21
658 #define SQL_CONCAT_NULL_BEHAVIOR 22
659 #define SQL_CURSOR_ROLLBACK_BEHAVIOR 24
660 #define SQL_EXPRESSIONS_IN_ORDERBY 27
661 #define SQL_MAX_OWNER_NAME_LEN 32 /* MAX_SCHEMA_NAME_LEN */
662 #define SQL_MAX_PROCEDURE_NAME_LEN 33
663 #define SQL_MAX_QUALIFIER_NAME_LEN 34 /* MAX_CATALOG_NAME_LEN */
664 #define SQL_MULT_RESULT_SETS 36
665 #define SQL_MULTIPLE_ACTIVE_TXN 37
666 #define SQL_OUTER_JOINS 38
667 #define SQL_OWNER_TERM 39
668 #define SQL_PROCEDURE_TERM 40
669 #define SQL_QUALIFIER_NAME_SEPARATOR 41
670 #define SQL_QUALIFIER_TERM 42
671 #define SQL_SCROLL_OPTIONS 44
672 #define SQL_TABLE_TERM 45
673 #define SQL_CONVERT_FUNCTIONS 48
674 #define SQL_NUMERIC_FUNCTIONS 49
675 #define SQL_STRING_FUNCTIONS 50
676 #define SQL_SYSTEM_FUNCTIONS 51
677 #define SQL_TIMEDATE_FUNCTIONS 52
678 #define SQL_CONVERT_BIGINT 53
679 #define SQL_CONVERT_BINARY 54
680 #define SQL_CONVERT_BIT 55
681 #define SQL_CONVERT_CHAR 56
682 #define SQL_CONVERT_DATE 57
683 #define SQL_CONVERT_DECIMAL 58
684 #define SQL_CONVERT_DOUBLE 59
685 #define SQL_CONVERT_FLOAT 60
686 #define SQL_CONVERT_INTEGER 61
687 #define SQL_CONVERT_LONGVARCHAR 62
688 #define SQL_CONVERT_NUMERIC 63
689 #define SQL_CONVERT_REAL 64
690 #define SQL_CONVERT_SMALLINT 65
691 #define SQL_CONVERT_TIME 66
692 #define SQL_CONVERT_TIMESTAMP 67
693 #define SQL_CONVERT_TINYINT 68
694 #define SQL_CONVERT_VARBINARY 69
695 #define SQL_CONVERT_VARCHAR 70
696 #define SQL_CONVERT_LONGVARBINARY 71
697 #define SQL_ODBC_SQL_OPT_IEF 73 /* SQL_INTEGRITY */
698 #define SQL_CORRELATION_NAME 74
699 #define SQL_NON_NULLABLE_COLUMNS 75
700 #define SQL_DRIVER_HLIB 76
701 #define SQL_DRIVER_ODBC_VER 77
702 #define SQL_LOCK_TYPES 78
703 #define SQL_POS_OPERATIONS 79
704 #define SQL_POSITIONED_STATEMENTS 80
705 #define SQL_BOOKMARK_PERSISTENCE 82
706 #define SQL_STATIC_SENSITIVITY 83
707 #define SQL_FILE_USAGE 84
708 #define SQL_COLUMN_ALIAS 87
709 #define SQL_GROUP_BY 88
710 #define SQL_KEYWORDS 89
711 #define SQL_OWNER_USAGE 91
712 #define SQL_QUALIFIER_USAGE 92
713 #define SQL_QUOTED_IDENTIFIER_CASE 93
714 #define SQL_SUBQUERIES 95
715 #define SQL_UNION 96
716 #define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103
717 #define SQL_MAX_CHAR_LITERAL_LEN 108
718 #define SQL_TIMEDATE_ADD_INTERVALS 109
719 #define SQL_TIMEDATE_DIFF_INTERVALS 110
720 #define SQL_NEED_LONG_DATA_LEN 111
721 #define SQL_MAX_BINARY_LITERAL_LEN 112
722 #define SQL_LIKE_ESCAPE_CLAUSE 113
723 #define SQL_QUALIFIER_LOCATION 114
724 
725 /* ----------------------------------------------------------------------------
726  ODBC 3.0 SQLGetInfo values that are not part of the X/Open standard at this
727  time. X/Open standard values are in sql.h.
728 */
729 #define SQL_ACTIVE_ENVIRONMENTS 116
730 #define SQL_ALTER_DOMAIN 117
731 #define SQL_SQL_CONFORMANCE 118
732 #define SQL_DATETIME_LITERALS 119
733 
734 #define SQL_ASYNC_MODE 10021
735 #define SQL_BATCH_ROW_COUNT 120
736 #define SQL_BATCH_SUPPORT 121
737 #define SQL_CATALOG_LOCATION SQL_QUALIFIER_LOCATION
738 #define SQL_CATALOG_NAME_SEPARATOR SQL_QUALIFIER_NAME_SEPARATOR
739 #define SQL_CATALOG_TERM SQL_QUALIFIER_TERM
740 #define SQL_CATALOG_USAGE SQL_QUALIFIER_USAGE
741 #define SQL_CONVERT_WCHAR 122
742 #define SQL_CONVERT_INTERVAL_DAY_TIME 123
743 #define SQL_CONVERT_INTERVAL_YEAR_MONTH 124
744 #define SQL_CONVERT_WLONGVARCHAR 125
745 #define SQL_CONVERT_WVARCHAR 126
746 #define SQL_CREATE_ASSERTION 127
747 #define SQL_CREATE_CHARACTER_SET 128
748 #define SQL_CREATE_COLLATION 129
749 #define SQL_CREATE_DOMAIN 130
750 #define SQL_CREATE_SCHEMA 131
751 #define SQL_CREATE_TABLE 132
752 #define SQL_CREATE_TRANSLATION 133
753 #define SQL_CREATE_VIEW 134
754 #define SQL_DRIVER_HDESC 135
755 #define SQL_DROP_ASSERTION 136
756 #define SQL_DROP_CHARACTER_SET 137
757 #define SQL_DROP_COLLATION 138
758 #define SQL_DROP_DOMAIN 139
759 #define SQL_DROP_SCHEMA 140
760 #define SQL_DROP_TABLE 141
761 #define SQL_DROP_TRANSLATION 142
762 #define SQL_DROP_VIEW 143
763 #define SQL_DYNAMIC_CURSOR_ATTRIBUTES1 144
764 #define SQL_DYNAMIC_CURSOR_ATTRIBUTES2 145
765 #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 146
766 #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 147
767 #define SQL_INDEX_KEYWORDS 148
768 #define SQL_INFO_SCHEMA_VIEWS 149
769 #define SQL_KEYSET_CURSOR_ATTRIBUTES1 150
770 #define SQL_KEYSET_CURSOR_ATTRIBUTES2 151
771 #define SQL_MAX_ASYNC_CONCURRENT_STATEMENTS 10022 /* new X/Open spec */
772 #define SQL_ODBC_INTERFACE_CONFORMANCE 152
773 #define SQL_PARAM_ARRAY_ROW_COUNTS 153
774 #define SQL_PARAM_ARRAY_SELECTS 154
775 #define SQL_SCHEMA_TERM SQL_OWNER_TERM
776 #define SQL_SCHEMA_USAGE SQL_OWNER_USAGE
777 #define SQL_SQL92_DATETIME_FUNCTIONS 155
778 #define SQL_SQL92_FOREIGN_KEY_DELETE_RULE 156
779 #define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE 157
780 #define SQL_SQL92_GRANT 158
781 #define SQL_SQL92_NUMERIC_VALUE_FUNCTIONS 159
782 #define SQL_SQL92_PREDICATES 160
783 #define SQL_SQL92_RELATIONAL_JOIN_OPERATORS 161
784 #define SQL_SQL92_REVOKE 162
785 #define SQL_SQL92_ROW_VALUE_CONSTRUCTOR 163
786 #define SQL_SQL92_STRING_FUNCTIONS 164
787 #define SQL_SQL92_VALUE_EXPRESSIONS 165
788 #define SQL_STANDARD_CLI_CONFORMANCE 166
789 #define SQL_STATIC_CURSOR_ATTRIBUTES1 167
790 #define SQL_STATIC_CURSOR_ATTRIBUTES2 168
791 
792 #define SQL_AGGREGATE_FUNCTIONS 169
793 #define SQL_DDL_INDEX 170
794 #define SQL_DM_VER 171
795 #define SQL_INSERT_STATEMENT 172
796 #define SQL_CONVERT_GUID 173
797 #define SQL_UNION_STATEMENT SQL_UNION
798 
799 #if (ODBCVER >= 0x0380)
800 /* Info Types */
801 #define SQL_ASYNC_DBC_FUNCTIONS 10023
802 #endif /* ODBCVER >= 0x0380 */
803 
804 #define SQL_DTC_TRANSITION_COST 1750
805 
806 /* ----------------------------------------------------------------------------
807  SQL_ALTER_TABLE bitmasks
808 */
809 #define SQL_AT_ADD_COLUMN_SINGLE 0x00000020L
810 #define SQL_AT_ADD_COLUMN_DEFAULT 0x00000040L
811 #define SQL_AT_ADD_COLUMN_COLLATION 0x00000080L
812 #define SQL_AT_SET_COLUMN_DEFAULT 0x00000100L
813 #define SQL_AT_DROP_COLUMN_DEFAULT 0x00000200L
814 #define SQL_AT_DROP_COLUMN_CASCADE 0x00000400L
815 #define SQL_AT_DROP_COLUMN_RESTRICT 0x00000800L
816 #define SQL_AT_ADD_TABLE_CONSTRAINT 0x00001000L
817 #define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE 0x00002000L
818 #define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT 0x00004000L
819 #define SQL_AT_CONSTRAINT_NAME_DEFINITION 0x00008000L
820 #define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED 0x00010000L
821 #define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00020000L
822 #define SQL_AT_CONSTRAINT_DEFERRABLE 0x00040000L
823 #define SQL_AT_CONSTRAINT_NON_DEFERRABLE 0x00080000L
824 
825 /* ----------------------------------------------------------------------------
826  SQL_CONVERT_* return value bitmasks
827 */
828 #define SQL_CVT_CHAR 0x00000001L
829 #define SQL_CVT_NUMERIC 0x00000002L
830 #define SQL_CVT_DECIMAL 0x00000004L
831 #define SQL_CVT_INTEGER 0x00000008L
832 #define SQL_CVT_SMALLINT 0x00000010L
833 #define SQL_CVT_FLOAT 0x00000020L
834 #define SQL_CVT_REAL 0x00000040L
835 #define SQL_CVT_DOUBLE 0x00000080L
836 #define SQL_CVT_VARCHAR 0x00000100L
837 #define SQL_CVT_LONGVARCHAR 0x00000200L
838 #define SQL_CVT_BINARY 0x00000400L
839 #define SQL_CVT_VARBINARY 0x00000800L
840 #define SQL_CVT_BIT 0x00001000L
841 #define SQL_CVT_TINYINT 0x00002000L
842 #define SQL_CVT_BIGINT 0x00004000L
843 #define SQL_CVT_DATE 0x00008000L
844 #define SQL_CVT_TIME 0x00010000L
845 #define SQL_CVT_TIMESTAMP 0x00020000L
846 #define SQL_CVT_LONGVARBINARY 0x00040000L
847 #define SQL_CVT_INTERVAL_YEAR_MONTH 0x00080000L
848 #define SQL_CVT_INTERVAL_DAY_TIME 0x00100000L
849 #define SQL_CVT_WCHAR 0x00200000L
850 #define SQL_CVT_WLONGVARCHAR 0x00400000L
851 #define SQL_CVT_WVARCHAR 0x00800000L
852 
853 /* ----------------------------------------------------------------------------
854  SQL_CONVERT_FUNCTIONS functions
855 */
856 #define SQL_FN_CVT_CONVERT 0x00000001L
857 #define SQL_FN_CVT_CAST 0x00000002L
858 
859 /* ----------------------------------------------------------------------------
860  SQL_STRING_FUNCTIONS functions
861 */
862 #define SQL_FN_STR_CONCAT 0x00000001L
863 #define SQL_FN_STR_INSERT 0x00000002L
864 #define SQL_FN_STR_LEFT 0x00000004L
865 #define SQL_FN_STR_LTRIM 0x00000008L
866 #define SQL_FN_STR_LENGTH 0x00000010L
867 #define SQL_FN_STR_LOCATE 0x00000020L
868 #define SQL_FN_STR_LCASE 0x00000040L
869 #define SQL_FN_STR_REPEAT 0x00000080L
870 #define SQL_FN_STR_REPLACE 0x00000100L
871 #define SQL_FN_STR_RIGHT 0x00000200L
872 #define SQL_FN_STR_RTRIM 0x00000400L
873 #define SQL_FN_STR_SUBSTRING 0x00000800L
874 #define SQL_FN_STR_UCASE 0x00001000L
875 #define SQL_FN_STR_ASCII 0x00002000L
876 #define SQL_FN_STR_CHAR 0x00004000L
877 #define SQL_FN_STR_DIFFERENCE 0x00008000L
878 #define SQL_FN_STR_LOCATE_2 0x00010000L
879 #define SQL_FN_STR_SOUNDEX 0x00020000L
880 #define SQL_FN_STR_SPACE 0x00040000L
881 #define SQL_FN_STR_BIT_LENGTH 0x00080000L
882 #define SQL_FN_STR_CHAR_LENGTH 0x00100000L
883 #define SQL_FN_STR_CHARACTER_LENGTH 0x00200000L
884 #define SQL_FN_STR_OCTET_LENGTH 0x00400000L
885 #define SQL_FN_STR_POSITION 0x00800000L
886 
887 /* ----------------------------------------------------------------------------
888  SQL_SQL92_STRING_FUNCTIONS
889 */
890 #define SQL_SSF_CONVERT 0x00000001L
891 #define SQL_SSF_LOWER 0x00000002L
892 #define SQL_SSF_UPPER 0x00000004L
893 #define SQL_SSF_SUBSTRING 0x00000008L
894 #define SQL_SSF_TRANSLATE 0x00000010L
895 #define SQL_SSF_TRIM_BOTH 0x00000020L
896 #define SQL_SSF_TRIM_LEADING 0x00000040L
897 #define SQL_SSF_TRIM_TRAILING 0x00000080L
898 
899 /* ----------------------------------------------------------------------------
900  SQL_NUMERIC_FUNCTIONS functions
901 */
902 #define SQL_FN_NUM_ABS 0x00000001L
903 #define SQL_FN_NUM_ACOS 0x00000002L
904 #define SQL_FN_NUM_ASIN 0x00000004L
905 #define SQL_FN_NUM_ATAN 0x00000008L
906 #define SQL_FN_NUM_ATAN2 0x00000010L
907 #define SQL_FN_NUM_CEILING 0x00000020L
908 #define SQL_FN_NUM_COS 0x00000040L
909 #define SQL_FN_NUM_COT 0x00000080L
910 #define SQL_FN_NUM_EXP 0x00000100L
911 #define SQL_FN_NUM_FLOOR 0x00000200L
912 #define SQL_FN_NUM_LOG 0x00000400L
913 #define SQL_FN_NUM_MOD 0x00000800L
914 #define SQL_FN_NUM_SIGN 0x00001000L
915 #define SQL_FN_NUM_SIN 0x00002000L
916 #define SQL_FN_NUM_SQRT 0x00004000L
917 #define SQL_FN_NUM_TAN 0x00008000L
918 #define SQL_FN_NUM_PI 0x00010000L
919 #define SQL_FN_NUM_RAND 0x00020000L
920 #define SQL_FN_NUM_DEGREES 0x00040000L
921 #define SQL_FN_NUM_LOG10 0x00080000L
922 #define SQL_FN_NUM_POWER 0x00100000L
923 #define SQL_FN_NUM_RADIANS 0x00200000L
924 #define SQL_FN_NUM_ROUND 0x00400000L
925 #define SQL_FN_NUM_TRUNCATE 0x00800000L
926 
927 /* ----------------------------------------------------------------------------
928  SQL_SQL92_NUMERIC_VALUE_FUNCTIONS
929  */
930 #define SQL_SNVF_BIT_LENGTH 0x00000001L
931 #define SQL_SNVF_CHAR_LENGTH 0x00000002L
932 #define SQL_SNVF_CHARACTER_LENGTH 0x00000004L
933 #define SQL_SNVF_EXTRACT 0x00000008L
934 #define SQL_SNVF_OCTET_LENGTH 0x00000010L
935 #define SQL_SNVF_POSITION 0x00000020L
936 
937 /* ----------------------------------------------------------------------------
938  SQL_TIMEDATE_FUNCTIONS functions
939  */
940 #define SQL_FN_TD_NOW 0x00000001L
941 #define SQL_FN_TD_CURDATE 0x00000002L
942 #define SQL_FN_TD_DAYOFMONTH 0x00000004L
943 #define SQL_FN_TD_DAYOFWEEK 0x00000008L
944 #define SQL_FN_TD_DAYOFYEAR 0x00000010L
945 #define SQL_FN_TD_MONTH 0x00000020L
946 #define SQL_FN_TD_QUARTER 0x00000040L
947 #define SQL_FN_TD_WEEK 0x00000080L
948 #define SQL_FN_TD_YEAR 0x00000100L
949 #define SQL_FN_TD_CURTIME 0x00000200L
950 #define SQL_FN_TD_HOUR 0x00000400L
951 #define SQL_FN_TD_MINUTE 0x00000800L
952 #define SQL_FN_TD_SECOND 0x00001000L
953 #define SQL_FN_TD_TIMESTAMPADD 0x00002000L
954 #define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L
955 #define SQL_FN_TD_DAYNAME 0x00008000L
956 #define SQL_FN_TD_MONTHNAME 0x00010000L
957 #define SQL_FN_TD_CURRENT_DATE 0x00020000L
958 #define SQL_FN_TD_CURRENT_TIME 0x00040000L
959 #define SQL_FN_TD_CURRENT_TIMESTAMP 0x00080000L
960 #define SQL_FN_TD_EXTRACT 0x00100000L
961 
962 /* ----------------------------------------------------------------------------
963  SQL_SQL92_DATETIME_FUNCTIONS
964 */
965 #define SQL_SDF_CURRENT_DATE 0x00000001L
966 #define SQL_SDF_CURRENT_TIME 0x00000002L
967 #define SQL_SDF_CURRENT_TIMESTAMP 0x00000004L
968 
969 /* ----------------------------------------------------------------------------
970  SQL_SYSTEM_FUNCTIONS functions
971 */
972 #define SQL_FN_SYS_USERNAME 0x00000001L
973 #define SQL_FN_SYS_DBNAME 0x00000002L
974 #define SQL_FN_SYS_IFNULL 0x00000004L
975 
976 /* ----------------------------------------------------------------------------
977  SQL_TIMEDATE_ADD_INTERVALS and SQL_TIMEDATE_DIFF_INTERVALS functions
978 */
979 #define SQL_FN_TSI_FRAC_SECOND 0x00000001L
980 #define SQL_FN_TSI_SECOND 0x00000002L
981 #define SQL_FN_TSI_MINUTE 0x00000004L
982 #define SQL_FN_TSI_HOUR 0x00000008L
983 #define SQL_FN_TSI_DAY 0x00000010L
984 #define SQL_FN_TSI_WEEK 0x00000020L
985 #define SQL_FN_TSI_MONTH 0x00000040L
986 #define SQL_FN_TSI_QUARTER 0x00000080L
987 #define SQL_FN_TSI_YEAR 0x00000100L
988 
989 /* ----------------------------------------------------------------------------
990  bitmasks for SQL_DYNAMIC_CURSOR_ATTRIBUTES1,
991  SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1,
992  SQL_KEYSET_CURSOR_ATTRIBUTES1, and
993  SQL_STATIC_CURSOR_ATTRIBUTES1
994 */
995 
996 /* ----------------------------------------------------------------------------
997  supported SQLFetchScroll FetchOrientation's
998 */
999 #define SQL_CA1_NEXT 0x00000001L
1000 #define SQL_CA1_ABSOLUTE 0x00000002L
1001 #define SQL_CA1_RELATIVE 0x00000004L
1002 #define SQL_CA1_BOOKMARK 0x00000008L
1003 
1004 /* ----------------------------------------------------------------------------
1005  supported SQLSetPos LockType's
1006 */
1007 #define SQL_CA1_LOCK_NO_CHANGE 0x00000040L
1008 #define SQL_CA1_LOCK_EXCLUSIVE 0x00000080L
1009 #define SQL_CA1_LOCK_UNLOC 0x00000100L
1010 
1011 /* ----------------------------------------------------------------------------
1012  supported SQLSetPos Operations
1013 */
1014 #define SQL_CA1_POS_POSITION 0x00000200L
1015 #define SQL_CA1_POS_UPDATE 0x00000400L
1016 #define SQL_CA1_POS_DELETE 0x00000800L
1017 #define SQL_CA1_POS_REFRESH 0x00001000L
1018 
1019 /* ----------------------------------------------------------------------------
1020  positioned updates and deletes
1021 */
1022 #define SQL_CA1_POSITIONED_UPDATE 0x00002000L
1023 #define SQL_CA1_POSITIONED_DELETE 0x00004000L
1024 #define SQL_CA1_SELECT_FOR_UPDATE 0x00008000L
1025 
1026 /* ----------------------------------------------------------------------------
1027  supported SQLBulkOperations operations
1028  */
1029 #define SQL_CA1_BULK_ADD 0x00010000L
1030 #define SQL_CA1_BULK_UPDATE_BY_BOOKMARK 0x00020000L
1031 #define SQL_CA1_BULK_DELETE_BY_BOOKMARK 0x00040000L
1032 #define SQL_CA1_BULK_FETCH_BY_BOOKMARK 0x00080000L
1033 
1034 /* ----------------------------------------------------------------------------
1035  bitmasks for SQL_DYNAMIC_CURSOR_ATTRIBUTES2,
1036  SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2,
1037  SQL_KEYSET_CURSOR_ATTRIBUTES2, and
1038  SQL_STATIC_CURSOR_ATTRIBUTES2
1039 */
1040 
1041 /* ----------------------------------------------------------------------------
1042  supported values for SQL_ATTR_SCROLL_CONCURRENCY
1043 */
1044 #define SQL_CA2_READ_ONLY_CONCURRENCY 0x00000001L
1045 #define SQL_CA2_LOCK_CONCURRENCY 0x00000002L
1046 #define SQL_CA2_OPT_ROWVER_CONCURRENCY 0x00000004L
1047 #define SQL_CA2_OPT_VALUES_CONCURRENCY 0x00000008L
1048 
1049 /* ----------------------------------------------------------------------------
1050  sensitivity of the cursor to its own inserts, deletes, and updates
1051 */
1052 #define SQL_CA2_SENSITIVITY_ADDITIONS 0x00000010L
1053 #define SQL_CA2_SENSITIVITY_DELETIONS 0x00000020L
1054 #define SQL_CA2_SENSITIVITY_UPDATES 0x00000040L
1055 
1056 /* ----------------------------------------------------------------------------
1057  semantics of SQL_ATTR_MAX_ROWS
1058 */
1059 #define SQL_CA2_MAX_ROWS_SELECT 0x00000080L
1060 #define SQL_CA2_MAX_ROWS_INSERT 0x00000100L
1061 #define SQL_CA2_MAX_ROWS_DELETE 0x00000200L
1062 #define SQL_CA2_MAX_ROWS_UPDATE 0x00000400L
1063 #define SQL_CA2_MAX_ROWS_CATALOG 0x00000800L
1064 #define SQL_CA2_MAX_ROWS_AFFECTS_ALL (SQL_CA2_MAX_ROWS_SELECT | \
1065  SQL_CA2_MAX_ROWS_INSERT | SQL_CA2_MAX_ROWS_DELETE | \
1066  SQL_CA2_MAX_ROWS_UPDATE | SQL_CA2_MAX_ROWS_CATALOG)
1067 
1068 /* ----------------------------------------------------------------------------
1069  semantics of SQL_DIAG_CURSOR_ROW_COUNT
1070  */
1071 #define SQL_CA2_CRC_EXACT 0x00001000L
1072 #define SQL_CA2_CRC_APPROXIMATE 0x00002000L
1073 
1074 /* ----------------------------------------------------------------------------
1075  the kinds of positioned statements that can be simulated
1076  */
1077 #define SQL_CA2_SIMULATE_NON_UNIQUE 0x00004000L
1078 #define SQL_CA2_SIMULATE_TRY_UNIQUE 0x00008000L
1079 #define SQL_CA2_SIMULATE_UNIQUE 0x00010000L
1080 
1081 /* ----------------------------------------------------------------------------
1082  SQL_ODBC_API_CONFORMANCE values
1083 */
1084 #define SQL_OAC_NONE 0x0000
1085 #define SQL_OAC_LEVEL1 0x0001
1086 #define SQL_OAC_LEVEL2 0x0002
1087 
1088 /* ----------------------------------------------------------------------------
1089  SQL_ODBC_SAG_CLI_CONFORMANCE values
1090 */
1091 #define SQL_OSCC_NOT_COMPLIANT 0x0000
1092 #define SQL_OSCC_COMPLIANT 0x0001
1093 
1094 /* ----------------------------------------------------------------------------
1095  SQL_ODBC_SQL_CONFORMANCE values
1096 */
1097 #define SQL_OSC_MINIMUM 0x0000
1098 #define SQL_OSC_CORE 0x0001
1099 #define SQL_OSC_EXTENDED 0x0002
1100 
1101 /* ----------------------------------------------------------------------------
1102  SQL_CONCAT_NULL_BEHAVIOR values
1103 */
1104 #define SQL_CB_NULL 0x0000
1105 #define SQL_CB_NON_NULL 0x0001
1106 
1107 /* ----------------------------------------------------------------------------
1108  SQL_SCROLL_OPTIONS masks
1109 */
1110 #define SQL_SO_FORWARD_ONLY 0x00000001L
1111 #define SQL_SO_KEYSET_DRIVEN 0x00000002L
1112 #define SQL_SO_DYNAMIC 0x00000004L
1113 #define SQL_SO_MIXED 0x00000008L
1114 #define SQL_SO_STATIC 0x00000010L
1115 
1116 /* ----------------------------------------------------------------------------
1117  SQL_FETCH_DIRECTION masks
1118  */
1119 #define SQL_FD_FETCH_BOOKMARK 0x00000080L
1120 
1121 /* ----------------------------------------------------------------------------
1122  SQL_CORRELATION_NAME values
1123 */
1124 #define SQL_CN_NONE 0x0000
1125 #define SQL_CN_DIFFERENT 0x0001
1126 #define SQL_CN_ANY 0x0002
1127 
1128 /* ----------------------------------------------------------------------------
1129  SQL_NON_NULLABLE_COLUMNS values
1130  */
1131 #define SQL_NNC_NULL 0x0000
1132 #define SQL_NNC_NON_NULL 0x0001
1133 
1134 /* ----------------------------------------------------------------------------
1135  SQL_NULL_COLLATION values
1136 */
1137 #define SQL_NC_START 0x0002
1138 #define SQL_NC_END 0x0004
1139 
1140 /* ----------------------------------------------------------------------------
1141  SQL_FILE_USAGE values
1142 */
1143 #define SQL_FILE_NOT_SUPPORTED 0x0000
1144 #define SQL_FILE_TABLE 0x0001
1145 #define SQL_FILE_QUALIFIER 0x0002
1146 #define SQL_FILE_CATALOG SQL_FILE_QUALIFIER
1147 
1148 /* ----------------------------------------------------------------------------
1149  SQL_GETDATA_EXTENSIONS values
1150 */
1151 #define SQL_GD_BLOCK 0x00000004L
1152 #define SQL_GD_BOUND 0x00000008L
1153 
1154 /* ----------------------------------------------------------------------------
1155  SQL_POSITIONED_STATEMENTS masks
1156 */
1157 #define SQL_PS_POSITIONED_DELETE 0x00000001L
1158 #define SQL_PS_POSITIONED_UPDATE 0x00000002L
1159 #define SQL_PS_SELECT_FOR_UPDATE 0x00000004L
1160 
1161 /* ----------------------------------------------------------------------------
1162  SQL_GROUP_BY values
1163 */
1164 #define SQL_GB_NOT_SUPPORTED 0x0000
1165 #define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001
1166 #define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002
1167 #define SQL_GB_NO_RELATION 0x0003
1168 #define SQL_GB_COLLATE 0x0004
1169 
1170 
1171 /* ----------------------------------------------------------------------------
1172  SQL_OWNER_USAGE masks
1173 */
1174 #define SQL_OU_DML_STATEMENTS 0x00000001L
1175 #define SQL_OU_PROCEDURE_INVOCATION 0x00000002L
1176 #define SQL_OU_TABLE_DEFINITION 0x00000004L
1177 #define SQL_OU_INDEX_DEFINITION 0x00000008L
1178 #define SQL_OU_PRIVILEGE_DEFINITION 0x00000010L
1179 
1180 /* ----------------------------------------------------------------------------
1181  SQL_SCHEMA_USAGE masks
1182 */
1183 #define SQL_SU_DML_STATEMENTS SQL_OU_DML_STATEMENTS
1184 #define SQL_SU_PROCEDURE_INVOCATION SQL_OU_PROCEDURE_INVOCATION
1185 #define SQL_SU_TABLE_DEFINITION SQL_OU_TABLE_DEFINITION
1186 #define SQL_SU_INDEX_DEFINITION SQL_OU_INDEX_DEFINITION
1187 #define SQL_SU_PRIVILEGE_DEFINITION SQL_OU_PRIVILEGE_DEFINITION
1188 
1189 /* ----------------------------------------------------------------------------
1190  SQL_QUALIFIER_USAGE masks
1191 */
1192 #define SQL_QU_DML_STATEMENTS 0x00000001L
1193 #define SQL_QU_PROCEDURE_INVOCATION 0x00000002L
1194 #define SQL_QU_TABLE_DEFINITION 0x00000004L
1195 #define SQL_QU_INDEX_DEFINITION 0x00000008L
1196 #define SQL_QU_PRIVILEGE_DEFINITION 0x00000010L
1197 
1198 /* ----------------------------------------------------------------------------
1199  SQL_CATALOG_USAGE masks
1200  */
1201 #define SQL_CU_DML_STATEMENTS SQL_QU_DML_STATEMENTS
1202 #define SQL_CU_PROCEDURE_INVOCATION SQL_QU_PROCEDURE_INVOCATION
1203 #define SQL_CU_TABLE_DEFINITION SQL_QU_TABLE_DEFINITION
1204 #define SQL_CU_INDEX_DEFINITION QL_QU_INDEX_DEFINITION
1205 #define SQL_CU_PRIVILEGE_DEFINITION SQL_QU_PRIVILEGE_DEFINITION
1206 
1207 /* ----------------------------------------------------------------------------
1208  SQL_SUBQUERIES masks
1209 */
1210 #define SQL_SQ_COMPARISON 0x00000001L
1211 #define SQL_SQ_EXISTS 0x00000002L
1212 #define SQL_SQ_IN 0x00000004L
1213 #define SQL_SQ_QUANTIFIED 0x00000008L
1214 #define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L
1215 
1216 /* ----------------------------------------------------------------------------
1217  SQL_UNION masks
1218 */
1219 #define SQL_U_UNION 0x00000001L
1220 #define SQL_U_UNION_ALL 0x00000002L
1221 
1222 
1223 /* ----------------------------------------------------------------------------
1224  SQL_BOOKMARK_PERSISTENCE values
1225 */
1226 #define SQL_BP_CLOSE 0x00000001L
1227 #define SQL_BP_DELETE 0x00000002L
1228 #define SQL_BP_DROP 0x00000004L
1229 #define SQL_BP_TRANSACTION 0x00000008L
1230 #define SQL_BP_UPDATE 0x00000010L
1231 #define SQL_BP_OTHER_HSTMT 0x00000020L
1232 #define SQL_BP_SCROLL 0x00000040L
1233 
1234 /* ----------------------------------------------------------------------------
1235  SQL_STATIC_SENSITIVITY values
1236 */
1237 #define SQL_SS_ADDITIONS 0x00000001L
1238 #define SQL_SS_DELETIONS 0x00000002L
1239 #define SQL_SS_UPDATES 0x00000004L
1240 
1241 /* ----------------------------------------------------------------------------
1242  SQL_VIEW values
1243 */
1244 #define SQL_CV_CREATE_VIEW 0x00000001L
1245 #define SQL_CV_CHECK_OPTION 0x00000002L
1246 #define SQL_CV_CASCADED 0x00000004L
1247 #define SQL_CV_LOCAL 0x00000008L
1248 
1249 /* ----------------------------------------------------------------------------
1250  SQL_LOCK_TYPES masks
1251 */
1252 #define SQL_LCK_NO_CHANGE 0x00000001L
1253 #define SQL_LCK_EXCLUSIVE 0x00000002L
1254 #define SQL_LCK_UNLOCK 0x00000004L
1255 
1256 /* ----------------------------------------------------------------------------
1257  SQL_POS_OPERATIONS masks
1258 */
1259 #define SQL_POS_POSITION 0x00000001L
1260 #define SQL_POS_REFRESH 0x00000002L
1261 #define SQL_POS_UPDATE 0x00000004L
1262 #define SQL_POS_DELETE 0x00000008L
1263 #define SQL_POS_ADD 0x00000010L
1264 
1265 /* ----------------------------------------------------------------------------
1266  SQL_QUALIFIER_LOCATION values
1267 */
1268 #define SQL_QL_START 0x0001
1269 #define SQL_QL_END 0x0002
1270 
1271 /* ============================================================================
1272  Here start return values for ODBC 3.0 SQLGetInfo
1273 */
1274 
1275 /* ----------------------------------------------------------------------------
1276  SQL_AGGREGATE_FUNCTIONS bitmasks
1277 */
1278 #define SQL_AF_AVG 0x00000001L
1279 #define SQL_AF_COUNT 0x00000002L
1280 #define SQL_AF_MAX 0x00000004L
1281 #define SQL_AF_MIN 0x00000008L
1282 #define SQL_AF_SUM 0x00000010L
1283 #define SQL_AF_DISTINCT 0x00000020L
1284 #define SQL_AF_ALL 0x00000040L
1285 
1286 /* ----------------------------------------------------------------------------
1287  SQL_SQL_CONFORMANCE bit masks
1288 */
1289 #define SQL_SC_SQL92_ENTRY 0x00000001L
1290 #define SQL_SC_FIPS127_2_TRANSITIONAL 0x00000002L
1291 #define SQL_SC_SQL92_INTERMEDIATE 0x00000004L
1292 #define SQL_SC_SQL92_FULL 0x00000008L
1293 
1294 /* ----------------------------------------------------------------------------
1295  SQL_DATETIME_LITERALS masks
1296 */
1297 #define SQL_DL_SQL92_DATE 0x00000001L
1298 #define SQL_DL_SQL92_TIME 0x00000002L
1299 #define SQL_DL_SQL92_TIMESTAMP 0x00000004L
1300 #define SQL_DL_SQL92_INTERVAL_YEAR 0x00000008L
1301 #define SQL_DL_SQL92_INTERVAL_MONTH 0x00000010L
1302 #define SQL_DL_SQL92_INTERVAL_DAY 0x00000020L
1303 #define SQL_DL_SQL92_INTERVAL_HOUR 0x00000040L
1304 #define SQL_DL_SQL92_INTERVAL_MINUTE 0x00000080L
1305 #define SQL_DL_SQL92_INTERVAL_SECOND 0x00000100L
1306 #define SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH 0x00000200L
1307 #define SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR 0x00000400L
1308 #define SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE 0x00000800L
1309 #define SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND 0x00001000L
1310 #define SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE 0x00002000L
1311 #define SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND 0x00004000L
1312 #define SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND 0x00008000L
1313 
1314 /* ----------------------------------------------------------------------------
1315  SQL_CATALOG_LOCATION values
1316 */
1317 #define SQL_CL_START SQL_QL_START
1318 #define SQL_CL_END SQL_QL_END
1319 
1320 /* ----------------------------------------------------------------------------
1321  values for SQL_BATCH_ROW_COUNT
1322 */
1323 #define SQL_BRC_PROCEDURES 0x0000001
1324 #define SQL_BRC_EXPLICIT 0x0000002
1325 #define SQL_BRC_ROLLED_UP 0x0000004
1326 
1327 /* ----------------------------------------------------------------------------
1328  bitmasks for SQL_BATCH_SUPPORT
1329 */
1330 #define SQL_BS_SELECT_EXPLICIT 0x00000001L
1331 #define SQL_BS_ROW_COUNT_EXPLICIT 0x00000002L
1332 #define SQL_BS_SELECT_PROC 0x00000004L
1333 #define SQL_BS_ROW_COUNT_PROC 0x00000008L
1334 
1335 /* ----------------------------------------------------------------------------
1336  Values for SQL_PARAM_ARRAY_ROW_COUNTS getinfo
1337 */
1338 #define SQL_PARC_BATCH 1
1339 #define SQL_PARC_NO_BATCH 2
1340 
1341 /* ----------------------------------------------------------------------------
1342  values for SQL_PARAM_ARRAY_SELECTS
1343 */
1344 #define SQL_PAS_BATCH 1
1345 #define SQL_PAS_NO_BATCH 2
1346 #define SQL_PAS_NO_SELECT 3
1347 
1348 /* ----------------------------------------------------------------------------
1349  bitmasks for SQL_INDEX_KEYWORDS
1350 */
1351 #define SQL_IK_NONE 0x00000000L
1352 #define SQL_IK_ASC 0x00000001L
1353 #define SQL_IK_DESC 0x00000002L
1354 #define SQL_IK_ALL (SQL_IK_ASC | SQL_IK_DESC)
1355 
1356 /* ----------------------------------------------------------------------------
1357  bitmasks for SQL_INFO_SCHEMA_VIEWS
1358 */
1359 #define SQL_ISV_ASSERTIONS 0x00000001L
1360 #define SQL_ISV_CHARACTER_SETS 0x00000002L
1361 #define SQL_ISV_CHECK_CONSTRAINTS 0x00000004L
1362 #define SQL_ISV_COLLATIONS 0x00000008L
1363 #define SQL_ISV_COLUMN_DOMAIN_USAGE 0x00000010L
1364 #define SQL_ISV_COLUMN_PRIVILEGES 0x00000020L
1365 #define SQL_ISV_COLUMNS 0x00000040L
1366 #define SQL_ISV_CONSTRAINT_COLUMN_USAGE 0x00000080L
1367 #define SQL_ISV_CONSTRAINT_TABLE_USAGE 0x00000100L
1368 #define SQL_ISV_DOMAIN_CONSTRAINTS 0x00000200L
1369 #define SQL_ISV_DOMAINS 0x00000400L
1370 #define SQL_ISV_KEY_COLUMN_USAGE 0x00000800L
1371 #define SQL_ISV_REFERENTIAL_CONSTRAINTS 0x00001000L
1372 #define SQL_ISV_SCHEMATA 0x00002000L
1373 #define SQL_ISV_SQL_LANGUAGES 0x00004000L
1374 #define SQL_ISV_TABLE_CONSTRAINTS 0x00008000L
1375 #define SQL_ISV_TABLE_PRIVILEGES 0x00010000L
1376 #define SQL_ISV_TABLES 0x00020000L
1377 #define SQL_ISV_TRANSLATIONS 0x00040000L
1378 #define SQL_ISV_USAGE_PRIVILEGES 0x00080000L
1379 #define SQL_ISV_VIEW_COLUMN_USAGE 0x00100000L
1380 #define SQL_ISV_VIEW_TABLE_USAGE 0x00200000L
1381 #define SQL_ISV_VIEWS 0x00400000L
1382 
1383 /* ----------------------------------------------------------------------------
1384  bitmasks for SQL_ASYNC_MODE
1385 */
1386 #define SQL_AM_NONE 0
1387 #define SQL_AM_CONNECTION 1
1388 #define SQL_AM_STATEMENT 2
1389 
1390 /* ----------------------------------------------------------------------------
1391  bitmasks for SQL_ALTER_DOMAIN
1392 */
1393 #define SQL_AD_CONSTRAINT_NAME_DEFINITION 0x00000001L
1394 #define SQL_AD_ADD_DOMAIN_CONSTRAINT 0x00000002L
1395 #define SQL_AD_DROP_DOMAIN_CONSTRAINT 0x00000004L
1396 #define SQL_AD_ADD_DOMAIN_DEFAULT 0x00000008L
1397 #define SQL_AD_DROP_DOMAIN_DEFAULT 0x00000010L
1398 #define SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
1399 #define SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
1400 #define SQL_AD_ADD_CONSTRAINT_DEFERRABLE 0x00000080L
1401 #define SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE 0x00000100L
1402 
1403 /* ----------------------------------------------------------------------------
1404  SQL_CREATE_SCHEMA bitmasks
1405 */
1406 #define SQL_CS_CREATE_SCHEMA 0x00000001L
1407 #define SQL_CS_AUTHORIZATION 0x00000002L
1408 #define SQL_CS_DEFAULT_CHARACTER_SET 0x00000004L
1409 
1410 /* ----------------------------------------------------------------------------
1411  SQL_CREATE_TRANSLATION bitmasks
1412 */
1413 #define SQL_CTR_CREATE_TRANSLATION 0x00000001L
1414 
1415 /* ----------------------------------------------------------------------------
1416  SQL_CREATE_ASSERTION bitmasks
1417 */
1418 #define SQL_CA_CREATE_ASSERTION 0x00000001L
1419 #define SQL_CA_CONSTRAINT_INITIALLY_DEFERRED 0x00000010L
1420 #define SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000020L
1421 #define SQL_CA_CONSTRAINT_DEFERRABLE 0x00000040L
1422 #define SQL_CA_CONSTRAINT_NON_DEFERRABLE 0x00000080L
1423 
1424 /* ----------------------------------------------------------------------------
1425  SQL_CREATE_CHARACTER_SET bitmasks
1426 */
1427 #define SQL_CCS_CREATE_CHARACTER_SET 0x00000001L
1428 #define SQL_CCS_COLLATE_CLAUSE 0x00000002L
1429 #define SQL_CCS_LIMITED_COLLATION 0x00000004L
1430 
1431 /* ----------------------------------------------------------------------------
1432  SQL_CREATE_COLLATION bitmasks
1433 */
1434 #define SQL_CCOL_CREATE_COLLATION 0x00000001L
1435 
1436 /* ----------------------------------------------------------------------------
1437  SQL_CREATE_DOMAIN bitmasks
1438 */
1439 #define SQL_CDO_CREATE_DOMAIN 0x00000001L
1440 #define SQL_CDO_DEFAULT 0x00000002L
1441 #define SQL_CDO_CONSTRAINT 0x00000004L
1442 #define SQL_CDO_COLLATION 0x00000008L
1443 #define SQL_CDO_CONSTRAINT_NAME_DEFINITION 0x00000010L
1444 #define SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
1445 #define SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
1446 #define SQL_CDO_CONSTRAINT_DEFERRABLE 0x00000080L
1447 #define SQL_CDO_CONSTRAINT_NON_DEFERRABLE 0x00000100L
1448 
1449 /* ----------------------------------------------------------------------------
1450  SQL_CREATE_TABLE bitmasks
1451 */
1452 #define SQL_CT_CREATE_TABLE 0x00000001L
1453 #define SQL_CT_COMMIT_PRESERVE 0x00000002L
1454 #define SQL_CT_COMMIT_DELETE 0x00000004L
1455 #define SQL_CT_GLOBAL_TEMPORARY 0x00000008L
1456 #define SQL_CT_LOCAL_TEMPORARY 0x00000010L
1457 #define SQL_CT_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
1458 #define SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
1459 #define SQL_CT_CONSTRAINT_DEFERRABLE 0x00000080L
1460 #define SQL_CT_CONSTRAINT_NON_DEFERRABLE 0x00000100L
1461 #define SQL_CT_COLUMN_CONSTRAINT 0x00000200L
1462 #define SQL_CT_COLUMN_DEFAULT 0x00000400L
1463 #define SQL_CT_COLUMN_COLLATION 0x00000800L
1464 #define SQL_CT_TABLE_CONSTRAINT 0x00001000L
1465 #define SQL_CT_CONSTRAINT_NAME_DEFINITION 0x00002000L
1466 
1467 /* ----------------------------------------------------------------------------
1468  SQL_DDL_INDEX bitmasks
1469 */
1470 #define SQL_DI_CREATE_INDEX 0x00000001L
1471 #define SQL_DI_DROP_INDEX 0x00000002L
1472 
1473 /* ----------------------------------------------------------------------------
1474  SQL_DROP_COLLATION bitmasks
1475 */
1476 #define SQL_DC_DROP_COLLATION 0x00000001L
1477 
1478 /* ----------------------------------------------------------------------------
1479  SQL_DROP_DOMAIN bitmasks
1480 */
1481 #define SQL_DD_DROP_DOMAIN 0x00000001L
1482 #define SQL_DD_RESTRICT 0x00000002L
1483 #define SQL_DD_CASCADE 0x00000004L
1484 
1485 /* ----------------------------------------------------------------------------
1486  SQL_DROP_SCHEMA bitmasks
1487 */
1488 #define SQL_DS_DROP_SCHEMA 0x00000001L
1489 #define SQL_DS_RESTRICT 0x00000002L
1490 #define SQL_DS_CASCADE 0x00000004L
1491 
1492 /* ----------------------------------------------------------------------------
1493  SQL_DROP_CHARACTER_SET bitmasks
1494 */
1495 #define SQL_DCS_DROP_CHARACTER_SET 0x00000001L
1496 
1497 /* ----------------------------------------------------------------------------
1498  SQL_DROP_ASSERTION bitmasks
1499 */
1500 #define SQL_DA_DROP_ASSERTION 0x00000001L
1501 
1502 /* ----------------------------------------------------------------------------
1503  SQL_DROP_TABLE bitmasks
1504 */
1505 #define SQL_DT_DROP_TABLE 0x00000001L
1506 #define SQL_DT_RESTRICT 0x00000002L
1507 #define SQL_DT_CASCADE 0x00000004L
1508 
1509 /* ----------------------------------------------------------------------------
1510  SQL_DROP_TRANSLATION bitmasks
1511 */
1512 #define SQL_DTR_DROP_TRANSLATION 0x00000001L
1513 
1514 /* ----------------------------------------------------------------------------
1515  SQL_DROP_VIEW bitmasks
1516 */
1517 #define SQL_DV_DROP_VIEW 0x00000001L
1518 #define SQL_DV_RESTRICT 0x00000002L
1519 #define SQL_DV_CASCADE 0x00000004L
1520 
1521 /* ----------------------------------------------------------------------------
1522  SQL_INSERT_STATEMENT bitmasks
1523 */
1524 #define SQL_IS_INSERT_LITERALS 0x00000001L
1525 #define SQL_IS_INSERT_SEARCHED 0x00000002L
1526 #define SQL_IS_SELECT_INTO 0x00000004L
1527 
1528 /* ----------------------------------------------------------------------------
1529  SQL_ODBC_INTERFACE_CONFORMANCE values
1530  */
1531 #define SQL_OIC_CORE 1
1532 #define SQL_OIC_LEVEL1 2
1533 #define SQL_OIC_LEVEL2 3
1534 
1535 /* ----------------------------------------------------------------------------
1536  SQL_SQL92_FOREIGN_KEY_DELETE_RULE bitmasks
1537 */
1538 #define SQL_SFKD_CASCADE 0x00000001L
1539 #define SQL_SFKD_NO_ACTION 0x00000002L
1540 #define SQL_SFKD_SET_DEFAULT 0x00000004L
1541 #define SQL_SFKD_SET_NULL 0x00000008L
1542 
1543 /* ----------------------------------------------------------------------------
1544  SQL_SQL92_FOREIGN_KEY_UPDATE_RULE bitmasks
1545 */
1546 #define SQL_SFKU_CASCADE 0x00000001L
1547 #define SQL_SFKU_NO_ACTION 0x00000002L
1548 #define SQL_SFKU_SET_DEFAULT 0x00000004L
1549 #define SQL_SFKU_SET_NULL 0x00000008L
1550 
1551 /* ----------------------------------------------------------------------------
1552  SQL_SQL92_GRANT bitmasks
1553 */
1554 #define SQL_SG_USAGE_ON_DOMAIN 0x00000001L
1555 #define SQL_SG_USAGE_ON_CHARACTER_SET 0x00000002L
1556 #define SQL_SG_USAGE_ON_COLLATION 0x00000004L
1557 #define SQL_SG_USAGE_ON_TRANSLATION 0x00000008L
1558 #define SQL_SG_WITH_GRANT_OPTION 0x00000010L
1559 #define SQL_SG_DELETE_TABLE 0x00000020L
1560 #define SQL_SG_INSERT_TABLE 0x00000040L
1561 #define SQL_SG_INSERT_COLUMN 0x00000080L
1562 #define SQL_SG_REFERENCES_TABLE 0x00000100L
1563 #define SQL_SG_REFERENCES_COLUMN 0x00000200L
1564 #define SQL_SG_SELECT_TABLE 0x00000400L
1565 #define SQL_SG_UPDATE_TABLE 0x00000800L
1566 #define SQL_SG_UPDATE_COLUMN 0x00001000L
1567 
1568 /* ----------------------------------------------------------------------------
1569  SQL_SQL92_PREDICATES bitmasks
1570 */
1571 #define SQL_SP_EXISTS 0x00000001L
1572 #define SQL_SP_ISNOTNULL 0x00000002L
1573 #define SQL_SP_ISNULL 0x00000004L
1574 #define SQL_SP_MATCH_FULL 0x00000008L
1575 #define SQL_SP_MATCH_PARTIAL 0x00000010L
1576 #define SQL_SP_MATCH_UNIQUE_FULL 0x00000020L
1577 #define SQL_SP_MATCH_UNIQUE_PARTIAL 0x00000040L
1578 #define SQL_SP_OVERLAPS 0x00000080L
1579 #define SQL_SP_UNIQUE 0x00000100L
1580 #define SQL_SP_LIKE 0x00000200L
1581 #define SQL_SP_IN 0x00000400L
1582 #define SQL_SP_BETWEEN 0x00000800L
1583 #define SQL_SP_COMPARISON 0x00001000L
1584 #define SQL_SP_QUANTIFIED_COMPARISON 0x00002000L
1585 
1586 /* ----------------------------------------------------------------------------
1587  SQL_SQL92_RELATIONAL_JOIN_OPERATORS bitmasks
1588 */
1589 #define SQL_SRJO_CORRESPONDING_CLAUSE 0x00000001L
1590 #define SQL_SRJO_CROSS_JOIN 0x00000002L
1591 #define SQL_SRJO_EXCEPT_JOIN 0x00000004L
1592 #define SQL_SRJO_FULL_OUTER_JOIN 0x00000008L
1593 #define SQL_SRJO_INNER_JOIN 0x00000010L
1594 #define SQL_SRJO_INTERSECT_JOIN 0x00000020L
1595 #define SQL_SRJO_LEFT_OUTER_JOIN 0x00000040L
1596 #define SQL_SRJO_NATURAL_JOIN 0x00000080L
1597 #define SQL_SRJO_RIGHT_OUTER_JOIN 0x00000100L
1598 #define SQL_SRJO_UNION_JOIN 0x00000200L
1599 
1600 /* ----------------------------------------------------------------------------
1601  SQL_SQL92_REVOKE bitmasks
1602 */
1603 #define SQL_SR_USAGE_ON_DOMAIN 0x00000001L
1604 #define SQL_SR_USAGE_ON_CHARACTER_SET 0x00000002L
1605 #define SQL_SR_USAGE_ON_COLLATION 0x00000004L
1606 #define SQL_SR_USAGE_ON_TRANSLATION 0x00000008L
1607 #define SQL_SR_GRANT_OPTION_FOR 0x00000010L
1608 #define SQL_SR_CASCADE 0x00000020L
1609 #define SQL_SR_RESTRICT 0x00000040L
1610 #define SQL_SR_DELETE_TABLE 0x00000080L
1611 #define SQL_SR_INSERT_TABLE 0x00000100L
1612 #define SQL_SR_INSERT_COLUMN 0x00000200L
1613 #define SQL_SR_REFERENCES_TABLE 0x00000400L
1614 #define SQL_SR_REFERENCES_COLUM 0x00000800L
1615 #define SQL_SR_SELECT_TABLE 0x00001000L
1616 #define SQL_SR_UPDATE_TABLE 0x00002000L
1617 #define SQL_SR_UPDATE_COLUMN 0x00004000L
1618 
1619 /* ----------------------------------------------------------------------------
1620  SQL_SQL92_ROW_VALUE_CONSTRUCTOR bitmasks
1621  */
1622 #define SQL_SRVC_VALUE_EXPRESSION 0x00000001L
1623 #define SQL_SRVC_NULL 0x00000002L
1624 #define SQL_SRVC_DEFAULT 0x00000004L
1625 #define SQL_SRVC_ROW_SUBQUERY 0x00000008L
1626 
1627 /* ----------------------------------------------------------------------------
1628  SQL_SQL92_VALUE_EXPRESSIONS bitmasks
1629 */
1630 #define SQL_SVE_CASE 0x00000001L
1631 #define SQL_SVE_CAST 0x00000002L
1632 #define SQL_SVE_COALESCE 0x00000004L
1633 #define SQL_SVE_NULLIF 0x00000008L
1634 
1635 /* ----------------------------------------------------------------------------
1636  SQL_STANDARD_CLI_CONFORMANCE bitmasks
1637 */
1638 #define SQL_SCC_XOPEN_CLI_VERSION1 0x00000001L
1639 #define SQL_SCC_ISO92_CLI 0x00000002L
1640 
1641 /* ----------------------------------------------------------------------------
1642  SQL_UNION_STATEMENT bitmasks
1643 */
1644 #define SQL_US_UNION SQL_U_UNION
1645 #define SQL_US_UNION_ALL SQL_U_UNION_ALL
1646 
1647 /* ----------------------------------------------------------------------------
1648  SQL_DTC_TRANSITION_COST bitmasks
1649  */
1650 #define SQL_DTC_ENLIST_EXPENSIVE 0x00000001L
1651 #define SQL_DTC_UNENLIST_EXPENSIVE 0x00000002L
1652 
1653 /* ----------------------------------------------------------------------------
1654  additional SQLDataSources fetch directions
1655  */
1656 #define SQL_FETCH_FIRST_USER 31
1657 #define SQL_FETCH_FIRST_SYSTEM 32
1658 
1659 /* ----------------------------------------------------------------------------
1660  Defines for SQLSetPos
1661 */
1662 #define SQL_ENTIRE_ROWSET 0
1663 
1664 /* ----------------------------------------------------------------------------
1665  oerations in SQLSetPos
1666 */
1667 #define SQL_POSITION 0
1668 #define SQL_REFRESH 1
1669 #define SQL_UPDATE 2
1670 #define SQL_DELETE 3
1671 
1672 /* ----------------------------------------------------------------------------
1673  operations in SQLBulkOperations
1674 */
1675 #define SQL_ADD 4
1676 #define SQL_SETPOS_MAX_OPTION_VALUE SQL_ADD
1677 #define SQL_UPDATE_BY_BOOKMARK 5
1678 #define SQL_DELETE_BY_BOOKMARK 6
1679 #define SQL_FETCH_BY_BOOKMARK 7
1680 
1681 
1682 /* ----------------------------------------------------------------------------
1683  lock options in SQLSetPos
1684 */
1685 #define SQL_LOCK_NO_CHANGE 0 /* 1.0 FALSE */
1686 #define SQL_LOCK_EXCLUSIVE 1 /* 1.0 TRUE */
1687 #define SQL_LOCK_UNLOCK 2
1688 
1689 #define SQL_SETPOS_MAX_LOCK_VALUE SQL_LOCK_UNLOCK
1690 
1691 /* ----------------------------------------------------------------------------
1692  macros for SQLSetPos
1693 */
1694 #define SQL_POSITION_TO(hstmt,irow) \
1695  SQLSetPos(hstmt,irow,SQL_POSITION,SQL_LOCK_NO_CHANGE)
1696 #define SQL_LOCK_RECORD(hstmt,irow,fLock) \
1697  SQLSetPos(hstmt,irow,SQL_POSITION,fLock)
1698 #define SQL_REFRESH_RECORD(hstmt,irow,fLock) \
1699  SQLSetPos(hstmt,irow,SQL_REFRESH,fLock)
1700 #define SQL_UPDATE_RECORD(hstmt,irow) \
1701  SQLSetPos(hstmt,irow,SQL_UPDATE,SQL_LOCK_NO_CHANGE)
1702 #define SQL_DELETE_RECORD(hstmt,irow) \
1703  SQLSetPos(hstmt,irow,SQL_DELETE,SQL_LOCK_NO_CHANGE)
1704 #define SQL_ADD_RECORD(hstmt,irow) \
1705  SQLSetPos(hstmt,irow,SQL_ADD,SQL_LOCK_NO_CHANGE)
1706 
1707 /* ----------------------------------------------------------------------------
1708  Column types and scopes in SQLSpecialColumns
1709 */
1710 #define SQL_BEST_ROWID 1
1711 #define SQL_ROWVER 2
1712 
1713 /* ----------------------------------------------------------------------------
1714  defines for SQLSpecialColumns (returned in the result set)
1715  SQL_PC_UNKNOWN and SQL_PC_PSEUDO are defined in sql.h
1716 */
1717 #define SQL_PC_NOT_PSEUDO 1
1718 
1719 /* ----------------------------------------------------------------------------
1720  defines for SQLStatistics
1721 */
1722 #define SQL_QUICK 0
1723 #define SQL_ENSURE 1
1724 
1725 /* ----------------------------------------------------------------------------
1726  defines for SQLStatistics (returned in the result set)
1727  SQL_INDEX_CLUSTERED, SQL_INDEX_HASHED, and SQL_INDEX_OTHER are
1728  defined in sql.h
1729 */
1730 #define SQL_TABLE_STAT 0
1731 
1732 /* ----------------------------------------------------------------------------
1733  defines for SQLTables
1734 */
1735 #define SQL_ALL_CATALOGS "%"
1736 #define SQL_ALL_SCHEMAS "%"
1737 #define SQL_ALL_TABLE_TYPES "%"
1738 
1739 /* ----------------------------------------------------------------------------
1740  options for SQLDriverConnect
1741  */
1742 #define SQL_DRIVER_NOPROMPT 0
1743 #define SQL_DRIVER_COMPLETE 1
1744 #define SQL_DRIVER_PROMPT 2
1745 #define SQL_DRIVER_COMPLETE_REQUIRED 3
1746 
1747 #if defined(RDM_WINDOWS) && defined(RDM_ODBC_DRV)
1748  #if defined(RDM_32BIT)
1749  #pragma comment(linker, "/export:[email protected]")
1750  #else
1751  #pragma comment(linker, "/export:SQLDriverConnect")
1752  #endif
1753 #endif
1754 
1755 RDBC_EXPORT SQLRETURN SQL_API SQLDriverConnect(
1756  SQLHDBC ConnectionHandle,
1757  SQLHWND WindowHandle,
1758  const SQLCHAR *InConnectionString,
1759  SQLSMALLINT StringLength1,
1760  SQLCHAR *OutConnectionString,
1761  SQLSMALLINT BufferLength,
1762  SQLSMALLINT *StringLength2Ptr,
1763  SQLUSMALLINT DriverCompletion);
1764 
1765 /* ============================================================================
1766  Level 2 funtions
1767 */
1768 
1769 /* ----------------------------------------------------------------------------
1770  SQLExtendedFetch "fFetchType" values
1771 */
1772 #define SQL_FETCH_BOOKMARK 8
1773 
1774 /* ----------------------------------------------------------------------------
1775  SQLExtendedFetch "rgfRowStatus" element values
1776 */
1777 #define SQL_ROW_SUCCESS 0
1778 #define SQL_ROW_DELETED 1
1779 #define SQL_ROW_UPDATED 2
1780 #define SQL_ROW_NOROW 3
1781 #define SQL_ROW_ADDED 4
1782 #define SQL_ROW_ERROR 5
1783 #define SQL_ROW_SUCCESS_WITH_INFO 6
1784 #define SQL_ROW_PROCEED 0
1785 #define SQL_ROW_IGNORE 1
1786 
1787 /* ----------------------------------------------------------------------------
1788  value for SQL_DESC_ARRAY_STATUS_PTR
1789  */
1790 #define SQL_PARAM_SUCCESS 0
1791 #define SQL_PARAM_SUCCESS_WITH_INFO 6
1792 #define SQL_PARAM_ERROR 5
1793 #define SQL_PARAM_UNUSED 7
1794 #define SQL_PARAM_DIAG_UNAVAILABLE 1
1795 
1796 #define SQL_PARAM_PROCEED 0
1797 #define SQL_PARAM_IGNORE 1
1798 
1799 /* ----------------------------------------------------------------------------
1800  defines for SQLForeignKeys (UPDATE_RULE and DELETE_RULE)
1801 */
1802 #define SQL_CASCADE 0
1803 #define SQL_RESTRICT 1
1804 #define SQL_SET_NULL 2
1805 #define SQL_NO_ACTION 3
1806 #define SQL_SET_DEFAULT 4
1807 
1808 /* ----------------------------------------------------------------------------
1809  Note that the following are in a different column of SQLForeignKeys than
1810  the previous #defines. These are for DEFERRABILITY.
1811 */
1812 #define SQL_INITIALLY_DEFERRED 5
1813 #define SQL_INITIALLY_IMMEDIATE 6
1814 #define SQL_NOT_DEFERRABLE 7
1815 
1816 /* ----------------------------------------------------------------------------
1817  defines for SQLBindParameter and SQLProcedureColumns
1818 */
1819 #define SQL_PARAM_TYPE_UNKNOWN 0
1820 #define SQL_PARAM_INPUT 1
1821 #define SQL_PARAM_INPUT_OUTPUT 2
1822 #define SQL_RESULT_COL 3
1823 #define SQL_PARAM_OUTPUT 4
1824 #define SQL_RETURN_VALUE 5
1825 
1826 #if (ODBCVER >= 0x0380)
1827  #define SQL_PARAM_INPUT_OUTPUT_STREAM 8
1828  #define SQL_PARAM_OUTPUT_STREAM 16
1829 #endif
1830 
1831 /* ----------------------------------------------------------------------------
1832  defines for SQLProcedures (returned in the result set)
1833 */
1834 #define SQL_PT_UNKNOWN 0
1835 #define SQL_PT_PROCEDURE 1
1836 #define SQL_PT_FUNCTION 2
1837 
1838 /* ----------------------------------------------------------------------------
1839 */
1840 #if defined(RDM_WINDOWS) && defined(RDM_ODBC_DRV)
1841  #if defined(RDM_32BIT)
1842  #pragma comment(linker, "/export:[email protected]")
1843  #pragma comment(linker, "/export:[email protected]")
1844  #pragma comment(linker, "/export:[email protected]")
1845  #pragma comment(linker, "/export:[email protected]")
1846  #pragma comment(linker, "/export:[email protected]")
1847  #pragma comment(linker, "/export:[email protected]")
1848  #pragma comment(linker, "/export:[email protected]")
1849  #pragma comment(linker, "/export:[email protected]")
1850  #pragma comment(linker, "/export:SQLPrimaryKeys[email protected]")
1851  #pragma comment(linker, "/export:[email protected]")
1852  #pragma comment(linker, "/export:[email protected]")
1853  #pragma comment(linker, "/export:[email protected]")
1854  #pragma comment(linker, "/export:[email protected]")
1855  #else
1856  #pragma comment(linker, "/export:SQLBindParameter")
1857  #pragma comment(linker, "/export:SQLBulkOperations")
1858  #pragma comment(linker, "/export:SQLColumnPrivileges")
1859  #pragma comment(linker, "/export:SQLDescribeParam")
1860  #pragma comment(linker, "/export:SQLForeignKeys")
1861  #pragma comment(linker, "/export:SQLMoreResults")
1862  #pragma comment(linker, "/export:SQLNativeSql")
1863  #pragma comment(linker, "/export:SQLNumParams")
1864  #pragma comment(linker, "/export:SQLPrimaryKeys")
1865  #pragma comment(linker, "/export:SQLProcedureColumns")
1866  #pragma comment(linker, "/export:SQLProcedures")
1867  #pragma comment(linker, "/export:SQLSetPos")
1868  #pragma comment(linker, "/export:SQLTablePrivileges")
1869  #endif
1870 #endif
1871 
1875 RDBC_EXPORT SQLRETURN SQL_API SQLBindParameter (
1876  SQLHSTMT StatementHandle,
1877  SQLUSMALLINT ParameterNumber,
1878  SQLSMALLINT InputOutputType,
1879  SQLSMALLINT ValueType,
1880  SQLSMALLINT ParameterType,
1881  SQLULEN ColumnSize,
1882  SQLSMALLINT DecimalDigits,
1883  SQLPOINTER ParameterValuePtr,
1884  SQLLEN BufferLength,
1885  SQLLEN *StrLen_or_IndPtr);
1886 
1893 RDBC_EXPORT SQLRETURN SQL_API SQLBulkOperations (
1894  SQLHSTMT StatementHandle,
1895  SQLSMALLINT Operation);
1896 
1904  SQLHSTMT hstmt,
1905  SQLCHAR *szCatalogName,
1906  SQLSMALLINT cbCatalogName,
1907  SQLCHAR *szSchemaName,
1908  SQLSMALLINT cbSchemaName,
1909  SQLCHAR *szTableName,
1910  SQLSMALLINT cbTableName,
1911  SQLCHAR *szColumnName,
1912  SQLSMALLINT cbColumnName);
1913 
1917 RDBC_EXPORT SQLRETURN SQL_API SQLDescribeParam (
1918  SQLHSTMT StatementHandle,
1919  SQLUSMALLINT ParameterNumber,
1920  SQLSMALLINT *DataTypePtr,
1921  SQLULEN *ParameterSizePtr,
1922  SQLSMALLINT *DecimalDigitsPtr,
1923  SQLSMALLINT *NullablePtr);
1924 
1928 RDBC_EXPORT SQLRETURN SQL_API SQLForeignKeys (
1929  SQLHSTMT StatementHandle,
1930  SQLCHAR *PKCatalogName,
1931  SQLSMALLINT NameLength1,
1932  SQLCHAR *PKSchemaName,
1933  SQLSMALLINT NameLength2,
1934  SQLCHAR *PKTableName,
1935  SQLSMALLINT NameLength3,
1936  SQLCHAR *FKCatalogName,
1937  SQLSMALLINT NameLength4,
1938  SQLCHAR *FKSchemaName,
1939  SQLSMALLINT NameLength5,
1940  SQLCHAR *FKTableName,
1941  SQLSMALLINT NameLength6);
1942 
1946 RDBC_EXPORT SQLRETURN SQL_API SQLMoreResults (
1947  SQLHSTMT StatementHandle);
1948 
1952 RDBC_EXPORT SQLRETURN SQL_API SQLNativeSql (
1953  SQLHDBC ConnectionHandle,
1954  const SQLCHAR *InStatementText,
1955  SQLINTEGER TextLength1,
1956  SQLCHAR *OutStatementText,
1957  SQLINTEGER BufferLength,
1958  SQLINTEGER *TextLength2Ptr);
1959 
1963 RDBC_EXPORT SQLRETURN SQL_API SQLNumParams (
1964  SQLHSTMT StatementHandle,
1965  SQLSMALLINT *ParameterCountPtr);
1966 
1970 RDBC_EXPORT SQLRETURN SQL_API SQLPrimaryKeys (
1971  SQLHSTMT StatementHandle,
1972  SQLCHAR *CatalogName,
1973  SQLSMALLINT NameLength1,
1974  SQLCHAR *SchemaName,
1975  SQLSMALLINT NameLength2,
1976  SQLCHAR *TableName,
1977  SQLSMALLINT NameLength3);
1978 
1979 
1984  SQLHSTMT StatementHandle,
1985  SQLCHAR *CatalogName,
1986  SQLSMALLINT NameLength1,
1987  SQLCHAR *SchemaName,
1988  SQLSMALLINT NameLength2,
1989  SQLCHAR *ProcName,
1990  SQLSMALLINT NameLength3,
1991  SQLCHAR *ColumnName,
1992  SQLSMALLINT NameLength4);
1993 
1997 RDBC_EXPORT SQLRETURN SQL_API SQLProcedures (
1998  SQLHSTMT StatementHandle,
1999  SQLCHAR *CatalogName,
2000  SQLSMALLINT NameLength1,
2001  SQLCHAR *SchemaName,
2002  SQLSMALLINT NameLength2,
2003  SQLCHAR *ProcName,
2004  SQLSMALLINT NameLength3);
2005 
2012 RDBC_EXPORT SQLRETURN SQL_API SQLSetPos (
2013  SQLHSTMT StatementHandle,
2014  SQLSETPOSIROW RowNumber,
2015  SQLUSMALLINT Operation,
2016  SQLUSMALLINT LockType);
2017 
2024 RDBC_EXPORT SQLRETURN SQL_API SQLTablePrivileges (
2025  SQLHSTMT hstmt,
2026  SQLCHAR *szCatalogName,
2027  SQLSMALLINT cbCatalogName,
2028  SQLCHAR *szSchemaName,
2029  SQLSMALLINT cbSchemaName,
2030  SQLCHAR *szTableName,
2031  SQLSMALLINT cbTableName);
2032 
2033 #if 0
2034 /* ------------------------------------------------------------------------
2035  Unicode defines below are stored in "sqlucode.h" in Microsoft ODBC
2036 */
2037 #define SQL_WCHAR (-8)
2038 #define SQL_WVARCHAR (-9)
2039 #define SQL_WLONGVARCHAR (-10)
2040 #define SQL_C_WCHAR SQL_WCHAR
2041 
2042 #if defined(_UNICODE)
2043 #define SQL_C_TCHAR SQL_C_WCHAR
2044 #else
2045 #define SQL_C_TCHAR SQL_C_CHAR
2046 #endif
2047 
2048 #define SQL_SQLSTATE_SIZEW 10 /* size of SQLSTATE for unicode */
2049 
2050 /* ----------------------------------------------------------------------------
2051  Unicode versions of the API
2052 */
2053 #if defined(RDM_WINDOWS) && defined(RDM_ODBC_DRV)
2054  #if defined(RDM_32BIT)
2055  #pragma comment(linker, "/export:[email protected]")
2056  #pragma comment(linker, "/export:[email protected]")
2057  #pragma comment(linker, "/export:[email protected]")
2058  #pragma comment(linker, "/export:[email protected]")
2059  #pragma comment(linker, "/export:[email protected]")
2060  #pragma comment(linker, "/export:[email protected]")
2061  #pragma comment(linker, "/export:[email protected]")
2062  #pragma comment(linker, "/export:[email protected]")
2063  #pragma comment(linker, "/export:[email protected]")
2064  #pragma comment(linker, "/export:[email protected]")
2065  #pragma comment(linker, "/export:[email protected]")
2066  #pragma comment(linker, "/export:[email protected]")
2067  #pragma comment(linker, "/export:[email protected]")
2068  #pragma comment(linker, "/export:[email protected]")
2069  #pragma comment(linker, "/export:[email protected]")
2070  #pragma comment(linker, "/export:[email protected]")
2071  #pragma comment(linker, "/export:[email protected]")
2072  #pragma comment(linker, "/export:[email protected]")
2073  #pragma comment(linker, "/export:[email protected]")
2074  #pragma comment(linker, "/export:[email protected]")
2075  #pragma comment(linker, "/export:[email protected]")
2076  #pragma comment(linker, "/export:[email protected]")
2077  #pragma comment(linker, "/export:[email protected]")
2078  #pragma comment(linker, "/export:[email protected]")
2079  #pragma comment(linker, "/export:[email protected]")
2080  #pragma comment(linker, "/export:[email protected]")
2081  #pragma comment(linker, "/export:[email protected]")
2082  #pragma comment(linker, "/export:[email protected]")
2083  #pragma comment(linker, "/export:[email protected]")
2084  #pragma comment(linker, "/export:[email protected]")
2085  #else
2086  #pragma comment(linker, "/export:SQLColAttributeW")
2087  #pragma comment(linker, "/export:SQLColumnPrivilegesW")
2088  #pragma comment(linker, "/export:SQLColumnsW")
2089  #pragma comment(linker, "/export:SQLConnectW")
2090  #pragma comment(linker, "/export:SQLDescribeColW")
2091  #pragma comment(linker, "/export:SQLDriverConnectW")
2092  #pragma comment(linker, "/export:SQLExecDirectW")
2093  #pragma comment(linker, "/export:SQLForeignKeysW")
2094  #pragma comment(linker, "/export:SQLGetConnectAttrW")
2095  #pragma comment(linker, "/export:SQLGetCursorNameW")
2096  #pragma comment(linker, "/export:SQLGetDescFieldW")
2097  #pragma comment(linker, "/export:SQLGetDescRecW")
2098  #pragma comment(linker, "/export:SQLGetDiagFieldW")
2099  #pragma comment(linker, "/export:SQLGetDiagRecW")
2100  #pragma comment(linker, "/export:SQLGetInfoW")
2101  #pragma comment(linker, "/export:SQLGetStmtAttrW")
2102  #pragma comment(linker, "/export:SQLGetTypeInfoW")
2103  #pragma comment(linker, "/export:SQLNativeSqlW")
2104  #pragma comment(linker, "/export:SQLPrepareW")
2105  #pragma comment(linker, "/export:SQLPrimaryKeysW")
2106  #pragma comment(linker, "/export:SQLProcedureColumnsW")
2107  #pragma comment(linker, "/export:SQLProceduresW")
2108  #pragma comment(linker, "/export:SQLSetConnectAttrW")
2109  #pragma comment(linker, "/export:SQLSetCursorNameW")
2110  #pragma comment(linker, "/export:SQLSetDescFieldW")
2111  #pragma comment(linker, "/export:SQLSetStmtAttrW")
2112  #pragma comment(linker, "/export:SQLSpecialColumnsW")
2113  #pragma comment(linker, "/export:SQLStatisticsW")
2114  #pragma comment(linker, "/export:SQLTablePrivilegesW")
2115  #pragma comment(linker, "/export:SQLTablesW")
2116  #endif
2117 #endif
2118 
2119 RDBC_EXPORT SQLRETURN SQL_API SQLColAttributeW(
2120  SQLHSTMT hstmt,
2121  SQLUSMALLINT iCol,
2122  SQLUSMALLINT iField,
2123  SQLPOINTER pCharAttr,
2124  SQLSMALLINT cbCharAttrMax,
2125  SQLSMALLINT *pcbCharAttr,
2126  SQLLEN *pNumAttr);
2127 
2129  SQLHSTMT hstmt,
2130  SQLWCHAR *szCatalogName,
2131  SQLSMALLINT cbCatalogName,
2132  SQLWCHAR *szSchemaName,
2133  SQLSMALLINT cbSchemaName,
2134  SQLWCHAR *szTableName,
2135  SQLSMALLINT cbTableName,
2136  SQLWCHAR *szColumnName,
2137  SQLSMALLINT cbColumnName);
2138 
2139 RDBC_EXPORT SQLRETURN SQL_API SQLColumnsW(
2140  SQLHSTMT hstmt,
2141  SQLWCHAR *szCatalogName,
2142  SQLSMALLINT cbCatalogName,
2143  SQLWCHAR *szSchemaName,
2144  SQLSMALLINT cbSchemaName,
2145  SQLWCHAR *szTableName,
2146  SQLSMALLINT cbTableName,
2147  SQLWCHAR *szColumnName,
2148  SQLSMALLINT cbColumnName);
2149 
2150 RDBC_EXPORT SQLRETURN SQL_API SQLConnectW(
2151  SQLHDBC hdbc,
2152  const SQLWCHAR *szDSN,
2153  SQLSMALLINT cbDSN,
2154  const SQLWCHAR *szUID,
2155  SQLSMALLINT cbUID,
2156  const SQLWCHAR *szAuthStr,
2157  SQLSMALLINT cbAuthStr);
2158 
2159 RDBC_EXPORT SQLRETURN SQL_API SQLDescribeColW(
2160  SQLHSTMT hstmt,
2161  SQLUSMALLINT icol,
2162  SQLWCHAR *szColName,
2163  SQLSMALLINT cbColNameMax,
2164  SQLSMALLINT *pcbColName,
2165  SQLSMALLINT *pfSqlType,
2166  SQLULEN *pcbColDef,
2167  SQLSMALLINT *pibScale,
2168  SQLSMALLINT *pfNullable);
2169 
2170 RDBC_EXPORT SQLRETURN SQL_API SQLDriverConnectW(
2171  SQLHDBC ConnectionHandle,
2172  SQLHWND WindowHandle,
2173  const SQLWCHAR *InConnectionString,
2174  SQLSMALLINT StringLength1,
2175  SQLWCHAR *OutConnectionString,
2176  SQLSMALLINT BufferLength,
2177  SQLSMALLINT *StringLength2Ptr,
2178  SQLUSMALLINT DriverCompletion);
2179 
2180 RDBC_EXPORT SQLRETURN SQL_API SQLExecDirectW(
2181  SQLHSTMT hstmt,
2182  const SQLWCHAR *szSqlStr,
2183  SQLINTEGER cbSqlStr);
2184 
2185 RDBC_EXPORT SQLRETURN SQL_API SQLForeignKeysW(
2186  SQLHSTMT hstmt,
2187  SQLWCHAR *szPkCatalogName,
2188  SQLSMALLINT cbPkCatalogName,
2189  SQLWCHAR *szPkSchemaName,
2190  SQLSMALLINT cbPkSchemaName,
2191  SQLWCHAR *szPkTableName,
2192  SQLSMALLINT cbPkTableName,
2193  SQLWCHAR *szFkCatalogName,
2194  SQLSMALLINT cbFkCatalogName,
2195  SQLWCHAR *szFkSchemaName,
2196  SQLSMALLINT cbFkSchemaName,
2197  SQLWCHAR *szFkTableName,
2198  SQLSMALLINT cbFkTableName);
2199 
2201  SQLHDBC hdbc,
2202  SQLINTEGER fAttribute,
2203  SQLPOINTER rgbValue,
2204  SQLINTEGER cbValueMax,
2205  SQLINTEGER *pcbValue);
2206 
2207 RDBC_EXPORT SQLRETURN SQL_API SQLGetCursorNameW(
2208  SQLHSTMT hstmt,
2209  SQLWCHAR *szCursor,
2210  SQLSMALLINT cbCursorMax,
2211  SQLSMALLINT *pcbCursor);
2212 
2213 RDBC_EXPORT SQLRETURN SQL_API SQLGetDescFieldW(
2214  SQLHDESC hdesc,
2215  SQLSMALLINT iRecord,
2216  SQLSMALLINT iField,
2217  SQLPOINTER rgbValue,
2218  SQLINTEGER cbValueMax,
2219  SQLINTEGER *pcbValue);
2220 
2221 RDBC_EXPORT SQLRETURN SQL_API SQLGetDescRecW(
2222  SQLHDESC hdesc,
2223  SQLSMALLINT iRecord,
2224  SQLWCHAR *szName,
2225  SQLSMALLINT cbNameMax,
2226  SQLSMALLINT *pcbName,
2227  SQLSMALLINT *pfType,
2228  SQLSMALLINT *pfSubType,
2229  SQLLEN *pLength,
2230  SQLSMALLINT *pPrecision,
2231  SQLSMALLINT *pScale,
2232  SQLSMALLINT *pNullable);
2233 
2234 RDBC_EXPORT SQLRETURN SQL_API SQLGetDiagFieldW(
2235  SQLSMALLINT fHandleType,
2236  SQLHANDLE handle,
2237  SQLSMALLINT iRecord,
2238  SQLSMALLINT fDiagField,
2239  SQLPOINTER rgbDiagInfo,
2240  SQLSMALLINT cbDiagInfoMax,
2241  SQLSMALLINT *pcbDiagInfo);
2242 
2243 RDBC_EXPORT SQLRETURN SQL_API SQLGetDiagRecW(
2244  SQLSMALLINT fHandleType,
2245  SQLHANDLE handle,
2246  SQLSMALLINT iRecord,
2247  SQLWCHAR *szSqlState,
2248  SQLINTEGER *pfNativeError,
2249  SQLWCHAR *szErrorMsg,
2250  SQLSMALLINT cbErrorMsgMax,
2251  SQLSMALLINT *pcbErrorMsg);
2252 
2253 RDBC_EXPORT SQLRETURN SQL_API SQLGetInfoW(
2254  SQLHDBC hdbc,
2255  SQLUSMALLINT fInfoType,
2256  SQLPOINTER rgbInfoValue,
2257  SQLSMALLINT cbInfoValueMax,
2258  SQLSMALLINT *pcbInfoValue);
2259 
2260 RDBC_EXPORT SQLRETURN SQL_API SQLGetStmtAttrW(
2261  SQLHSTMT hstmt,
2262  SQLINTEGER fAttribute,
2263  SQLPOINTER rgbValue,
2264  SQLINTEGER cbValueMax,
2265  SQLINTEGER *pcbValue);
2266 
2267 RDBC_EXPORT SQLRETURN SQL_API SQLGetTypeInfoW(
2268  SQLHSTMT hstmt,
2269  SQLSMALLINT fDataType);
2270 
2271 RDBC_EXPORT SQLRETURN SQL_API SQLNativeSqlW(
2272  SQLHDBC hdbc,
2273  const SQLWCHAR *szSqlStrIn,
2274  SQLINTEGER cbSqlStrIn,
2275  SQLWCHAR *szSqlStr,
2276  SQLINTEGER cbSqlStrMax,
2277  SQLINTEGER *pcbSqlStr);
2278 
2279 RDBC_EXPORT SQLRETURN SQL_API SQLPrepareW(
2280  SQLHSTMT hstmt,
2281  const SQLWCHAR *szSqlStr,
2282  SQLINTEGER cbSqlStr);
2283 
2284 RDBC_EXPORT SQLRETURN SQL_API SQLPrimaryKeysW(
2285  SQLHSTMT hstmt,
2286  SQLWCHAR *szCatalogName,
2287  SQLSMALLINT cbCatalogName,
2288  SQLWCHAR *szSchemaName,
2289  SQLSMALLINT cbSchemaName,
2290  SQLWCHAR *szTableName,
2291  SQLSMALLINT cbTableName);
2292 
2294  SQLHSTMT hstmt,
2295  SQLWCHAR *szCatalogName,
2296  SQLSMALLINT cbCatalogName,
2297  SQLWCHAR *szSchemaName,
2298  SQLSMALLINT cbSchemaName,
2299  SQLWCHAR *szProcName,
2300  SQLSMALLINT cbProcName,
2301  SQLWCHAR *szColumnName,
2302  SQLSMALLINT cbColumnName);
2303 
2304 RDBC_EXPORT SQLRETURN SQL_API SQLProceduresW(
2305  SQLHSTMT hstmt,
2306  SQLWCHAR *szCatalogName,
2307  SQLSMALLINT cbCatalogName,
2308  SQLWCHAR *szSchemaName,
2309  SQLSMALLINT cbSchemaName,
2310  SQLWCHAR *szProcName,
2311  SQLSMALLINT cbProcName);
2312 
2314  SQLHDBC hdbc,
2315  SQLINTEGER fAttribute,
2316  SQLPOINTER rgbValue,
2317  SQLINTEGER cbValue);
2318 
2319 RDBC_EXPORT SQLRETURN SQL_API SQLSetCursorNameW(
2320  SQLHSTMT hstmt,
2321  const SQLWCHAR *szCursor,
2322  SQLSMALLINT cbCursor);
2323 
2324 RDBC_EXPORT SQLRETURN SQL_API SQLSetDescFieldW(
2325  SQLHDESC hdesc,
2326  SQLSMALLINT iRecord,
2327  SQLSMALLINT iField,
2328  SQLPOINTER rgbValue,
2329  SQLINTEGER cbvalueMax);
2330 
2331 RDBC_EXPORT SQLRETURN SQL_API SQLSetStmtAttrW(
2332  SQLHSTMT hstmt,
2333  SQLINTEGER fAttribute,
2334  SQLPOINTER rgbValue,
2335  SQLINTEGER cbValueMax);
2336 
2338  SQLHSTMT hstmt,
2339  SQLUSMALLINT fColType,
2340  SQLWCHAR *szCatalogName,
2341  SQLSMALLINT cbCatalogName,
2342  SQLWCHAR *szSchemaName,
2343  SQLSMALLINT cbSchemaName,
2344  SQLWCHAR *szTableName,
2345  SQLSMALLINT cbTableName,
2346  SQLUSMALLINT fScope,
2347  SQLUSMALLINT fNullable);
2348 
2349 RDBC_EXPORT SQLRETURN SQL_API SQLStatisticsW(
2350  SQLHSTMT hstmt,
2351  SQLWCHAR *szCatalogName,
2352  SQLSMALLINT cbCatalogName,
2353  SQLWCHAR *szSchemaName,
2354  SQLSMALLINT cbSchemaName,
2355  SQLWCHAR *szTableName,
2356  SQLSMALLINT cbTableName,
2357  SQLUSMALLINT fUnique,
2358  SQLUSMALLINT fAccuracy);
2359 
2361  SQLHSTMT hstmt,
2362  SQLWCHAR *szCatalogName,
2363  SQLSMALLINT cbCatalogName,
2364  SQLWCHAR *szSchemaName,
2365  SQLSMALLINT cbSchemaName,
2366  SQLWCHAR *szTableName,
2367  SQLSMALLINT cbTableName);
2368 
2369 RDBC_EXPORT SQLRETURN SQL_API SQLTablesW(
2370  SQLHSTMT hstmt,
2371  SQLWCHAR *szCatalogName,
2372  SQLSMALLINT cbCatalogName,
2373  SQLWCHAR *szSchemaName,
2374  SQLSMALLINT cbSchemaName,
2375  SQLWCHAR *szTableName,
2376  SQLSMALLINT cbTableName,
2377  SQLWCHAR *szTableType,
2378  SQLSMALLINT cbTableType);
2379 
2380 #endif
2381 
2382 #if !defined(RDM_DOXYGEN)
2383 #define SQLColAttributeA SQLColAttribute
2384 #define SQLColumnPrivilegesA SQLColumnPrivileges
2385 #define SQLColumnsA SQLColumns
2386 #define SQLConnectA SQLConnect
2387 #define SQLDescribeColA SQLDescribeCol
2388 #define SQLDriverConnectA SQLDriverConnect
2389 #define SQLExecDirectA SQLExecDirect
2390 #define SQLForeignKeysA SQLForeignKeys
2391 #define SQLGetConnectAttrA SQLGetConnectAttr
2392 #define SQLGetCursorNameA SQLGetCursorName
2393 #define SQLGetDescFieldA SQLGetDescField
2394 #define SQLGetDescRecA SQLGetDescRec
2395 #define SQLGetDiagFieldA SQLGetDiagField
2396 #define SQLGetDiagRecA SQLGetDiagRec
2397 #define SQLGetInfoA SQLGetInfo
2398 #define SQLGetStmtAttrA SQLGetStmtAttr
2399 #define SQLGetTypeInfoA SQLGetTypeInfo
2400 #define SQLNativeSqlA SQLNativeSql
2401 #define SQLPrepareA SQLPrepare
2402 #define SQLPrimaryKeysA SQLPrimaryKeys
2403 #define SQLProcedureColumnsA SQLProcedureColumns
2404 #define SQLProceduresA SQLProcedures
2405 #define SQLSetConnectAttrA SQLSetConnectAttr
2406 #define SQLSetCursorNameA SQLSetCursorName
2407 #define SQLSetDescFieldA SQLSetDescField
2408 #define SQLSetStmtAttrA SQLSetStmtAttr
2409 #define SQLSpecialColumnsA SQLSpecialColumns
2410 #define SQLStatisticsA SQLStatistics
2411 #define SQLTablePrivilegesA SQLTablePrivileges
2412 #define SQLTablesA SQLTables
2413 
2414 #include "sqlucode.h"
2415 #endif
2416 
2417 #endif /* SQLEXT_H_INCLUDED_ */
2418 
HWND SQLHWND
Definition: sqltypes.h:106
RDBC_EXPORT SQLRETURN SQLGetDiagRecW(SQLSMALLINT fHandleType, SQLHANDLE handle, SQLSMALLINT iRecord, SQLWCHAR *szSqlState, SQLINTEGER *pfNativeError, SQLWCHAR *szErrorMsg, SQLSMALLINT cbErrorMsgMax, SQLSMALLINT *pcbErrorMsg)
int32_t SQLINTEGER
Definition: sqltypes.h:50
RDBC_EXPORT SQLRETURN SQLStatisticsW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fUnique, SQLUSMALLINT fAccuracy)
RDBC_EXPORT SQLRETURN SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandle, const SQLWCHAR *InConnectionString, SQLSMALLINT StringLength1, SQLWCHAR *OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength2Ptr, SQLUSMALLINT DriverCompletion)
RDBC_EXPORT SQLRETURN SQLGetStmtAttrW(SQLHSTMT hstmt, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue)
RDBC_EXPORT SQLRETURN SQLSetCursorNameW(SQLHSTMT hstmt, const SQLWCHAR *szCursor, SQLSMALLINT cbCursor)
RDBC_EXPORT SQLRETURN SQLGetDescFieldW(SQLHDESC hdesc, SQLSMALLINT iRecord, SQLSMALLINT iField, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue)
RDBC_EXPORT SQLRETURN SQLGetTypeInfoW(SQLHSTMT hstmt, SQLSMALLINT fDataType)
Header for Unicode specific definition in ODBC.
RDBC_EXPORT SQLRETURN SQLConnectW(SQLHDBC hdbc, const SQLWCHAR *szDSN, SQLSMALLINT cbDSN, const SQLWCHAR *szUID, SQLSMALLINT cbUID, const SQLWCHAR *szAuthStr, SQLSMALLINT cbAuthStr)
RDBC_EXPORT SQLRETURN SQLTablePrivileges(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName)
Return a list of table privileges for the data source.
RDBC_EXPORT SQLRETURN SQLMoreResults(SQLHSTMT StatementHandle)
Check whether more results are avaiable for an SQL statement.
RDBC_EXPORT SQLRETURN SQLColAttributeW(SQLHSTMT hstmt, SQLUSMALLINT iCol, SQLUSMALLINT iField, SQLPOINTER pCharAttr, SQLSMALLINT cbCharAttrMax, SQLSMALLINT *pcbCharAttr, SQLINTEGER *pNumAttr)
Unicode versions of the API.
RDBC_EXPORT SQLRETURN SQLNumParams(SQLHSTMT StatementHandle, SQLSMALLINT *ParameterCountPtr)
Return the number of parameters in an SQL statement.
RDBC_EXPORT SQLRETURN SQLGetConnectAttrW(SQLHDBC hdbc, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue)
RDBC_EXPORT SQLRETURN SQLTablesW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName, SQLWCHAR *szTableType, SQLSMALLINT cbTableType)
RDBC_EXPORT SQLRETURN SQLDescribeColW(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLWCHAR *szColName, SQLSMALLINT cbColNameMax, SQLSMALLINT *pcbColName, SQLSMALLINT *pfSqlType, SQLUINTEGER *pcbColDef, SQLSMALLINT *pibScale, SQLSMALLINT *pfNullable)
RDBC_EXPORT SQLRETURN SQLGetDescRecW(SQLHDESC hdesc, SQLSMALLINT iRecord, SQLWCHAR *szName, SQLSMALLINT cbNameMax, SQLSMALLINT *pcbName, SQLSMALLINT *pfType, SQLSMALLINT *pfSubType, SQLINTEGER *pLength, SQLSMALLINT *pPrecision, SQLSMALLINT *pScale, SQLSMALLINT *pNullable)
RDBC_EXPORT SQLRETURN SQLDescribeParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT *DataTypePtr, SQLUINTEGER *ParameterSizePtr, SQLSMALLINT *DecimalDigitsPtr, SQLSMALLINT *NullablePtr)
Retrieve the detailed description of a parameter.
RDBC_EXPORT SQLRETURN SQLNativeSql(SQLHDBC ConnectionHandle, const SQLCHAR *InStatementText, SQLINTEGER TextLength1, SQLCHAR *OutStatementText, SQLINTEGER BufferLength, SQLINTEGER *TextLength2Ptr)
Return an SQL statement as modified by the SQL API driver.
wchar_t SQLWCHAR
Definition: sqltypes.h:72
RDBC_EXPORT SQLRETURN SQLPrimaryKeys(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3)
Return a list of primary keys in a table.
RDBC_EXPORT SQLRETURN SQLColumnPrivileges(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, SQLSMALLINT cbTableName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName)
Return a list of column privileges for a table.
RDBC_EXPORT SQLRETURN SQLGetDiagFieldW(SQLSMALLINT fHandleType, SQLHANDLE handle, SQLSMALLINT iRecord, SQLSMALLINT fDiagField, SQLPOINTER rgbDiagInfo, SQLSMALLINT cbDiagInfoMax, SQLSMALLINT *pcbDiagInfo)
RDBC_EXPORT SQLRETURN SQLNativeSqlW(SQLHDBC hdbc, const SQLWCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLWCHAR *szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr)
int16_t SQLRETURN
SQL API Return Codes.
Definition: sqltypes.h:71
RDBC_EXPORT SQLRETURN SQLSetStmtAttrW(SQLHSTMT hstmt, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValueMax)
uint8_t SQLCHAR
Definition: sqltypes.h:47
RDBC_EXPORT SQLRETURN SQLProceduresW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szProcName, SQLSMALLINT cbProcName)
const void * SQLHANDLE
Definition: sqltypes.h:93
RDBC_EXPORT SQLRETURN SQLBulkOperations(SQLHSTMT StatementHandle, SQLSMALLINT Operation)
Perform bulk update opertations.
Header for the Microsoft ODBC Core API.
RDBC_EXPORT SQLRETURN SQLProcedures(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *ProcName, SQLSMALLINT NameLength3)
Return the list of stored routine names registered with the data source.
void * SQLPOINTER
Definition: sqltypes.h:59
uint16_t SQLUSMALLINT
Definition: sqltypes.h:49
RDBC_EXPORT SQLRETURN SQLForeignKeys(SQLHSTMT StatementHandle, SQLCHAR *PKCatalogName, SQLSMALLINT NameLength1, SQLCHAR *PKSchemaName, SQLSMALLINT NameLength2, SQLCHAR *PKTableName, SQLSMALLINT NameLength3, SQLCHAR *FKCatalogName, SQLSMALLINT NameLength4, SQLCHAR *FKSchemaName, SQLSMALLINT NameLength5, SQLCHAR *FKTableName, SQLSMALLINT NameLength6)
Return a list of foreign keys in a table.
#define SQLULEN
Definition: sqltypes.h:87
RDBC_EXPORT SQLRETURN SQLProcedureColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *ProcName, SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4)
Return a list of parameters and columns for stored routines.
RDBC_EXPORT SQLRETURN SQLGetCursorNameW(SQLHSTMT hstmt, SQLWCHAR *szCursor, SQLSMALLINT cbCursorMax, SQLSMALLINT *pcbCursor)
RDBC_EXPORT SQLRETURN SQLColumnsW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName, SQLWCHAR *szColumnName, SQLSMALLINT cbColumnName)
RDBC_EXPORT SQLRETURN SQLSetDescFieldW(SQLHDESC hdesc, SQLSMALLINT iRecord, SQLSMALLINT iField, SQLPOINTER rgbValue, SQLINTEGER cbvalueMax)
RDBC_EXPORT SQLRETURN SQLExecDirectW(SQLHSTMT hstmt, const SQLWCHAR *szSqlStr, SQLINTEGER cbSqlStr)
RDBC_EXPORT SQLRETURN SQLSetPos(SQLHSTMT StatementHandle, SQLUSMALLINT RowNumber, SQLUSMALLINT Operation, SQLUSMALLINT LockType)
Set the cursor position in a result set.
RDBC_EXPORT SQLRETURN SQLForeignKeysW(SQLHSTMT hstmt, SQLWCHAR *szPkCatalogName, SQLSMALLINT cbPkCatalogName, SQLWCHAR *szPkSchemaName, SQLSMALLINT cbPkSchemaName, SQLWCHAR *szPkTableName, SQLSMALLINT cbPkTableName, SQLWCHAR *szFkCatalogName, SQLSMALLINT cbFkCatalogName, SQLWCHAR *szFkSchemaName, SQLSMALLINT cbFkSchemaName, SQLWCHAR *szFkTableName, SQLSMALLINT cbFkTableName)
RDBC_EXPORT SQLRETURN SQLSpecialColumnsW(SQLHSTMT hstmt, SQLUSMALLINT fColType, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName, SQLUSMALLINT fScope, SQLUSMALLINT fNullable)
RDBC_EXPORT SQLRETURN SQLSetConnectAttrW(SQLHDBC hdbc, SQLINTEGER fAttribute, SQLPOINTER rgbValue, SQLINTEGER cbValue)
RDBC_EXPORT SQLRETURN SQLPrimaryKeysW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName)
RDBC_EXPORT SQLRETURN SQLColumnPrivilegesW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName, SQLWCHAR *szColumnName, SQLSMALLINT cbColumnName)
#define SQLSETPOSIROW
Definition: sqltypes.h:88
RDBC_EXPORT SQLRETURN SQLTablePrivilegesW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, SQLSMALLINT cbTableName)
RDBC_EXPORT SQLRETURN SQLDriverConnect(SQLHDBC ConnectionHandle, SQLHWND WindowHandle, const SQLCHAR *InConnectionString, SQLSMALLINT StringLength1, SQLCHAR *OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength2Ptr, SQLUSMALLINT DriverCompletion)
RDBC_EXPORT SQLRETURN SQLBindParameter(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT InputOutputType, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLUINTEGER ColumnSize, SQLSMALLINT DecimalDigits, SQLPOINTER ParameterValuePtr, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_IndPtr)
Bind an application variable to the parameter.
RDBC_EXPORT SQLRETURN SQLPrepareW(SQLHSTMT hstmt, const SQLWCHAR *szSqlStr, SQLINTEGER cbSqlStr)
#define SQLLEN
Definition: sqltypes.h:86
RDBC_EXPORT SQLRETURN SQLGetInfoW(SQLHDBC hdbc, SQLUSMALLINT fInfoType, SQLPOINTER rgbInfoValue, SQLSMALLINT cbInfoValueMax, SQLSMALLINT *pcbInfoValue)
#define SQL_API
Definition: sqltypes.h:38
RDBC_EXPORT SQLRETURN SQLProcedureColumnsW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szProcName, SQLSMALLINT cbProcName, SQLWCHAR *szColumnName, SQLSMALLINT cbColumnName)
int16_t SQLSMALLINT
Definition: sqltypes.h:48