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