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