Avoid potential negative array index access to cached text.
[LibreOffice.git] / external / iODBC / inc / odbc / sqlext.h
blob035e03bc8f7f1ba1346eef06a26f7cb9db5d7d43
1 /*
2 * sqlext.h
4 * $Id$
6 * ODBC defines (ext)
8 * The iODBC driver manager.
10 * Copyright (C) 1995 Ke Jin <kejin@empress.com>
11 * Copyright (C) 1996-2021 OpenLink Software <iodbc@openlinksw.com>
12 * All Rights Reserved.
14 * This software is released under the terms of either of the following
15 * licenses:
17 * - GNU Library General Public License (see LICENSE.LGPL)
18 * - The BSD License (see LICENSE.BSD).
20 * Note that the only valid version of the LGPL license as far as this
21 * project is concerned is the original GNU Library General Public License
22 * Version 2, dated June 1991.
24 * While not mandated by the BSD license, any patches you make to the
25 * iODBC source code may be contributed back into the iODBC project
26 * at your discretion. Contributions will benefit the Open Source and
27 * Data Access community as a whole. Submissions may be made at:
29 * http://www.iodbc.org
32 * GNU Library Generic Public License Version 2
33 * ============================================
34 * This library is free software; you can redistribute it and/or
35 * modify it under the terms of the GNU Library General Public
36 * License as published by the Free Software Foundation; only
37 * Version 2 of the License dated June 1991.
39 * This library is distributed in the hope that it will be useful,
40 * but WITHOUT ANY WARRANTY; without even the implied warranty of
41 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
42 * Library General Public License for more details.
44 * You should have received a copy of the GNU Library General Public
45 * License along with this library; if not, write to the Free
46 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
49 * The BSD License
50 * ===============
51 * Redistribution and use in source and binary forms, with or without
52 * modification, are permitted provided that the following conditions
53 * are met:
55 * 1. Redistributions of source code must retain the above copyright
56 * notice, this list of conditions and the following disclaimer.
57 * 2. Redistributions in binary form must reproduce the above copyright
58 * notice, this list of conditions and the following disclaimer in
59 * the documentation and/or other materials provided with the
60 * distribution.
61 * 3. Neither the name of OpenLink Software Inc. nor the names of its
62 * contributors may be used to endorse or promote products derived
63 * from this software without specific prior written permission.
65 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
66 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
67 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
68 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR
69 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
70 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
71 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
72 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
73 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
74 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
75 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
78 #ifndef _SQLEXT_H
79 #define _SQLEXT_H
81 #ifndef _SQL_H
82 #include "sql.h"
83 #endif
85 #ifdef __cplusplus
86 extern "C" {
87 #endif
91 * Useful Constants
93 #define SQL_SPEC_MAJOR 3
94 #define SQL_SPEC_MINOR 52
95 #define SQL_SPEC_STRING "03.52"
97 #define SQL_SQLSTATE_SIZE 5
98 #define SQL_MAX_DSN_LENGTH 32
99 #define SQL_MAX_OPTION_STRING_LENGTH 256
103 * Handle types
105 #if (ODBCVER >= 0x0300)
106 #define SQL_HANDLE_SENV 5
107 #endif /* ODBCVER >= 0x0300 */
111 * Function return codes
113 #if (ODBCVER < 0x0300)
114 #define SQL_NO_DATA_FOUND 100
115 #else
116 #define SQL_NO_DATA_FOUND SQL_NO_DATA
117 #endif /* ODBCVER < 0x0300 */
121 * Special length values for attributes
123 #if (ODBCVER >= 0x0300)
124 #define SQL_IS_POINTER (-4)
125 #define SQL_IS_UINTEGER (-5)
126 #define SQL_IS_INTEGER (-6)
127 #define SQL_IS_USMALLINT (-7)
128 #define SQL_IS_SMALLINT (-8)
129 #endif /* ODBCVER >= 0x0300 */
133 * SQL extended datatypes
135 #define SQL_DATE 9
136 #if (ODBCVER >= 0x0300)
137 #define SQL_INTERVAL 10
138 #endif /* ODBCVER >= 0x0300 */
139 #define SQL_TIME 10
140 #define SQL_TIMESTAMP 11
141 #define SQL_LONGVARCHAR (-1)
142 #define SQL_BINARY (-2)
143 #define SQL_VARBINARY (-3)
144 #define SQL_LONGVARBINARY (-4)
145 #define SQL_BIGINT (-5)
146 #define SQL_TINYINT (-6)
147 #define SQL_BIT (-7)
148 #if (ODBCVER >= 0x0350)
149 #define SQL_GUID (-11)
150 #endif /* ODBCVER >= 0x0350 */
154 * SQL Interval datatypes
156 #if (ODBCVER >= 0x0300)
157 #define SQL_CODE_YEAR 1
158 #define SQL_CODE_MONTH 2
159 #define SQL_CODE_DAY 3
160 #define SQL_CODE_HOUR 4
161 #define SQL_CODE_MINUTE 5
162 #define SQL_CODE_SECOND 6
163 #define SQL_CODE_YEAR_TO_MONTH 7
164 #define SQL_CODE_DAY_TO_HOUR 8
165 #define SQL_CODE_DAY_TO_MINUTE 9
166 #define SQL_CODE_DAY_TO_SECOND 10
167 #define SQL_CODE_HOUR_TO_MINUTE 11
168 #define SQL_CODE_HOUR_TO_SECOND 12
169 #define SQL_CODE_MINUTE_TO_SECOND 13
171 #define SQL_INTERVAL_YEAR (100 + SQL_CODE_YEAR)
172 #define SQL_INTERVAL_MONTH (100 + SQL_CODE_MONTH)
173 #define SQL_INTERVAL_DAY (100 + SQL_CODE_DAY)
174 #define SQL_INTERVAL_HOUR (100 + SQL_CODE_HOUR)
175 #define SQL_INTERVAL_MINUTE (100 + SQL_CODE_MINUTE)
176 #define SQL_INTERVAL_SECOND (100 + SQL_CODE_SECOND)
177 #define SQL_INTERVAL_YEAR_TO_MONTH (100 + SQL_CODE_YEAR_TO_MONTH)
178 #define SQL_INTERVAL_DAY_TO_HOUR (100 + SQL_CODE_DAY_TO_HOUR)
179 #define SQL_INTERVAL_DAY_TO_MINUTE (100 + SQL_CODE_DAY_TO_MINUTE)
180 #define SQL_INTERVAL_DAY_TO_SECOND (100 + SQL_CODE_DAY_TO_SECOND)
181 #define SQL_INTERVAL_HOUR_TO_MINUTE (100 + SQL_CODE_HOUR_TO_MINUTE)
182 #define SQL_INTERVAL_HOUR_TO_SECOND (100 + SQL_CODE_HOUR_TO_SECOND)
183 #define SQL_INTERVAL_MINUTE_TO_SECOND (100 + SQL_CODE_MINUTE_TO_SECOND)
184 #else
185 #define SQL_INTERVAL_YEAR (-80)
186 #define SQL_INTERVAL_MONTH (-81)
187 #define SQL_INTERVAL_YEAR_TO_MONTH (-82)
188 #define SQL_INTERVAL_DAY (-83)
189 #define SQL_INTERVAL_HOUR (-84)
190 #define SQL_INTERVAL_MINUTE (-85)
191 #define SQL_INTERVAL_SECOND (-86)
192 #define SQL_INTERVAL_DAY_TO_HOUR (-87)
193 #define SQL_INTERVAL_DAY_TO_MINUTE (-88)
194 #define SQL_INTERVAL_DAY_TO_SECOND (-89)
195 #define SQL_INTERVAL_HOUR_TO_MINUTE (-90)
196 #define SQL_INTERVAL_HOUR_TO_SECOND (-91)
197 #define SQL_INTERVAL_MINUTE_TO_SECOND (-92)
198 #endif /* ODBCVER >= 0x0300 */
202 * SQL unicode data types
204 #if (ODBCVER <= 0x0300)
205 /* These definitions are historical and obsolete */
206 #define SQL_UNICODE (-95)
207 #define SQL_UNICODE_VARCHAR (-96)
208 #define SQL_UNICODE_LONGVARCHAR (-97)
209 #define SQL_UNICODE_CHAR SQL_UNICODE
210 #else
211 #define SQL_UNICODE SQL_WCHAR
212 #define SQL_UNICODE_VARCHAR SQL_WVARCHAR
213 #define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR
214 #define SQL_UNICODE_CHAR SQL_WCHAR
215 #endif /* ODBCVER >= 0x0300 */
218 #if (ODBCVER < 0x0300)
219 #define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR
220 #define SQL_TYPE_DRIVER_END SQL_UNICODE_LONGVARCHAR
221 #endif /* ODBCVER < 0x0300 */
224 #define SQL_SIGNED_OFFSET (-20)
225 #define SQL_UNSIGNED_OFFSET (-22)
229 * C datatype to SQL datatype mapping
231 #define SQL_C_CHAR SQL_CHAR
232 #define SQL_C_LONG SQL_INTEGER
233 #define SQL_C_SHORT SQL_SMALLINT
234 #define SQL_C_FLOAT SQL_REAL
235 #define SQL_C_DOUBLE SQL_DOUBLE
236 #if (ODBCVER >= 0x0300)
237 #define SQL_C_NUMERIC SQL_NUMERIC
238 #endif /* ODBCVER >= 0x0300 */
239 #define SQL_C_DEFAULT 99
242 #define SQL_C_DATE SQL_DATE
243 #define SQL_C_TIME SQL_TIME
244 #define SQL_C_TIMESTAMP SQL_TIMESTAMP
245 #define SQL_C_BINARY SQL_BINARY
246 #define SQL_C_BIT SQL_BIT
247 #define SQL_C_TINYINT SQL_TINYINT
248 #define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET)
249 #define SQL_C_SSHORT (SQL_C_SHORT+SQL_SIGNED_OFFSET)
250 #define SQL_C_STINYINT (SQL_TINYINT+SQL_SIGNED_OFFSET)
251 #define SQL_C_ULONG (SQL_C_LONG+SQL_UNSIGNED_OFFSET)
252 #define SQL_C_USHORT (SQL_C_SHORT+SQL_UNSIGNED_OFFSET)
253 #define SQL_C_UTINYINT (SQL_TINYINT+SQL_UNSIGNED_OFFSET)
255 #if defined(_WIN64)
256 #define SQL_C_BOOKMARK SQL_C_UBIGINT
257 #else
258 #define SQL_C_BOOKMARK SQL_C_ULONG
259 #endif
261 #if (ODBCVER >= 0x0300)
262 #define SQL_C_TYPE_DATE SQL_TYPE_DATE
263 #define SQL_C_TYPE_TIME SQL_TYPE_TIME
264 #define SQL_C_TYPE_TIMESTAMP SQL_TYPE_TIMESTAMP
265 #define SQL_C_INTERVAL_YEAR SQL_INTERVAL_YEAR
266 #define SQL_C_INTERVAL_MONTH SQL_INTERVAL_MONTH
267 #define SQL_C_INTERVAL_DAY SQL_INTERVAL_DAY
268 #define SQL_C_INTERVAL_HOUR SQL_INTERVAL_HOUR
269 #define SQL_C_INTERVAL_MINUTE SQL_INTERVAL_MINUTE
270 #define SQL_C_INTERVAL_SECOND SQL_INTERVAL_SECOND
271 #define SQL_C_INTERVAL_YEAR_TO_MONTH SQL_INTERVAL_YEAR_TO_MONTH
272 #define SQL_C_INTERVAL_DAY_TO_HOUR SQL_INTERVAL_DAY_TO_HOUR
273 #define SQL_C_INTERVAL_DAY_TO_MINUTE SQL_INTERVAL_DAY_TO_MINUTE
274 #define SQL_C_INTERVAL_DAY_TO_SECOND SQL_INTERVAL_DAY_TO_SECOND
275 #define SQL_C_INTERVAL_HOUR_TO_MINUTE SQL_INTERVAL_HOUR_TO_MINUTE
276 #define SQL_C_INTERVAL_HOUR_TO_SECOND SQL_INTERVAL_HOUR_TO_SECOND
277 #define SQL_C_INTERVAL_MINUTE_TO_SECOND SQL_INTERVAL_MINUTE_TO_SECOND
278 #define SQL_C_SBIGINT (SQL_BIGINT+SQL_SIGNED_OFFSET)
279 #define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET)
280 #define SQL_C_VARBOOKMARK SQL_C_BINARY
281 #endif /* ODBCVER >= 0x0300 */
283 #if (ODBCVER >= 0x0350)
284 #define SQL_C_GUID SQL_GUID
285 #endif
287 #define SQL_TYPE_NULL 0
289 #if (ODBCVER < 0x0300)
290 #define SQL_TYPE_MIN SQL_BIT
291 #define SQL_TYPE_MAX SQL_VARCHAR
292 #endif /* ODBCVER < 0x0300 */
296 * ----------------------------------------------------------------------
297 * Level 1 Functions
298 * ----------------------------------------------------------------------
302 * SQLBindParameter
304 #define SQL_DEFAULT_PARAM (-5)
305 #define SQL_IGNORE (-6)
306 #if (ODBCVER >= 0x0300)
307 #define SQL_COLUMN_IGNORE SQL_IGNORE
308 #endif /* ODBCVER >= 0x0300 */
309 #define SQL_LEN_DATA_AT_EXEC_OFFSET (-100)
310 #define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET)
314 * binary length for driver specific attributes
316 #define SQL_LEN_BINARY_ATTR_OFFSET (-100)
317 #define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET)
321 * SQLColAttributes - ODBC 2.x defines
323 #define SQL_COLUMN_COUNT 0
324 #define SQL_COLUMN_NAME 1
325 #define SQL_COLUMN_TYPE 2
326 #define SQL_COLUMN_LENGTH 3
327 #define SQL_COLUMN_PRECISION 4
328 #define SQL_COLUMN_SCALE 5
329 #define SQL_COLUMN_DISPLAY_SIZE 6
330 #define SQL_COLUMN_NULLABLE 7
331 #define SQL_COLUMN_UNSIGNED 8
332 #define SQL_COLUMN_MONEY 9
333 #define SQL_COLUMN_UPDATABLE 10
334 #define SQL_COLUMN_AUTO_INCREMENT 11
335 #define SQL_COLUMN_CASE_SENSITIVE 12
336 #define SQL_COLUMN_SEARCHABLE 13
337 #define SQL_COLUMN_TYPE_NAME 14
338 #define SQL_COLUMN_TABLE_NAME 15
339 #define SQL_COLUMN_OWNER_NAME 16
340 #define SQL_COLUMN_QUALIFIER_NAME 17
341 #define SQL_COLUMN_LABEL 18
342 #define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
343 #if (ODBCVER < 0x0300)
344 #define SQL_COLUMN_DRIVER_START 1000
345 #endif /* ODBCVER < 0x0300 */
347 #define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
351 * SQLColAttributes - SQL_COLUMN_UPDATABLE
353 #define SQL_ATTR_READONLY 0
354 #define SQL_ATTR_WRITE 1
355 #define SQL_ATTR_READWRITE_UNKNOWN 2
359 * SQLColAttributes - SQL_COLUMN_SEARCHABLE
361 #define SQL_UNSEARCHABLE 0
362 #define SQL_LIKE_ONLY 1
363 #define SQL_ALL_EXCEPT_LIKE 2
364 #define SQL_SEARCHABLE 3
365 #define SQL_PRED_SEARCHABLE SQL_SEARCHABLE
369 * SQLDataSources - additional fetch directions
371 #if (ODBCVER >= 0x0300)
372 #define SQL_FETCH_FIRST_USER 31
373 #define SQL_FETCH_FIRST_SYSTEM 32
374 #endif /* ODBCVER >= 0x0300 */
378 * SQLDriverConnect
380 #define SQL_DRIVER_NOPROMPT 0
381 #define SQL_DRIVER_COMPLETE 1
382 #define SQL_DRIVER_PROMPT 2
383 #define SQL_DRIVER_COMPLETE_REQUIRED 3
387 * SQLGetConnectAttr - ODBC 2.x attributes
389 #define SQL_ACCESS_MODE 101
390 #define SQL_AUTOCOMMIT 102
391 #define SQL_LOGIN_TIMEOUT 103
392 #define SQL_OPT_TRACE 104
393 #define SQL_OPT_TRACEFILE 105
394 #define SQL_TRANSLATE_DLL 106
395 #define SQL_TRANSLATE_OPTION 107
396 #define SQL_TXN_ISOLATION 108
397 #define SQL_CURRENT_QUALIFIER 109
398 #define SQL_ODBC_CURSORS 110
399 #define SQL_QUIET_MODE 111
400 #define SQL_PACKET_SIZE 112
404 * SQLGetConnectAttr - ODBC 3.0 attributes
406 #if (ODBCVER >= 0x0300)
407 #define SQL_ATTR_ACCESS_MODE SQL_ACCESS_MODE
408 #define SQL_ATTR_AUTOCOMMIT SQL_AUTOCOMMIT
409 #define SQL_ATTR_CONNECTION_TIMEOUT 113
410 #define SQL_ATTR_CURRENT_CATALOG SQL_CURRENT_QUALIFIER
411 #define SQL_ATTR_DISCONNECT_BEHAVIOR 114
412 #define SQL_ATTR_ENLIST_IN_DTC 1207
413 #define SQL_ATTR_ENLIST_IN_XA 1208
414 #define SQL_ATTR_LOGIN_TIMEOUT SQL_LOGIN_TIMEOUT
415 #define SQL_ATTR_ODBC_CURSORS SQL_ODBC_CURSORS
416 #define SQL_ATTR_PACKET_SIZE SQL_PACKET_SIZE
417 #define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE
418 #define SQL_ATTR_TRACE SQL_OPT_TRACE
419 #define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE
420 #define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL
421 #define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION
422 #define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION
423 #endif /* ODBCVER >= 0x0300 */
425 #define SQL_ATTR_CONNECTION_DEAD 1209 /* GetConnectAttr only */
429 * These options have no meaning for a 3.0 driver
431 #if (ODBCVER < 0x0300)
432 #define SQL_CONN_OPT_MIN SQL_ACCESS_MODE
433 #define SQL_CONN_OPT_MAX SQL_PACKET_SIZE
434 #define SQL_CONNECT_OPT_DRVR_START 1000
435 #endif /* ODBCVER < 0x0300 */
439 * SQLGetConnectAttr - SQL_ACCESS_MODE
441 #define SQL_MODE_READ_WRITE 0UL
442 #define SQL_MODE_READ_ONLY 1UL
443 #define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE
447 * SQLGetConnectAttr - SQL_AUTOCOMMIT
449 #define SQL_AUTOCOMMIT_OFF 0UL
450 #define SQL_AUTOCOMMIT_ON 1UL
451 #define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON
455 * SQLGetConnectAttr - SQL_LOGIN_TIMEOUT
457 #define SQL_LOGIN_TIMEOUT_DEFAULT 15UL
461 * SQLGetConnectAttr - SQL_ODBC_CURSORS
463 #define SQL_CUR_USE_IF_NEEDED 0UL
464 #define SQL_CUR_USE_ODBC 1UL
465 #define SQL_CUR_USE_DRIVER 2UL
466 #define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER
470 * SQLGetConnectAttr - SQL_OPT_TRACE
472 #define SQL_OPT_TRACE_OFF 0UL
473 #define SQL_OPT_TRACE_ON 1UL
474 #define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF
475 #if defined (WIN32)
476 #define SQL_OPT_TRACE_FILE_DEFAULT "\\SQL.LOG"
477 #define SQL_OPT_TRACE_FILE_DEFAULTW L"\\SQL.LOG"
478 #else
479 #define SQL_OPT_TRACE_FILE_DEFAULT "/tmp/odbc.log"
480 #define SQL_OPT_TRACE_FILE_DEFAULTW L"/tmp/odbc.log"
481 #endif
485 * SQLGetConnectAttr - SQL_ATTR_ANSI_APP
487 #if (ODBCVER >= 0x0351)
488 #define SQL_AA_TRUE 1L /* ANSI app */
489 #define SQL_AA_FALSE 0L /* Unicode app */
490 #endif
494 * SQLGetConnectAttr - SQL_ATTR_CONNECTION_DEAD
496 #define SQL_CD_TRUE 1L /* closed/dead */
497 #define SQL_CD_FALSE 0L /* open/available */
501 * SQLGetConnectAttr - SQL_ATTR_DISCONNECT_BEHAVIOR
503 #if (ODBCVER >= 0x0300)
504 #define SQL_DB_RETURN_TO_POOL 0UL
505 #define SQL_DB_DISCONNECT 1UL
506 #define SQL_DB_DEFAULT SQL_DB_RETURN_TO_POOL
507 #endif /* ODBCVER >= 0x0300 */
511 * SQLGetConnectAttr - SQL_ATTR_ENLIST_IN_DTC
513 #if (ODBCVER >= 0x0300)
514 #define SQL_DTC_DONE 0L
515 #endif /* ODBCVER >= 0x0300 */
519 * SQLGetConnectAttr - Unicode drivers
521 #if (ODBCVER >= 0x0351)
522 #define SQL_ATTR_ANSI_APP 115
523 #endif
527 * SQLGetData
529 #define SQL_NO_TOTAL (-4)
533 * SQLGetDescField - extended descriptor field
535 #if (ODBCVER >= 0x0300)
536 #define SQL_DESC_ARRAY_SIZE 20
537 #define SQL_DESC_ARRAY_STATUS_PTR 21
538 #define SQL_DESC_AUTO_UNIQUE_VALUE SQL_COLUMN_AUTO_INCREMENT
539 #define SQL_DESC_BASE_COLUMN_NAME 22
540 #define SQL_DESC_BASE_TABLE_NAME 23
541 #define SQL_DESC_BIND_OFFSET_PTR 24
542 #define SQL_DESC_BIND_TYPE 25
543 #define SQL_DESC_CASE_SENSITIVE SQL_COLUMN_CASE_SENSITIVE
544 #define SQL_DESC_CATALOG_NAME SQL_COLUMN_QUALIFIER_NAME
545 #define SQL_DESC_CONCISE_TYPE SQL_COLUMN_TYPE
546 #define SQL_DESC_DATETIME_INTERVAL_PRECISION 26
547 #define SQL_DESC_DISPLAY_SIZE SQL_COLUMN_DISPLAY_SIZE
548 #define SQL_DESC_FIXED_PREC_SCALE SQL_COLUMN_MONEY
549 #define SQL_DESC_LABEL SQL_COLUMN_LABEL
550 #define SQL_DESC_LITERAL_PREFIX 27
551 #define SQL_DESC_LITERAL_SUFFIX 28
552 #define SQL_DESC_LOCAL_TYPE_NAME 29
553 #define SQL_DESC_MAXIMUM_SCALE 30
554 #define SQL_DESC_MINIMUM_SCALE 31
555 #define SQL_DESC_NUM_PREC_RADIX 32
556 #define SQL_DESC_PARAMETER_TYPE 33
557 #define SQL_DESC_ROWS_PROCESSED_PTR 34
558 #if (ODBCVER >= 0x0350)
559 #define SQL_DESC_ROWVER 35
560 #endif /* ODBCVER >= 0x0350 */
561 #define SQL_DESC_SCHEMA_NAME SQL_COLUMN_OWNER_NAME
562 #define SQL_DESC_SEARCHABLE SQL_COLUMN_SEARCHABLE
563 #define SQL_DESC_TYPE_NAME SQL_COLUMN_TYPE_NAME
564 #define SQL_DESC_TABLE_NAME SQL_COLUMN_TABLE_NAME
565 #define SQL_DESC_UNSIGNED SQL_COLUMN_UNSIGNED
566 #define SQL_DESC_UPDATABLE SQL_COLUMN_UPDATABLE
567 #endif /* ODBCVER >= 0x0300 */
571 * SQLGetDiagField - defines for diagnostics fields
573 #if (ODBCVER >= 0x0300)
574 #define SQL_DIAG_CURSOR_ROW_COUNT (-1249)
575 #define SQL_DIAG_ROW_NUMBER (-1248)
576 #define SQL_DIAG_COLUMN_NUMBER (-1247)
577 #endif /* ODBCVER >= 0x0300 */
581 * SQLGetDiagField - SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER
583 #if (ODBCVER >= 0x0300)
584 #define SQL_NO_ROW_NUMBER (-1)
585 #define SQL_NO_COLUMN_NUMBER (-1)
586 #define SQL_ROW_NUMBER_UNKNOWN (-2)
587 #define SQL_COLUMN_NUMBER_UNKNOWN (-2)
588 #endif
591 #if (ODBCVER >= 0x0300)
593 * SQLGetEnvAttr - Attributes
595 #define SQL_ATTR_ODBC_VERSION 200
596 #define SQL_ATTR_CONNECTION_POOLING 201
597 #define SQL_ATTR_CP_MATCH 202
601 * SQLGetEnvAttr - SQL_ATTR_ODBC_VERSION
603 #define SQL_OV_ODBC2 2UL
604 #define SQL_OV_ODBC3 3UL
608 * SQLGetEnvAttr - SQL_ATTR_CONNECTION_POOLING
610 #define SQL_CP_OFF 0UL
611 #define SQL_CP_ONE_PER_DRIVER 1UL
612 #define SQL_CP_ONE_PER_HENV 2UL
613 #define SQL_CP_DEFAULT SQL_CP_OFF
617 * SQLGetEnvAttr - SQL_ATTR_CP_MATCH
619 #define SQL_CP_STRICT_MATCH 0UL
620 #define SQL_CP_RELAXED_MATCH 1UL
621 #define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH
622 #endif /* ODBCVER >= 0x0300 */
626 * SQLGetFunctions - extensions to the X/Open specification
628 #if (ODBCVER >= 0x0300)
629 #define SQL_API_SQLALLOCHANDLESTD 73
630 #define SQL_API_SQLBULKOPERATIONS 24
631 #endif /* ODBCVER >= 0x0300 */
632 #define SQL_API_SQLBINDPARAMETER 72
633 #define SQL_API_SQLBROWSECONNECT 55
634 #define SQL_API_SQLCOLATTRIBUTES 6
635 #define SQL_API_SQLCOLUMNPRIVILEGES 56
636 #define SQL_API_SQLDESCRIBEPARAM 58
637 #define SQL_API_SQLDRIVERCONNECT 41
638 #define SQL_API_SQLDRIVERS 71
639 #define SQL_API_SQLEXTENDEDFETCH 59
640 #define SQL_API_SQLFOREIGNKEYS 60
641 #define SQL_API_SQLMORERESULTS 61
642 #define SQL_API_SQLNATIVESQL 62
643 #define SQL_API_SQLNUMPARAMS 63
644 #define SQL_API_SQLPARAMOPTIONS 64
645 #define SQL_API_SQLPRIMARYKEYS 65
646 #define SQL_API_SQLPROCEDURECOLUMNS 66
647 #define SQL_API_SQLPROCEDURES 67
648 #define SQL_API_SQLSETPOS 68
649 #define SQL_API_SQLSETSCROLLOPTIONS 69
650 #define SQL_API_SQLTABLEPRIVILEGES 70
654 * These are not useful anymore as the X/Open specification defines
655 * functions in the 10000 range
657 #if (ODBCVER < 0x0300)
658 #define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER
659 #define SQL_NUM_FUNCTIONS 23
660 #define SQL_EXT_API_START 40
661 #define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1)
662 #endif /* ODBCVER < 0x0300 */
666 * SQLGetFunctions - ODBC version 2.x and earlier
668 #define SQL_API_ALL_FUNCTIONS 0
672 * Loading by ordinal is not supported for 3.0 and above drivers
674 #define SQL_API_LOADBYORDINAL 199
678 * SQLGetFunctions - SQL_API_ODBC3_ALL_FUNCTIONS
680 #if (ODBCVER >= 0x0300)
681 #define SQL_API_ODBC3_ALL_FUNCTIONS 999
682 #define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250
684 #define SQL_FUNC_EXISTS(pfExists, uwAPI) \
685 ((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) & (1 << ((uwAPI) & 0x000F))) \
686 ? SQL_TRUE : SQL_FALSE)
687 #endif /* ODBCVER >= 0x0300 */
691 * SQLGetInfo - ODBC 2.x extensions to the X/Open standard
693 #define SQL_INFO_FIRST 0
694 #define SQL_ACTIVE_CONNECTIONS 0 /* MAX_DRIVER_CONNECTIONS */
695 #define SQL_ACTIVE_STATEMENTS 1 /* MAX_CONCURRENT_ACTIVITIES */
696 #define SQL_DRIVER_HDBC 3
697 #define SQL_DRIVER_HENV 4
698 #define SQL_DRIVER_HSTMT 5
699 #define SQL_DRIVER_NAME 6
700 #define SQL_DRIVER_VER 7
701 #define SQL_ODBC_API_CONFORMANCE 9
702 #define SQL_ODBC_VER 10
703 #define SQL_ROW_UPDATES 11
704 #define SQL_ODBC_SAG_CLI_CONFORMANCE 12
705 #define SQL_ODBC_SQL_CONFORMANCE 15
706 #define SQL_PROCEDURES 21
707 #define SQL_CONCAT_NULL_BEHAVIOR 22
708 #define SQL_CURSOR_ROLLBACK_BEHAVIOR 24
709 #define SQL_EXPRESSIONS_IN_ORDERBY 27
710 #define SQL_MAX_OWNER_NAME_LEN 32 /* MAX_SCHEMA_NAME_LEN */
711 #define SQL_MAX_PROCEDURE_NAME_LEN 33
712 #define SQL_MAX_QUALIFIER_NAME_LEN 34 /* MAX_CATALOG_NAME_LEN */
713 #define SQL_MULT_RESULT_SETS 36
714 #define SQL_MULTIPLE_ACTIVE_TXN 37
715 #define SQL_OUTER_JOINS 38
716 #define SQL_OWNER_TERM 39
717 #define SQL_PROCEDURE_TERM 40
718 #define SQL_QUALIFIER_NAME_SEPARATOR 41
719 #define SQL_QUALIFIER_TERM 42
720 #define SQL_SCROLL_OPTIONS 44
721 #define SQL_TABLE_TERM 45
722 #define SQL_CONVERT_FUNCTIONS 48
723 #define SQL_NUMERIC_FUNCTIONS 49
724 #define SQL_STRING_FUNCTIONS 50
725 #define SQL_SYSTEM_FUNCTIONS 51
726 #define SQL_TIMEDATE_FUNCTIONS 52
727 #define SQL_CONVERT_BIGINT 53
728 #define SQL_CONVERT_BINARY 54
729 #define SQL_CONVERT_BIT 55
730 #define SQL_CONVERT_CHAR 56
731 #define SQL_CONVERT_DATE 57
732 #define SQL_CONVERT_DECIMAL 58
733 #define SQL_CONVERT_DOUBLE 59
734 #define SQL_CONVERT_FLOAT 60
735 #define SQL_CONVERT_INTEGER 61
736 #define SQL_CONVERT_LONGVARCHAR 62
737 #define SQL_CONVERT_NUMERIC 63
738 #define SQL_CONVERT_REAL 64
739 #define SQL_CONVERT_SMALLINT 65
740 #define SQL_CONVERT_TIME 66
741 #define SQL_CONVERT_TIMESTAMP 67
742 #define SQL_CONVERT_TINYINT 68
743 #define SQL_CONVERT_VARBINARY 69
744 #define SQL_CONVERT_VARCHAR 70
745 #define SQL_CONVERT_LONGVARBINARY 71
746 #define SQL_ODBC_SQL_OPT_IEF 73 /* SQL_INTEGRITY */
747 #define SQL_CORRELATION_NAME 74
748 #define SQL_NON_NULLABLE_COLUMNS 75
749 #define SQL_DRIVER_HLIB 76
750 #define SQL_DRIVER_ODBC_VER 77
751 #define SQL_LOCK_TYPES 78
752 #define SQL_POS_OPERATIONS 79
753 #define SQL_POSITIONED_STATEMENTS 80
754 #define SQL_BOOKMARK_PERSISTENCE 82
755 #define SQL_STATIC_SENSITIVITY 83
756 #define SQL_FILE_USAGE 84
757 #define SQL_COLUMN_ALIAS 87
758 #define SQL_GROUP_BY 88
759 #define SQL_KEYWORDS 89
760 #define SQL_OWNER_USAGE 91
761 #define SQL_QUALIFIER_USAGE 92
762 #define SQL_QUOTED_IDENTIFIER_CASE 93
763 #define SQL_SUBQUERIES 95
764 #define SQL_UNION 96
765 #define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103
766 #define SQL_MAX_CHAR_LITERAL_LEN 108
767 #define SQL_TIMEDATE_ADD_INTERVALS 109
768 #define SQL_TIMEDATE_DIFF_INTERVALS 110
769 #define SQL_NEED_LONG_DATA_LEN 111
770 #define SQL_MAX_BINARY_LITERAL_LEN 112
771 #define SQL_LIKE_ESCAPE_CLAUSE 113
772 #define SQL_QUALIFIER_LOCATION 114
774 #if (ODBCVER >= 0x0201 && ODBCVER < 0x0300)
775 #define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */
776 #endif /* ODBCVER >= 0x0201 && ODBCVER < 0x0300 */
780 * These values are not useful anymore as X/Open defines values in the
781 * 10000 range
783 #if (ODBCVER < 0x0300)
784 #define SQL_INFO_LAST SQL_QUALIFIER_LOCATION
785 #define SQL_INFO_DRIVER_START 1000
786 #endif /* ODBCVER < 0x0300 */
790 * SQLGetInfo - ODBC 3.x extensions to the X/Open standard
792 #if (ODBCVER >= 0x0300)
793 #define SQL_ACTIVE_ENVIRONMENTS 116
794 #define SQL_ALTER_DOMAIN 117
796 #define SQL_SQL_CONFORMANCE 118
797 #define SQL_DATETIME_LITERALS 119
799 #define SQL_ASYNC_MODE 10021 /* new X/Open spec */
800 #define SQL_BATCH_ROW_COUNT 120
801 #define SQL_BATCH_SUPPORT 121
802 #define SQL_CATALOG_LOCATION SQL_QUALIFIER_LOCATION
803 #define SQL_CATALOG_NAME_SEPARATOR SQL_QUALIFIER_NAME_SEPARATOR
804 #define SQL_CATALOG_TERM SQL_QUALIFIER_TERM
805 #define SQL_CATALOG_USAGE SQL_QUALIFIER_USAGE
806 #define SQL_CONVERT_WCHAR 122
807 #define SQL_CONVERT_INTERVAL_DAY_TIME 123
808 #define SQL_CONVERT_INTERVAL_YEAR_MONTH 124
809 #define SQL_CONVERT_WLONGVARCHAR 125
810 #define SQL_CONVERT_WVARCHAR 126
811 #define SQL_CREATE_ASSERTION 127
812 #define SQL_CREATE_CHARACTER_SET 128
813 #define SQL_CREATE_COLLATION 129
814 #define SQL_CREATE_DOMAIN 130
815 #define SQL_CREATE_SCHEMA 131
816 #define SQL_CREATE_TABLE 132
817 #define SQL_CREATE_TRANSLATION 133
818 #define SQL_CREATE_VIEW 134
819 #define SQL_DRIVER_HDESC 135
820 #define SQL_DROP_ASSERTION 136
821 #define SQL_DROP_CHARACTER_SET 137
822 #define SQL_DROP_COLLATION 138
823 #define SQL_DROP_DOMAIN 139
824 #define SQL_DROP_SCHEMA 140
825 #define SQL_DROP_TABLE 141
826 #define SQL_DROP_TRANSLATION 142
827 #define SQL_DROP_VIEW 143
828 #define SQL_DYNAMIC_CURSOR_ATTRIBUTES1 144
829 #define SQL_DYNAMIC_CURSOR_ATTRIBUTES2 145
830 #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 146
831 #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 147
832 #define SQL_INDEX_KEYWORDS 148
833 #define SQL_INFO_SCHEMA_VIEWS 149
834 #define SQL_KEYSET_CURSOR_ATTRIBUTES1 150
835 #define SQL_KEYSET_CURSOR_ATTRIBUTES2 151
836 #define SQL_MAX_ASYNC_CONCURRENT_STATEMENTS 10022 /* new X/Open spec */
837 #define SQL_ODBC_INTERFACE_CONFORMANCE 152
838 #define SQL_PARAM_ARRAY_ROW_COUNTS 153
839 #define SQL_PARAM_ARRAY_SELECTS 154
840 #define SQL_SCHEMA_TERM SQL_OWNER_TERM
841 #define SQL_SCHEMA_USAGE SQL_OWNER_USAGE
842 #define SQL_SQL92_DATETIME_FUNCTIONS 155
843 #define SQL_SQL92_FOREIGN_KEY_DELETE_RULE 156
844 #define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE 157
845 #define SQL_SQL92_GRANT 158
846 #define SQL_SQL92_NUMERIC_VALUE_FUNCTIONS 159
847 #define SQL_SQL92_PREDICATES 160
848 #define SQL_SQL92_RELATIONAL_JOIN_OPERATORS 161
849 #define SQL_SQL92_REVOKE 162
850 #define SQL_SQL92_ROW_VALUE_CONSTRUCTOR 163
851 #define SQL_SQL92_STRING_FUNCTIONS 164
852 #define SQL_SQL92_VALUE_EXPRESSIONS 165
853 #define SQL_STANDARD_CLI_CONFORMANCE 166
854 #define SQL_STATIC_CURSOR_ATTRIBUTES1 167
855 #define SQL_STATIC_CURSOR_ATTRIBUTES2 168
857 #define SQL_AGGREGATE_FUNCTIONS 169
858 #define SQL_DDL_INDEX 170
859 #define SQL_DM_VER 171
860 #define SQL_INSERT_STATEMENT 172
861 #define SQL_CONVERT_GUID 173
862 #define SQL_UNION_STATEMENT SQL_UNION
864 #endif /* ODBCVER >= 0x0300 */
866 #define SQL_DTC_TRANSITION_COST 1750
870 * SQLGetInfo - SQL_AGGREGATE_FUNCTIONS
872 #if (ODBCVER >= 0x0300)
873 #define SQL_AF_AVG 0x00000001L
874 #define SQL_AF_COUNT 0x00000002L
875 #define SQL_AF_MAX 0x00000004L
876 #define SQL_AF_MIN 0x00000008L
877 #define SQL_AF_SUM 0x00000010L
878 #define SQL_AF_DISTINCT 0x00000020L
879 #define SQL_AF_ALL 0x00000040L
880 #endif /* ODBCVER >= 0x0300 */
883 * SQLGetInfo - SQL_ALTER_DOMAIN
885 #if (ODBCVER >= 0x0300)
886 #define SQL_AD_CONSTRAINT_NAME_DEFINITION 0x00000001L
887 #define SQL_AD_ADD_DOMAIN_CONSTRAINT 0x00000002L
888 #define SQL_AD_DROP_DOMAIN_CONSTRAINT 0x00000004L
889 #define SQL_AD_ADD_DOMAIN_DEFAULT 0x00000008L
890 #define SQL_AD_DROP_DOMAIN_DEFAULT 0x00000010L
891 #define SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
892 #define SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
893 #define SQL_AD_ADD_CONSTRAINT_DEFERRABLE 0x00000080L
894 #define SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE 0x00000100L
895 #endif /* ODBCVER >= 0x0300 */
899 * SQLGetInfo - SQL_ALTER_TABLE
901 #if (ODBCVER >= 0x0300)
903 * The following 5 bitmasks are defined in sql.h
905 * #define SQL_AT_ADD_COLUMN 0x00000001L
906 * #define SQL_AT_DROP_COLUMN 0x00000002L
907 * #define SQL_AT_ADD_CONSTRAINT 0x00000008L
909 #define SQL_AT_ADD_COLUMN_SINGLE 0x00000020L
910 #define SQL_AT_ADD_COLUMN_DEFAULT 0x00000040L
911 #define SQL_AT_ADD_COLUMN_COLLATION 0x00000080L
912 #define SQL_AT_SET_COLUMN_DEFAULT 0x00000100L
913 #define SQL_AT_DROP_COLUMN_DEFAULT 0x00000200L
914 #define SQL_AT_DROP_COLUMN_CASCADE 0x00000400L
915 #define SQL_AT_DROP_COLUMN_RESTRICT 0x00000800L
916 #define SQL_AT_ADD_TABLE_CONSTRAINT 0x00001000L
917 #define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE 0x00002000L
918 #define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT 0x00004000L
919 #define SQL_AT_CONSTRAINT_NAME_DEFINITION 0x00008000L
920 #define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED 0x00010000L
921 #define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00020000L
922 #define SQL_AT_CONSTRAINT_DEFERRABLE 0x00040000L
923 #define SQL_AT_CONSTRAINT_NON_DEFERRABLE 0x00080000L
924 #endif /* ODBCVER >= 0x0300 */
928 * SQLGetInfo - SQL_ASYNC_MODE
930 #if (ODBCVER >= 0x0300)
931 #define SQL_AM_NONE 0
932 #define SQL_AM_CONNECTION 1
933 #define SQL_AM_STATEMENT 2
934 #endif /* ODBCVER >= 0x0300 */
938 * SQLGetInfo - SQL_BATCH_ROW_COUNT
940 #if (ODBCVER >= 0x0300)
941 #define SQL_BRC_PROCEDURES 0x0000001
942 #define SQL_BRC_EXPLICIT 0x0000002
943 #define SQL_BRC_ROLLED_UP 0x0000004
944 #endif /* ODBCVER >= 0x0300 */
948 * SQLGetInfo - SQL_BATCH_SUPPORT
950 #if (ODBCVER >= 0x0300)
951 #define SQL_BS_SELECT_EXPLICIT 0x00000001L
952 #define SQL_BS_ROW_COUNT_EXPLICIT 0x00000002L
953 #define SQL_BS_SELECT_PROC 0x00000004L
954 #define SQL_BS_ROW_COUNT_PROC 0x00000008L
955 #endif /* ODBCVER >= 0x0300 */
959 * SQLGetInfo - SQL_BOOKMARK_PERSISTENCE
961 #define SQL_BP_CLOSE 0x00000001L
962 #define SQL_BP_DELETE 0x00000002L
963 #define SQL_BP_DROP 0x00000004L
964 #define SQL_BP_TRANSACTION 0x00000008L
965 #define SQL_BP_UPDATE 0x00000010L
966 #define SQL_BP_OTHER_HSTMT 0x00000020L
967 #define SQL_BP_SCROLL 0x00000040L
971 * SQLGetInfo - SQL_CATALOG_LOCATION
973 #if (ODBCVER >= 0x0300)
974 #define SQL_CL_START SQL_QL_START
975 #define SQL_CL_END SQL_QL_END
976 #endif /* ODBCVER >= 0x0300 */
980 * SQLGetInfo - SQL_CATALOG_USAGE
982 #if (ODBCVER >= 0x0300)
983 #define SQL_CU_DML_STATEMENTS SQL_QU_DML_STATEMENTS
984 #define SQL_CU_PROCEDURE_INVOCATION SQL_QU_PROCEDURE_INVOCATION
985 #define SQL_CU_TABLE_DEFINITION SQL_QU_TABLE_DEFINITION
986 #define SQL_CU_INDEX_DEFINITION SQL_QU_INDEX_DEFINITION
987 #define SQL_CU_PRIVILEGE_DEFINITION SQL_QU_PRIVILEGE_DEFINITION
988 #endif /* ODBCVER >= 0x0300 */
992 * SQLGetInfo - SQL_CONCAT_NULL_BEHAVIOR
994 #define SQL_CB_NULL 0x0000
995 #define SQL_CB_NON_NULL 0x0001
999 * SQLGetInfo - SQL_CONVERT_* bitmask values
1001 #define SQL_CVT_CHAR 0x00000001L
1002 #define SQL_CVT_NUMERIC 0x00000002L
1003 #define SQL_CVT_DECIMAL 0x00000004L
1004 #define SQL_CVT_INTEGER 0x00000008L
1005 #define SQL_CVT_SMALLINT 0x00000010L
1006 #define SQL_CVT_FLOAT 0x00000020L
1007 #define SQL_CVT_REAL 0x00000040L
1008 #define SQL_CVT_DOUBLE 0x00000080L
1009 #define SQL_CVT_VARCHAR 0x00000100L
1010 #define SQL_CVT_LONGVARCHAR 0x00000200L
1011 #define SQL_CVT_BINARY 0x00000400L
1012 #define SQL_CVT_VARBINARY 0x00000800L
1013 #define SQL_CVT_BIT 0x00001000L
1014 #define SQL_CVT_TINYINT 0x00002000L
1015 #define SQL_CVT_BIGINT 0x00004000L
1016 #define SQL_CVT_DATE 0x00008000L
1017 #define SQL_CVT_TIME 0x00010000L
1018 #define SQL_CVT_TIMESTAMP 0x00020000L
1019 #define SQL_CVT_LONGVARBINARY 0x00040000L
1020 #if (ODBCVER >= 0x0300)
1021 #define SQL_CVT_INTERVAL_YEAR_MONTH 0x00080000L
1022 #define SQL_CVT_INTERVAL_DAY_TIME 0x00100000L
1023 #define SQL_CVT_WCHAR 0x00200000L
1024 #define SQL_CVT_WLONGVARCHAR 0x00400000L
1025 #define SQL_CVT_WVARCHAR 0x00800000L
1026 #endif /* ODBCVER >= 0x0300 */
1030 * SQLGetInfo - SQL_CONVERT_FUNCTIONS
1032 #define SQL_FN_CVT_CONVERT 0x00000001L
1033 #if (ODBCVER >= 0x0300)
1034 #define SQL_FN_CVT_CAST 0x00000002L
1035 #endif /* ODBCVER >= 0x0300 */
1039 * SQLGetInfo - SQL_CORRELATION_NAME
1041 #define SQL_CN_NONE 0x0000
1042 #define SQL_CN_DIFFERENT 0x0001
1043 #define SQL_CN_ANY 0x0002
1047 * SQLGetInfo - SQL_CREATE_ASSERTION
1049 #if (ODBCVER >= 0x0300)
1050 #define SQL_CA_CREATE_ASSERTION 0x00000001L
1051 #define SQL_CA_CONSTRAINT_INITIALLY_DEFERRED 0x00000010L
1052 #define SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000020L
1053 #define SQL_CA_CONSTRAINT_DEFERRABLE 0x00000040L
1054 #define SQL_CA_CONSTRAINT_NON_DEFERRABLE 0x00000080L
1055 #endif /* ODBCVER >= 0x0300 */
1059 * SQLGetInfo - SQL_CREATE_CHARACTER_SET
1061 #if (ODBCVER >= 0x0300)
1062 #define SQL_CCS_CREATE_CHARACTER_SET 0x00000001L
1063 #define SQL_CCS_COLLATE_CLAUSE 0x00000002L
1064 #define SQL_CCS_LIMITED_COLLATION 0x00000004L
1065 #endif /* ODBCVER >= 0x0300 */
1069 * SQLGetInfo - SQL_CREATE_COLLATION
1071 #if (ODBCVER >= 0x0300)
1072 #define SQL_CCOL_CREATE_COLLATION 0x00000001L
1073 #endif /* ODBCVER >= 0x0300 */
1077 * SQLGetInfo - SQL_CREATE_DOMAIN
1079 #if (ODBCVER >= 0x0300)
1080 #define SQL_CDO_CREATE_DOMAIN 0x00000001L
1081 #define SQL_CDO_DEFAULT 0x00000002L
1082 #define SQL_CDO_CONSTRAINT 0x00000004L
1083 #define SQL_CDO_COLLATION 0x00000008L
1084 #define SQL_CDO_CONSTRAINT_NAME_DEFINITION 0x00000010L
1085 #define SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
1086 #define SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
1087 #define SQL_CDO_CONSTRAINT_DEFERRABLE 0x00000080L
1088 #define SQL_CDO_CONSTRAINT_NON_DEFERRABLE 0x00000100L
1089 #endif /* ODBCVER >= 0x0300 */
1093 * SQLGetInfo - SQL_CREATE_SCHEMA
1095 #if (ODBCVER >= 0x0300)
1096 #define SQL_CS_CREATE_SCHEMA 0x00000001L
1097 #define SQL_CS_AUTHORIZATION 0x00000002L
1098 #define SQL_CS_DEFAULT_CHARACTER_SET 0x00000004L
1099 #endif /* ODBCVER >= 0x0300 */
1103 * SQLGetInfo - SQL_CREATE_TABLE
1105 #if (ODBCVER >= 0x0300)
1106 #define SQL_CT_CREATE_TABLE 0x00000001L
1107 #define SQL_CT_COMMIT_PRESERVE 0x00000002L
1108 #define SQL_CT_COMMIT_DELETE 0x00000004L
1109 #define SQL_CT_GLOBAL_TEMPORARY 0x00000008L
1110 #define SQL_CT_LOCAL_TEMPORARY 0x00000010L
1111 #define SQL_CT_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
1112 #define SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
1113 #define SQL_CT_CONSTRAINT_DEFERRABLE 0x00000080L
1114 #define SQL_CT_CONSTRAINT_NON_DEFERRABLE 0x00000100L
1115 #define SQL_CT_COLUMN_CONSTRAINT 0x00000200L
1116 #define SQL_CT_COLUMN_DEFAULT 0x00000400L
1117 #define SQL_CT_COLUMN_COLLATION 0x00000800L
1118 #define SQL_CT_TABLE_CONSTRAINT 0x00001000L
1119 #define SQL_CT_CONSTRAINT_NAME_DEFINITION 0x00002000L
1120 #endif /* ODBCVER >= 0x0300 */
1124 * SQLGetInfo - SQL_CREATE_TRANSLATION
1126 #if (ODBCVER >= 0x0300)
1127 #define SQL_CTR_CREATE_TRANSLATION 0x00000001L
1128 #endif /* ODBCVER >= 0x0300 */
1132 * SQLGetInfo - SQL_CREATE_VIEW
1134 #define SQL_CV_CREATE_VIEW 0x00000001L
1135 #define SQL_CV_CHECK_OPTION 0x00000002L
1136 #define SQL_CV_CASCADED 0x00000004L
1137 #define SQL_CV_LOCAL 0x00000008L
1141 * SQLGetInfo - SQL_DATETIME_LITERALS
1143 #if (ODBCVER >= 0x0300)
1144 #define SQL_DL_SQL92_DATE 0x00000001L
1145 #define SQL_DL_SQL92_TIME 0x00000002L
1146 #define SQL_DL_SQL92_TIMESTAMP 0x00000004L
1147 #define SQL_DL_SQL92_INTERVAL_YEAR 0x00000008L
1148 #define SQL_DL_SQL92_INTERVAL_MONTH 0x00000010L
1149 #define SQL_DL_SQL92_INTERVAL_DAY 0x00000020L
1150 #define SQL_DL_SQL92_INTERVAL_HOUR 0x00000040L
1151 #define SQL_DL_SQL92_INTERVAL_MINUTE 0x00000080L
1152 #define SQL_DL_SQL92_INTERVAL_SECOND 0x00000100L
1153 #define SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH 0x00000200L
1154 #define SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR 0x00000400L
1155 #define SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE 0x00000800L
1156 #define SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND 0x00001000L
1157 #define SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE 0x00002000L
1158 #define SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND 0x00004000L
1159 #define SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND 0x00008000L
1160 #endif /* ODBCVER >= 0x0300 */
1164 * SQLGetInfo - SQL_DDL_INDEX
1166 #if (ODBCVER >= 0x0300)
1167 #define SQL_DI_CREATE_INDEX 0x00000001L
1168 #define SQL_DI_DROP_INDEX 0x00000002L
1169 #endif /* ODBCVER >= 0x0300 */
1173 * SQLGetInfo - SQL_DROP_ASSERTION
1175 #if (ODBCVER >= 0x0300)
1176 #define SQL_DA_DROP_ASSERTION 0x00000001L
1177 #endif /* ODBCVER >= 0x0300 */
1181 * SQLGetInfo - SQL_DROP_CHARACTER_SET
1183 #if (ODBCVER >= 0x0300)
1184 #define SQL_DCS_DROP_CHARACTER_SET 0x00000001L
1185 #endif /* ODBCVER >= 0x0300 */
1189 * SQLGetInfo - SQL_DROP_COLLATION
1191 #if (ODBCVER >= 0x0300)
1192 #define SQL_DC_DROP_COLLATION 0x00000001L
1193 #endif /* ODBCVER >= 0x0300 */
1197 * SQLGetInfo - SQL_DROP_DOMAIN
1199 #if (ODBCVER >= 0x0300)
1200 #define SQL_DD_DROP_DOMAIN 0x00000001L
1201 #define SQL_DD_RESTRICT 0x00000002L
1202 #define SQL_DD_CASCADE 0x00000004L
1203 #endif /* ODBCVER >= 0x0300 */
1207 * SQLGetInfo - SQL_DROP_SCHEMA
1209 #if (ODBCVER >= 0x0300)
1210 #define SQL_DS_DROP_SCHEMA 0x00000001L
1211 #define SQL_DS_RESTRICT 0x00000002L
1212 #define SQL_DS_CASCADE 0x00000004L
1213 #endif /* ODBCVER >= 0x0300 */
1217 * SQLGetInfo - SQL_DROP_TABLE
1219 #if (ODBCVER >= 0x0300)
1220 #define SQL_DT_DROP_TABLE 0x00000001L
1221 #define SQL_DT_RESTRICT 0x00000002L
1222 #define SQL_DT_CASCADE 0x00000004L
1223 #endif /* ODBCVER >= 0x0300 */
1227 * SQLGetInfo - SQL_DROP_TRANSLATION
1229 #if (ODBCVER >= 0x0300)
1230 #define SQL_DTR_DROP_TRANSLATION 0x00000001L
1231 #endif /* ODBCVER >= 0x0300 */
1235 * SQLGetInfo - SQL_DROP_VIEW
1237 #if (ODBCVER >= 0x0300)
1238 #define SQL_DV_DROP_VIEW 0x00000001L
1239 #define SQL_DV_RESTRICT 0x00000002L
1240 #define SQL_DV_CASCADE 0x00000004L
1241 #endif /* ODBCVER >= 0x0300 */
1245 * SQLGetInfo - SQL_DTC_TRANSITION_COST
1247 #define SQL_DTC_ENLIST_EXPENSIVE 0x00000001L
1248 #define SQL_DTC_UNENLIST_EXPENSIVE 0x00000002L
1252 * SQLGetInfo - SQL_DYNAMIC_CURSOR_ATTRIBUTES1
1253 * SQLGetInfo - SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1
1254 * SQLGetInfo - SQL_KEYSET_CURSOR_ATTRIBUTES1
1255 * SQLGetInfo - SQL_STATIC_CURSOR_ATTRIBUTES1
1258 * SQLFetchScroll - FetchOrientation
1260 #if (ODBCVER >= 0x0300)
1261 #define SQL_CA1_NEXT 0x00000001L
1262 #define SQL_CA1_ABSOLUTE 0x00000002L
1263 #define SQL_CA1_RELATIVE 0x00000004L
1264 #define SQL_CA1_BOOKMARK 0x00000008L
1265 #endif /* ODBCVER >= 0x0300 */
1269 * SQLSetPos - LockType
1271 #if (ODBCVER >= 0x0300)
1272 #define SQL_CA1_LOCK_NO_CHANGE 0x00000040L
1273 #define SQL_CA1_LOCK_EXCLUSIVE 0x00000080L
1274 #define SQL_CA1_LOCK_UNLOCK 0x00000100L
1275 #endif /* ODBCVER >= 0x0300 */
1279 * SQLSetPos Operations
1281 #if (ODBCVER >= 0x0300)
1282 #define SQL_CA1_POS_POSITION 0x00000200L
1283 #define SQL_CA1_POS_UPDATE 0x00000400L
1284 #define SQL_CA1_POS_DELETE 0x00000800L
1285 #define SQL_CA1_POS_REFRESH 0x00001000L
1286 #endif /* ODBCVER >= 0x0300 */
1290 * positioned updates and deletes
1292 #if (ODBCVER >= 0x0300)
1293 #define SQL_CA1_POSITIONED_UPDATE 0x00002000L
1294 #define SQL_CA1_POSITIONED_DELETE 0x00004000L
1295 #define SQL_CA1_SELECT_FOR_UPDATE 0x00008000L
1296 #endif /* ODBCVER >= 0x0300 */
1300 * SQLBulkOperations operations
1302 #if (ODBCVER >= 0x0300)
1303 #define SQL_CA1_BULK_ADD 0x00010000L
1304 #define SQL_CA1_BULK_UPDATE_BY_BOOKMARK 0x00020000L
1305 #define SQL_CA1_BULK_DELETE_BY_BOOKMARK 0x00040000L
1306 #define SQL_CA1_BULK_FETCH_BY_BOOKMARK 0x00080000L
1307 #endif /* ODBCVER >= 0x0300 */
1311 * SQLGetInfo - SQL_DYNAMIC_CURSOR_ATTRIBUTES2
1312 * SQLGetInfo - SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2
1313 * SQLGetInfo - SQL_KEYSET_CURSOR_ATTRIBUTES2
1314 * SQLGetInfo - SQL_STATIC_CURSOR_ATTRIBUTES2
1317 * SQL_ATTR_SCROLL_CONCURRENCY
1319 #if (ODBCVER >= 0x0300)
1320 #define SQL_CA2_READ_ONLY_CONCURRENCY 0x00000001L
1321 #define SQL_CA2_LOCK_CONCURRENCY 0x00000002L
1322 #define SQL_CA2_OPT_ROWVER_CONCURRENCY 0x00000004L
1323 #define SQL_CA2_OPT_VALUES_CONCURRENCY 0x00000008L
1324 #endif /* ODBCVER >= 0x0300 */
1328 * sensitivity of the cursor to its own inserts, deletes, and updates
1330 #if (ODBCVER >= 0x0300)
1331 #define SQL_CA2_SENSITIVITY_ADDITIONS 0x00000010L
1332 #define SQL_CA2_SENSITIVITY_DELETIONS 0x00000020L
1333 #define SQL_CA2_SENSITIVITY_UPDATES 0x00000040L
1334 #endif /* ODBCVER >= 0x0300 */
1338 * SQL_ATTR_MAX_ROWS
1340 #if (ODBCVER >= 0x0300)
1341 #define SQL_CA2_MAX_ROWS_SELECT 0x00000080L
1342 #define SQL_CA2_MAX_ROWS_INSERT 0x00000100L
1343 #define SQL_CA2_MAX_ROWS_DELETE 0x00000200L
1344 #define SQL_CA2_MAX_ROWS_UPDATE 0x00000400L
1345 #define SQL_CA2_MAX_ROWS_CATALOG 0x00000800L
1346 #define SQL_CA2_MAX_ROWS_AFFECTS_ALL (SQL_CA2_MAX_ROWS_SELECT | \
1347 SQL_CA2_MAX_ROWS_INSERT | \
1348 SQL_CA2_MAX_ROWS_DELETE | \
1349 SQL_CA2_MAX_ROWS_UPDATE | \
1350 SQL_CA2_MAX_ROWS_CATALOG)
1351 #endif /* ODBCVER >= 0x0300 */
1355 * SQL_DIAG_CURSOR_ROW_COUNT
1357 #if (ODBCVER >= 0x0300)
1358 #define SQL_CA2_CRC_EXACT 0x00001000L
1359 #define SQL_CA2_CRC_APPROXIMATE 0x00002000L
1360 #endif /* ODBCVER >= 0x0300 */
1364 * the kinds of positioned statements that can be simulated
1366 #if (ODBCVER >= 0x0300)
1367 #define SQL_CA2_SIMULATE_NON_UNIQUE 0x00004000L
1368 #define SQL_CA2_SIMULATE_TRY_UNIQUE 0x00008000L
1369 #define SQL_CA2_SIMULATE_UNIQUE 0x00010000L
1370 #endif /* ODBCVER >= 0x0300 */
1374 * SQLGetInfo - SQL_FETCH_DIRECTION
1376 #if (ODBCVER < 0x0300)
1377 #define SQL_FD_FETCH_RESUME 0x00000040L
1378 #endif /* ODBCVER < 0x0300 */
1379 #define SQL_FD_FETCH_BOOKMARK 0x00000080L
1383 * SQLGetInfo - SQL_FILE_USAGE
1385 #define SQL_FILE_NOT_SUPPORTED 0x0000
1386 #define SQL_FILE_TABLE 0x0001
1387 #define SQL_FILE_QUALIFIER 0x0002
1388 #define SQL_FILE_CATALOG SQL_FILE_QUALIFIER
1392 * SQLGetInfo - SQL_GETDATA_EXTENSIONS
1394 #define SQL_GD_BLOCK 0x00000004L
1395 #define SQL_GD_BOUND 0x00000008L
1399 * SQLGetInfo - SQL_GROUP_BY
1401 #define SQL_GB_NOT_SUPPORTED 0x0000
1402 #define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001
1403 #define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002
1404 #define SQL_GB_NO_RELATION 0x0003
1405 #if (ODBCVER >= 0x0300)
1406 #define SQL_GB_COLLATE 0x0004
1407 #endif /* ODBCVER >= 0x0300 */
1411 * SQLGetInfo - SQL_INDEX_KEYWORDS
1413 #if (ODBCVER >= 0x0300)
1414 #define SQL_IK_NONE 0x00000000L
1415 #define SQL_IK_ASC 0x00000001L
1416 #define SQL_IK_DESC 0x00000002L
1417 #define SQL_IK_ALL (SQL_IK_ASC | SQL_IK_DESC)
1418 #endif /* ODBCVER >= 0x0300 */
1422 * SQLGetInfo - SQL_INFO_SCHEMA_VIEWS
1424 #if (ODBCVER >= 0x0300)
1425 #define SQL_ISV_ASSERTIONS 0x00000001L
1426 #define SQL_ISV_CHARACTER_SETS 0x00000002L
1427 #define SQL_ISV_CHECK_CONSTRAINTS 0x00000004L
1428 #define SQL_ISV_COLLATIONS 0x00000008L
1429 #define SQL_ISV_COLUMN_DOMAIN_USAGE 0x00000010L
1430 #define SQL_ISV_COLUMN_PRIVILEGES 0x00000020L
1431 #define SQL_ISV_COLUMNS 0x00000040L
1432 #define SQL_ISV_CONSTRAINT_COLUMN_USAGE 0x00000080L
1433 #define SQL_ISV_CONSTRAINT_TABLE_USAGE 0x00000100L
1434 #define SQL_ISV_DOMAIN_CONSTRAINTS 0x00000200L
1435 #define SQL_ISV_DOMAINS 0x00000400L
1436 #define SQL_ISV_KEY_COLUMN_USAGE 0x00000800L
1437 #define SQL_ISV_REFERENTIAL_CONSTRAINTS 0x00001000L
1438 #define SQL_ISV_SCHEMATA 0x00002000L
1439 #define SQL_ISV_SQL_LANGUAGES 0x00004000L
1440 #define SQL_ISV_TABLE_CONSTRAINTS 0x00008000L
1441 #define SQL_ISV_TABLE_PRIVILEGES 0x00010000L
1442 #define SQL_ISV_TABLES 0x00020000L
1443 #define SQL_ISV_TRANSLATIONS 0x00040000L
1444 #define SQL_ISV_USAGE_PRIVILEGES 0x00080000L
1445 #define SQL_ISV_VIEW_COLUMN_USAGE 0x00100000L
1446 #define SQL_ISV_VIEW_TABLE_USAGE 0x00200000L
1447 #define SQL_ISV_VIEWS 0x00400000L
1448 #endif /* ODBCVER >= 0x0300 */
1452 * SQLGetInfo - SQL_INSERT_STATEMENT
1454 #if (ODBCVER >= 0x0300)
1455 #define SQL_IS_INSERT_LITERALS 0x00000001L
1456 #define SQL_IS_INSERT_SEARCHED 0x00000002L
1457 #define SQL_IS_SELECT_INTO 0x00000004L
1458 #endif /* ODBCVER >= 0x0300 */
1462 * SQLGetInfo - SQL_LOCK_TYPES
1464 #define SQL_LCK_NO_CHANGE 0x00000001L
1465 #define SQL_LCK_EXCLUSIVE 0x00000002L
1466 #define SQL_LCK_UNLOCK 0x00000004L
1470 * SQLGetInfo - SQL_POS_OPERATIONS
1472 #define SQL_POS_POSITION 0x00000001L
1473 #define SQL_POS_REFRESH 0x00000002L
1474 #define SQL_POS_UPDATE 0x00000004L
1475 #define SQL_POS_DELETE 0x00000008L
1476 #define SQL_POS_ADD 0x00000010L
1480 * SQLGetInfo - SQL_NON_NULLABLE_COLUMNS
1482 #define SQL_NNC_NULL 0x0000
1483 #define SQL_NNC_NON_NULL 0x0001
1487 * SQLGetInfo - SQL_NULL_COLLATION
1489 #define SQL_NC_START 0x0002
1490 #define SQL_NC_END 0x0004
1494 * SQLGetInfo - SQL_NUMERIC_FUNCTIONS
1496 #define SQL_FN_NUM_ABS 0x00000001L
1497 #define SQL_FN_NUM_ACOS 0x00000002L
1498 #define SQL_FN_NUM_ASIN 0x00000004L
1499 #define SQL_FN_NUM_ATAN 0x00000008L
1500 #define SQL_FN_NUM_ATAN2 0x00000010L
1501 #define SQL_FN_NUM_CEILING 0x00000020L
1502 #define SQL_FN_NUM_COS 0x00000040L
1503 #define SQL_FN_NUM_COT 0x00000080L
1504 #define SQL_FN_NUM_EXP 0x00000100L
1505 #define SQL_FN_NUM_FLOOR 0x00000200L
1506 #define SQL_FN_NUM_LOG 0x00000400L
1507 #define SQL_FN_NUM_MOD 0x00000800L
1508 #define SQL_FN_NUM_SIGN 0x00001000L
1509 #define SQL_FN_NUM_SIN 0x00002000L
1510 #define SQL_FN_NUM_SQRT 0x00004000L
1511 #define SQL_FN_NUM_TAN 0x00008000L
1512 #define SQL_FN_NUM_PI 0x00010000L
1513 #define SQL_FN_NUM_RAND 0x00020000L
1514 #define SQL_FN_NUM_DEGREES 0x00040000L
1515 #define SQL_FN_NUM_LOG10 0x00080000L
1516 #define SQL_FN_NUM_POWER 0x00100000L
1517 #define SQL_FN_NUM_RADIANS 0x00200000L
1518 #define SQL_FN_NUM_ROUND 0x00400000L
1519 #define SQL_FN_NUM_TRUNCATE 0x00800000L
1523 * SQLGetInfo - SQL_ODBC_API_CONFORMANCE
1525 #define SQL_OAC_NONE 0x0000
1526 #define SQL_OAC_LEVEL1 0x0001
1527 #define SQL_OAC_LEVEL2 0x0002
1531 * SQLGetInfo - SQL_ODBC_INTERFACE_CONFORMANCE
1533 #if (ODBCVER >= 0x0300)
1534 #define SQL_OIC_CORE 1UL
1535 #define SQL_OIC_LEVEL1 2UL
1536 #define SQL_OIC_LEVEL2 3UL
1537 #endif /* ODBCVER >= 0x0300 */
1541 * SQLGetInfo - SQL_ODBC_SAG_CLI_CONFORMANCE
1543 #define SQL_OSCC_NOT_COMPLIANT 0x0000
1544 #define SQL_OSCC_COMPLIANT 0x0001
1548 * SQLGetInfo - SQL_ODBC_SQL_CONFORMANCE
1550 #define SQL_OSC_MINIMUM 0x0000
1551 #define SQL_OSC_CORE 0x0001
1552 #define SQL_OSC_EXTENDED 0x0002
1556 * SQLGetInfo - SQL_OWNER_USAGE
1558 #define SQL_OU_DML_STATEMENTS 0x00000001L
1559 #define SQL_OU_PROCEDURE_INVOCATION 0x00000002L
1560 #define SQL_OU_TABLE_DEFINITION 0x00000004L
1561 #define SQL_OU_INDEX_DEFINITION 0x00000008L
1562 #define SQL_OU_PRIVILEGE_DEFINITION 0x00000010L
1566 * SQLGetInfo - SQL_PARAM_ARRAY_ROW_COUNTS
1568 #if (ODBCVER >= 0x0300)
1569 #define SQL_PARC_BATCH 1
1570 #define SQL_PARC_NO_BATCH 2
1571 #endif /* ODBCVER >= 0x0300 */
1575 * SQLGetInfo - SQL_PARAM_ARRAY_SELECTS
1577 #if (ODBCVER >= 0x0300)
1578 #define SQL_PAS_BATCH 1
1579 #define SQL_PAS_NO_BATCH 2
1580 #define SQL_PAS_NO_SELECT 3
1581 #endif /* ODBCVER >= 0x0300 */
1585 * SQLGetInfo - SQL_POSITIONED_STATEMENTS
1587 #define SQL_PS_POSITIONED_DELETE 0x00000001L
1588 #define SQL_PS_POSITIONED_UPDATE 0x00000002L
1589 #define SQL_PS_SELECT_FOR_UPDATE 0x00000004L
1593 * SQLGetInfo - SQL_QUALIFIER_LOCATION
1595 #define SQL_QL_START 0x0001
1596 #define SQL_QL_END 0x0002
1600 * SQLGetInfo - SQL_QUALIFIER_USAGE
1602 #define SQL_QU_DML_STATEMENTS 0x00000001L
1603 #define SQL_QU_PROCEDURE_INVOCATION 0x00000002L
1604 #define SQL_QU_TABLE_DEFINITION 0x00000004L
1605 #define SQL_QU_INDEX_DEFINITION 0x00000008L
1606 #define SQL_QU_PRIVILEGE_DEFINITION 0x00000010L
1610 * SQLGetInfo - SQL_SCHEMA_USAGE
1612 #if (ODBCVER >= 0x0300)
1613 #define SQL_SU_DML_STATEMENTS SQL_OU_DML_STATEMENTS
1614 #define SQL_SU_PROCEDURE_INVOCATION SQL_OU_PROCEDURE_INVOCATION
1615 #define SQL_SU_TABLE_DEFINITION SQL_OU_TABLE_DEFINITION
1616 #define SQL_SU_INDEX_DEFINITION SQL_OU_INDEX_DEFINITION
1617 #define SQL_SU_PRIVILEGE_DEFINITION SQL_OU_PRIVILEGE_DEFINITION
1618 #endif /* ODBCVER >= 0x0300 */
1622 * SQLGetInfo - SQL_SCROLL_OPTIONS
1624 #define SQL_SO_FORWARD_ONLY 0x00000001L
1625 #define SQL_SO_KEYSET_DRIVEN 0x00000002L
1626 #define SQL_SO_DYNAMIC 0x00000004L
1627 #define SQL_SO_MIXED 0x00000008L
1628 #define SQL_SO_STATIC 0x00000010L
1632 * SQLGetInfo - SQL_SQL_CONFORMANCE
1634 #if (ODBCVER >= 0x0300)
1635 #define SQL_SC_SQL92_ENTRY 0x00000001L
1636 #define SQL_SC_FIPS127_2_TRANSITIONAL 0x00000002L
1637 #define SQL_SC_SQL92_INTERMEDIATE 0x00000004L
1638 #define SQL_SC_SQL92_FULL 0x00000008L
1639 #endif /* ODBCVER >= 0x0300 */
1643 * SQLGetInfo - SQL_SQL92_DATETIME_FUNCTIONS
1645 #if (ODBCVER >= 0x0300)
1646 #define SQL_SDF_CURRENT_DATE 0x00000001L
1647 #define SQL_SDF_CURRENT_TIME 0x00000002L
1648 #define SQL_SDF_CURRENT_TIMESTAMP 0x00000004L
1649 #endif /* ODBCVER >= 0x0300 */
1653 * SQLGetInfo - SQL_SQL92_FOREIGN_KEY_DELETE_RULE
1655 #if (ODBCVER >= 0x0300)
1656 #define SQL_SFKD_CASCADE 0x00000001L
1657 #define SQL_SFKD_NO_ACTION 0x00000002L
1658 #define SQL_SFKD_SET_DEFAULT 0x00000004L
1659 #define SQL_SFKD_SET_NULL 0x00000008L
1660 #endif /* ODBCVER >= 0x0300 */
1664 * SQLGetInfo - SQL_SQL92_FOREIGN_KEY_UPDATE_RULE
1666 #if (ODBCVER >= 0x0300)
1667 #define SQL_SFKU_CASCADE 0x00000001L
1668 #define SQL_SFKU_NO_ACTION 0x00000002L
1669 #define SQL_SFKU_SET_DEFAULT 0x00000004L
1670 #define SQL_SFKU_SET_NULL 0x00000008L
1671 #endif /* ODBCVER >= 0x0300 */
1675 * SQLGetInfo - SQL_SQL92_GRANT
1677 #if (ODBCVER >= 0x0300)
1678 #define SQL_SG_USAGE_ON_DOMAIN 0x00000001L
1679 #define SQL_SG_USAGE_ON_CHARACTER_SET 0x00000002L
1680 #define SQL_SG_USAGE_ON_COLLATION 0x00000004L
1681 #define SQL_SG_USAGE_ON_TRANSLATION 0x00000008L
1682 #define SQL_SG_WITH_GRANT_OPTION 0x00000010L
1683 #define SQL_SG_DELETE_TABLE 0x00000020L
1684 #define SQL_SG_INSERT_TABLE 0x00000040L
1685 #define SQL_SG_INSERT_COLUMN 0x00000080L
1686 #define SQL_SG_REFERENCES_TABLE 0x00000100L
1687 #define SQL_SG_REFERENCES_COLUMN 0x00000200L
1688 #define SQL_SG_SELECT_TABLE 0x00000400L
1689 #define SQL_SG_UPDATE_TABLE 0x00000800L
1690 #define SQL_SG_UPDATE_COLUMN 0x00001000L
1691 #endif /* ODBCVER >= 0x0300 */
1695 * SQLGetInfo - SQL_SQL92_NUMERIC_VALUE_FUNCTIONS
1697 #if (ODBCVER >= 0x0300)
1698 #define SQL_SNVF_BIT_LENGTH 0x00000001L
1699 #define SQL_SNVF_CHAR_LENGTH 0x00000002L
1700 #define SQL_SNVF_CHARACTER_LENGTH 0x00000004L
1701 #define SQL_SNVF_EXTRACT 0x00000008L
1702 #define SQL_SNVF_OCTET_LENGTH 0x00000010L
1703 #define SQL_SNVF_POSITION 0x00000020L
1704 #endif /* ODBCVER >= 0x0300 */
1708 * SQLGetInfo - SQL_SQL92_PREDICATES
1710 #if (ODBCVER >= 0x0300)
1711 #define SQL_SP_EXISTS 0x00000001L
1712 #define SQL_SP_ISNOTNULL 0x00000002L
1713 #define SQL_SP_ISNULL 0x00000004L
1714 #define SQL_SP_MATCH_FULL 0x00000008L
1715 #define SQL_SP_MATCH_PARTIAL 0x00000010L
1716 #define SQL_SP_MATCH_UNIQUE_FULL 0x00000020L
1717 #define SQL_SP_MATCH_UNIQUE_PARTIAL 0x00000040L
1718 #define SQL_SP_OVERLAPS 0x00000080L
1719 #define SQL_SP_UNIQUE 0x00000100L
1720 #define SQL_SP_LIKE 0x00000200L
1721 #define SQL_SP_IN 0x00000400L
1722 #define SQL_SP_BETWEEN 0x00000800L
1723 #define SQL_SP_COMPARISON 0x00001000L
1724 #define SQL_SP_QUANTIFIED_COMPARISON 0x00002000L
1725 #endif /* ODBCVER >= 0x0300 */
1729 * SQLGetInfo - SQL_SQL92_RELATIONAL_JOIN_OPERATORS
1731 #if (ODBCVER >= 0x0300)
1732 #define SQL_SRJO_CORRESPONDING_CLAUSE 0x00000001L
1733 #define SQL_SRJO_CROSS_JOIN 0x00000002L
1734 #define SQL_SRJO_EXCEPT_JOIN 0x00000004L
1735 #define SQL_SRJO_FULL_OUTER_JOIN 0x00000008L
1736 #define SQL_SRJO_INNER_JOIN 0x00000010L
1737 #define SQL_SRJO_INTERSECT_JOIN 0x00000020L
1738 #define SQL_SRJO_LEFT_OUTER_JOIN 0x00000040L
1739 #define SQL_SRJO_NATURAL_JOIN 0x00000080L
1740 #define SQL_SRJO_RIGHT_OUTER_JOIN 0x00000100L
1741 #define SQL_SRJO_UNION_JOIN 0x00000200L
1742 #endif /* ODBCVER >= 0x0300 */
1746 * SQLGetInfo - SQL_SQL92_REVOKE
1748 #if (ODBCVER >= 0x0300)
1749 #define SQL_SR_USAGE_ON_DOMAIN 0x00000001L
1750 #define SQL_SR_USAGE_ON_CHARACTER_SET 0x00000002L
1751 #define SQL_SR_USAGE_ON_COLLATION 0x00000004L
1752 #define SQL_SR_USAGE_ON_TRANSLATION 0x00000008L
1753 #define SQL_SR_GRANT_OPTION_FOR 0x00000010L
1754 #define SQL_SR_CASCADE 0x00000020L
1755 #define SQL_SR_RESTRICT 0x00000040L
1756 #define SQL_SR_DELETE_TABLE 0x00000080L
1757 #define SQL_SR_INSERT_TABLE 0x00000100L
1758 #define SQL_SR_INSERT_COLUMN 0x00000200L
1759 #define SQL_SR_REFERENCES_TABLE 0x00000400L
1760 #define SQL_SR_REFERENCES_COLUMN 0x00000800L
1761 #define SQL_SR_SELECT_TABLE 0x00001000L
1762 #define SQL_SR_UPDATE_TABLE 0x00002000L
1763 #define SQL_SR_UPDATE_COLUMN 0x00004000L
1764 #endif /* ODBCVER >= 0x0300 */
1768 * SQLGetInfo - SQL_SQL92_ROW_VALUE_CONSTRUCTOR
1770 #if (ODBCVER >= 0x0300)
1771 #define SQL_SRVC_VALUE_EXPRESSION 0x00000001L
1772 #define SQL_SRVC_NULL 0x00000002L
1773 #define SQL_SRVC_DEFAULT 0x00000004L
1774 #define SQL_SRVC_ROW_SUBQUERY 0x00000008L
1775 #endif /* ODBCVER >= 0x0300 */
1779 * SQLGetInfo - SQL_SQL92_STRING_FUNCTIONS
1781 #if (ODBCVER >= 0x0300)
1782 #define SQL_SSF_CONVERT 0x00000001L
1783 #define SQL_SSF_LOWER 0x00000002L
1784 #define SQL_SSF_UPPER 0x00000004L
1785 #define SQL_SSF_SUBSTRING 0x00000008L
1786 #define SQL_SSF_TRANSLATE 0x00000010L
1787 #define SQL_SSF_TRIM_BOTH 0x00000020L
1788 #define SQL_SSF_TRIM_LEADING 0x00000040L
1789 #define SQL_SSF_TRIM_TRAILING 0x00000080L
1790 #endif /* ODBCVER >= 0x0300 */
1794 * SQLGetInfo - SQL_SQL92_VALUE_EXPRESSIONS
1796 #if (ODBCVER >= 0x0300)
1797 #define SQL_SVE_CASE 0x00000001L
1798 #define SQL_SVE_CAST 0x00000002L
1799 #define SQL_SVE_COALESCE 0x00000004L
1800 #define SQL_SVE_NULLIF 0x00000008L
1801 #endif /* ODBCVER >= 0x0300 */
1805 * SQLGetInfo - SQL_STANDARD_CLI_CONFORMANCE
1807 #if (ODBCVER >= 0x0300)
1808 #define SQL_SCC_XOPEN_CLI_VERSION1 0x00000001L
1809 #define SQL_SCC_ISO92_CLI 0x00000002L
1810 #endif /* ODBCVER >= 0x0300 */
1814 * SQLGetInfo - SQL_STATIC_SENSITIVITY
1816 #define SQL_SS_ADDITIONS 0x00000001L
1817 #define SQL_SS_DELETIONS 0x00000002L
1818 #define SQL_SS_UPDATES 0x00000004L
1822 * SQLGetInfo - SQL_SUBQUERIES
1824 #define SQL_SQ_COMPARISON 0x00000001L
1825 #define SQL_SQ_EXISTS 0x00000002L
1826 #define SQL_SQ_IN 0x00000004L
1827 #define SQL_SQ_QUANTIFIED 0x00000008L
1828 #define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L
1832 * SQLGetInfo - SQL_SYSTEM_FUNCTIONS
1834 #define SQL_FN_SYS_USERNAME 0x00000001L
1835 #define SQL_FN_SYS_DBNAME 0x00000002L
1836 #define SQL_FN_SYS_IFNULL 0x00000004L
1840 * SQLGetInfo - SQL_STRING_FUNCTIONS
1842 #define SQL_FN_STR_CONCAT 0x00000001L
1843 #define SQL_FN_STR_INSERT 0x00000002L
1844 #define SQL_FN_STR_LEFT 0x00000004L
1845 #define SQL_FN_STR_LTRIM 0x00000008L
1846 #define SQL_FN_STR_LENGTH 0x00000010L
1847 #define SQL_FN_STR_LOCATE 0x00000020L
1848 #define SQL_FN_STR_LCASE 0x00000040L
1849 #define SQL_FN_STR_REPEAT 0x00000080L
1850 #define SQL_FN_STR_REPLACE 0x00000100L
1851 #define SQL_FN_STR_RIGHT 0x00000200L
1852 #define SQL_FN_STR_RTRIM 0x00000400L
1853 #define SQL_FN_STR_SUBSTRING 0x00000800L
1854 #define SQL_FN_STR_UCASE 0x00001000L
1855 #define SQL_FN_STR_ASCII 0x00002000L
1856 #define SQL_FN_STR_CHAR 0x00004000L
1857 #define SQL_FN_STR_DIFFERENCE 0x00008000L
1858 #define SQL_FN_STR_LOCATE_2 0x00010000L
1859 #define SQL_FN_STR_SOUNDEX 0x00020000L
1860 #define SQL_FN_STR_SPACE 0x00040000L
1861 #if (ODBCVER >= 0x0300)
1862 #define SQL_FN_STR_BIT_LENGTH 0x00080000L
1863 #define SQL_FN_STR_CHAR_LENGTH 0x00100000L
1864 #define SQL_FN_STR_CHARACTER_LENGTH 0x00200000L
1865 #define SQL_FN_STR_OCTET_LENGTH 0x00400000L
1866 #define SQL_FN_STR_POSITION 0x00800000L
1867 #endif /* ODBCVER >= 0x0300 */
1871 * SQLGetInfo - SQL_TIMEDATE_ADD_INTERVALS
1872 * SQLGetInfo - SQL_TIMEDATE_DIFF_INTERVALS
1874 #define SQL_FN_TSI_FRAC_SECOND 0x00000001L
1875 #define SQL_FN_TSI_SECOND 0x00000002L
1876 #define SQL_FN_TSI_MINUTE 0x00000004L
1877 #define SQL_FN_TSI_HOUR 0x00000008L
1878 #define SQL_FN_TSI_DAY 0x00000010L
1879 #define SQL_FN_TSI_WEEK 0x00000020L
1880 #define SQL_FN_TSI_MONTH 0x00000040L
1881 #define SQL_FN_TSI_QUARTER 0x00000080L
1882 #define SQL_FN_TSI_YEAR 0x00000100L
1886 * SQLGetInfo - SQL_TIMEDATE_FUNCTIONS
1888 #define SQL_FN_TD_NOW 0x00000001L
1889 #define SQL_FN_TD_CURDATE 0x00000002L
1890 #define SQL_FN_TD_DAYOFMONTH 0x00000004L
1891 #define SQL_FN_TD_DAYOFWEEK 0x00000008L
1892 #define SQL_FN_TD_DAYOFYEAR 0x00000010L
1893 #define SQL_FN_TD_MONTH 0x00000020L
1894 #define SQL_FN_TD_QUARTER 0x00000040L
1895 #define SQL_FN_TD_WEEK 0x00000080L
1896 #define SQL_FN_TD_YEAR 0x00000100L
1897 #define SQL_FN_TD_CURTIME 0x00000200L
1898 #define SQL_FN_TD_HOUR 0x00000400L
1899 #define SQL_FN_TD_MINUTE 0x00000800L
1900 #define SQL_FN_TD_SECOND 0x00001000L
1901 #define SQL_FN_TD_TIMESTAMPADD 0x00002000L
1902 #define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L
1903 #define SQL_FN_TD_DAYNAME 0x00008000L
1904 #define SQL_FN_TD_MONTHNAME 0x00010000L
1905 #if (ODBCVER >= 0x0300)
1906 #define SQL_FN_TD_CURRENT_DATE 0x00020000L
1907 #define SQL_FN_TD_CURRENT_TIME 0x00040000L
1908 #define SQL_FN_TD_CURRENT_TIMESTAMP 0x00080000L
1909 #define SQL_FN_TD_EXTRACT 0x00100000L
1910 #endif /* ODBCVER >= 0x0300 */
1914 * SQLGetInfo - SQL_TXN_ISOLATION_OPTION
1916 #if (ODBCVER < 0x0300)
1917 #define SQL_TXN_VERSIONING 0x00000010L
1918 #endif /* ODBCVER < 0x0300 */
1922 * SQLGetInfo - SQL_UNION
1924 #define SQL_U_UNION 0x00000001L
1925 #define SQL_U_UNION_ALL 0x00000002L
1929 * SQLGetInfo - SQL_UNION_STATEMENT
1931 #if (ODBCVER >= 0x0300)
1932 #define SQL_US_UNION SQL_U_UNION
1933 #define SQL_US_UNION_ALL SQL_U_UNION_ALL
1934 #endif /* ODBCVER >= 0x0300 */
1938 * SQLGetStmtAttr - ODBC 2.x attributes
1940 #define SQL_QUERY_TIMEOUT 0
1941 #define SQL_MAX_ROWS 1
1942 #define SQL_NOSCAN 2
1943 #define SQL_MAX_LENGTH 3
1944 #define SQL_ASYNC_ENABLE 4
1945 #define SQL_BIND_TYPE 5
1946 #define SQL_CURSOR_TYPE 6
1947 #define SQL_CONCURRENCY 7
1948 #define SQL_KEYSET_SIZE 8
1949 #define SQL_ROWSET_SIZE 9
1950 #define SQL_SIMULATE_CURSOR 10
1951 #define SQL_RETRIEVE_DATA 11
1952 #define SQL_USE_BOOKMARKS 12
1953 #define SQL_GET_BOOKMARK 13
1954 #define SQL_ROW_NUMBER 14
1958 * SQLGetStmtAttr - ODBC 3.x attributes
1960 #if (ODBCVER >= 0x0300)
1961 #define SQL_ATTR_ASYNC_ENABLE 4
1962 #define SQL_ATTR_CONCURRENCY SQL_CONCURRENCY
1963 #define SQL_ATTR_CURSOR_TYPE SQL_CURSOR_TYPE
1964 #define SQL_ATTR_ENABLE_AUTO_IPD 15
1965 #define SQL_ATTR_FETCH_BOOKMARK_PTR 16
1966 #define SQL_ATTR_KEYSET_SIZE SQL_KEYSET_SIZE
1967 #define SQL_ATTR_MAX_LENGTH SQL_MAX_LENGTH
1968 #define SQL_ATTR_MAX_ROWS SQL_MAX_ROWS
1969 #define SQL_ATTR_NOSCAN SQL_NOSCAN
1970 #define SQL_ATTR_PARAM_BIND_OFFSET_PTR 17
1971 #define SQL_ATTR_PARAM_BIND_TYPE 18
1972 #define SQL_ATTR_PARAM_OPERATION_PTR 19
1973 #define SQL_ATTR_PARAM_STATUS_PTR 20
1974 #define SQL_ATTR_PARAMS_PROCESSED_PTR 21
1975 #define SQL_ATTR_PARAMSET_SIZE 22
1976 #define SQL_ATTR_QUERY_TIMEOUT SQL_QUERY_TIMEOUT
1977 #define SQL_ATTR_RETRIEVE_DATA SQL_RETRIEVE_DATA
1978 #define SQL_ATTR_ROW_BIND_OFFSET_PTR 23
1979 #define SQL_ATTR_ROW_BIND_TYPE SQL_BIND_TYPE
1980 #define SQL_ATTR_ROW_NUMBER SQL_ROW_NUMBER /*GetStmtAttr*/
1981 #define SQL_ATTR_ROW_OPERATION_PTR 24
1982 #define SQL_ATTR_ROW_STATUS_PTR 25
1983 #define SQL_ATTR_ROWS_FETCHED_PTR 26
1984 #define SQL_ATTR_ROW_ARRAY_SIZE 27
1985 #define SQL_ATTR_SIMULATE_CURSOR SQL_SIMULATE_CURSOR
1986 #define SQL_ATTR_USE_BOOKMARKS SQL_USE_BOOKMARKS
1987 #endif /* ODBCVER >= 0x0300 */
1989 #if (ODBCVER < 0x0300)
1990 #define SQL_STMT_OPT_MAX SQL_ROW_NUMBER
1991 #define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT
1992 #endif /* ODBCVER < 0x0300 */
1996 * SQLGetStmtAttr - SQL_ATTR_ASYNC_ENABLE
1998 #define SQL_ASYNC_ENABLE_OFF 0UL
1999 #define SQL_ASYNC_ENABLE_ON 1UL
2000 #define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF
2004 * SQLGetStmtAttr - SQL_ATTR_PARAM_BIND_TYPE
2006 #if (ODBCVER >= 0x0300)
2007 #define SQL_PARAM_BIND_BY_COLUMN 0UL
2008 #define SQL_PARAM_BIND_TYPE_DEFAULT SQL_PARAM_BIND_BY_COLUMN
2009 #endif /* ODBCVER >= 0x0300 */
2013 * SQLGetStmtAttr - SQL_BIND_TYPE
2015 #define SQL_BIND_BY_COLUMN 0UL
2016 #define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN
2020 * SQLGetStmtAttr - SQL_CONCURRENCY
2022 #define SQL_CONCUR_READ_ONLY 1
2023 #define SQL_CONCUR_LOCK 2
2024 #define SQL_CONCUR_ROWVER 3
2025 #define SQL_CONCUR_VALUES 4
2026 #define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY
2030 * SQLGetStmtAttr - SQL_CURSOR_TYPE
2032 #define SQL_CURSOR_FORWARD_ONLY 0UL
2033 #define SQL_CURSOR_KEYSET_DRIVEN 1UL
2034 #define SQL_CURSOR_DYNAMIC 2UL
2035 #define SQL_CURSOR_STATIC 3UL
2036 #define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY
2040 * SQLGetStmtAttr - SQL_KEYSET_SIZE
2042 #define SQL_KEYSET_SIZE_DEFAULT 0UL
2046 * SQLGetStmtAttr - SQL_MAX_LENGTH
2048 #define SQL_MAX_LENGTH_DEFAULT 0UL
2052 * SQLGetStmtAttr - SQL_MAX_ROWS
2054 #define SQL_MAX_ROWS_DEFAULT 0UL
2058 * SQLGetStmtAttr - SQL_NOSCAN
2060 #define SQL_NOSCAN_OFF 0UL /* 1.0 FALSE */
2061 #define SQL_NOSCAN_ON 1UL /* 1.0 TRUE */
2062 #define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF
2066 * SQLGetStmtAttr - SQL_QUERY_TIMEOUT
2068 #define SQL_QUERY_TIMEOUT_DEFAULT 0UL
2072 * SQLGetStmtAttr - SQL_RETRIEVE_DATA
2074 #define SQL_RD_OFF 0UL
2075 #define SQL_RD_ON 1UL
2076 #define SQL_RD_DEFAULT SQL_RD_ON
2080 * SQLGetStmtAttr - SQL_ROWSET_SIZE
2082 #define SQL_ROWSET_SIZE_DEFAULT 1UL
2086 * SQLGetStmtAttr - SQL_SIMULATE_CURSOR
2088 #define SQL_SC_NON_UNIQUE 0UL
2089 #define SQL_SC_TRY_UNIQUE 1UL
2090 #define SQL_SC_UNIQUE 2UL
2094 * SQLGetStmtAttr - SQL_USE_BOOKMARKS
2096 #define SQL_UB_OFF 0UL
2097 #define SQL_UB_ON 1UL
2098 #define SQL_UB_DEFAULT SQL_UB_OFF
2099 #if (ODBCVER >= 0x0300)
2100 #define SQL_UB_FIXED SQL_UB_ON
2101 #define SQL_UB_VARIABLE 2UL
2102 #endif /* ODBCVER >= 0x0300 */
2106 * SQLGetTypeInfo - SEARCHABLE
2108 #if (ODBCVER >= 0x0300)
2109 #define SQL_COL_PRED_CHAR SQL_LIKE_ONLY
2110 #define SQL_COL_PRED_BASIC SQL_ALL_EXCEPT_LIKE
2111 #endif /* ODBCVER >= 0x0300 */
2115 * SQLSetPos
2117 #define SQL_ENTIRE_ROWSET 0
2121 * SQLSetPos - Operation
2123 #define SQL_POSITION 0
2124 #define SQL_REFRESH 1
2125 #define SQL_UPDATE 2
2126 #define SQL_DELETE 3
2130 * SQLBulkOperations - Operation
2132 #define SQL_ADD 4
2133 #define SQL_SETPOS_MAX_OPTION_VALUE SQL_ADD
2134 #if (ODBCVER >= 0x0300)
2135 #define SQL_UPDATE_BY_BOOKMARK 5
2136 #define SQL_DELETE_BY_BOOKMARK 6
2137 #define SQL_FETCH_BY_BOOKMARK 7
2138 #endif /* ODBCVER >= 0x0300 */
2142 * SQLSetPos - LockType
2144 #define SQL_LOCK_NO_CHANGE 0
2145 #define SQL_LOCK_EXCLUSIVE 1
2146 #define SQL_LOCK_UNLOCK 2
2147 #define SQL_SETPOS_MAX_LOCK_VALUE SQL_LOCK_UNLOCK
2151 * SQLSetPos macros
2153 #define SQL_POSITION_TO(hstmt,irow) \
2154 SQLSetPos(hstmt,irow,SQL_POSITION,SQL_LOCK_NO_CHANGE)
2155 #define SQL_LOCK_RECORD(hstmt,irow,fLock) \
2156 SQLSetPos(hstmt,irow,SQL_POSITION,fLock)
2157 #define SQL_REFRESH_RECORD(hstmt,irow,fLock) \
2158 SQLSetPos(hstmt,irow,SQL_REFRESH,fLock)
2159 #define SQL_UPDATE_RECORD(hstmt,irow) \
2160 SQLSetPos(hstmt,irow,SQL_UPDATE,SQL_LOCK_NO_CHANGE)
2161 #define SQL_DELETE_RECORD(hstmt,irow) \
2162 SQLSetPos(hstmt,irow,SQL_DELETE,SQL_LOCK_NO_CHANGE)
2163 #define SQL_ADD_RECORD(hstmt,irow) \
2164 SQLSetPos(hstmt,irow,SQL_ADD,SQL_LOCK_NO_CHANGE)
2168 * SQLSpecialColumns - Column types and scopes
2170 #define SQL_BEST_ROWID 1
2171 #define SQL_ROWVER 2
2175 * All the ODBC keywords
2177 #define SQL_ODBC_KEYWORDS \
2178 "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,"\
2179 "ASC,ASSERTION,AT,AUTHORIZATION,AVG,"\
2180 "BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,"\
2181 "CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,"\
2182 "COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"\
2183 "CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"\
2184 "CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"\
2185 "DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"\
2186 "DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,"\
2187 "DISTINCT,DOMAIN,DOUBLE,DROP,"\
2188 "ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,"\
2189 "EXISTS,EXTERNAL,EXTRACT,"\
2190 "FALSE,FETCH,FIRST,FLOAT,FOR,FOREIGN,FORTRAN,FOUND,FROM,FULL,"\
2191 "GET,GLOBAL,GO,GOTO,GRANT,GROUP,HAVING,HOUR,"\
2192 "IDENTITY,IMMEDIATE,IN,INCLUDE,INDEX,INDICATOR,INITIALLY,INNER,"\
2193 "INPUT,INSENSITIVE,INSERT,INT,INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,"\
2194 "JOIN,KEY,LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,"\
2195 "MATCH,MAX,MIN,MINUTE,MODULE,MONTH,"\
2196 "NAMES,NATIONAL,NATURAL,NCHAR,NEXT,NO,NONE,NOT,NULL,NULLIF,NUMERIC,"\
2197 "OCTET_LENGTH,OF,ON,ONLY,OPEN,OPTION,OR,ORDER,OUTER,OUTPUT,OVERLAPS,"\
2198 "PAD,PARTIAL,PASCAL,PLI,POSITION,PRECISION,PREPARE,PRESERVE,"\
2199 "PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,"\
2200 "READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS"\
2201 "SCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,SIZE,"\
2202 "SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,"\
2203 "SUBSTRING,SUM,SYSTEM_USER,"\
2204 "TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"\
2205 "TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"\
2206 "UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"\
2207 "VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,"\
2208 "YEAR,ZONE"
2212 * ----------------------------------------------------------------------
2213 * Level 2 Functions
2214 * ----------------------------------------------------------------------
2218 * SQLExtendedFetch - fFetchType
2220 #define SQL_FETCH_BOOKMARK 8
2224 * SQLExtendedFetch - rgfRowStatus
2226 #define SQL_ROW_SUCCESS 0
2227 #define SQL_ROW_DELETED 1
2228 #define SQL_ROW_UPDATED 2
2229 #define SQL_ROW_NOROW 3
2230 #define SQL_ROW_ADDED 4
2231 #define SQL_ROW_ERROR 5
2232 #if (ODBCVER >= 0x0300)
2233 #define SQL_ROW_SUCCESS_WITH_INFO 6
2234 #define SQL_ROW_PROCEED 0
2235 #define SQL_ROW_IGNORE 1
2236 #endif
2240 * SQL_DESC_ARRAY_STATUS_PTR
2242 #if (ODBCVER >= 0x0300)
2243 #define SQL_PARAM_SUCCESS 0
2244 #define SQL_PARAM_SUCCESS_WITH_INFO 6
2245 #define SQL_PARAM_ERROR 5
2246 #define SQL_PARAM_UNUSED 7
2247 #define SQL_PARAM_DIAG_UNAVAILABLE 1
2249 #define SQL_PARAM_PROCEED 0
2250 #define SQL_PARAM_IGNORE 1
2251 #endif /* ODBCVER >= 0x0300 */
2255 * SQLForeignKeys - UPDATE_RULE/DELETE_RULE
2257 #define SQL_CASCADE 0
2258 #define SQL_RESTRICT 1
2259 #define SQL_SET_NULL 2
2261 #if (ODBCVER >= 0x0250)
2262 #define SQL_NO_ACTION 3
2263 #define SQL_SET_DEFAULT 4
2264 #endif /* ODBCVER >= 0x0250 */
2268 * SQLForeignKeys - DEFERABILITY
2270 #if (ODBCVER >= 0x0300)
2271 #define SQL_INITIALLY_DEFERRED 5
2272 #define SQL_INITIALLY_IMMEDIATE 6
2273 #define SQL_NOT_DEFERRABLE 7
2274 #endif /* ODBCVER >= 0x0300 */
2278 * SQLBindParameter - fParamType
2279 * SQLProcedureColumns - COLUMN_TYPE
2281 #define SQL_PARAM_TYPE_UNKNOWN 0
2282 #define SQL_PARAM_INPUT 1
2283 #define SQL_PARAM_INPUT_OUTPUT 2
2284 #define SQL_RESULT_COL 3
2285 #define SQL_PARAM_OUTPUT 4
2286 #define SQL_RETURN_VALUE 5
2290 * SQLProcedures - PROCEDURE_TYPE
2292 #define SQL_PT_UNKNOWN 0
2293 #define SQL_PT_PROCEDURE 1
2294 #define SQL_PT_FUNCTION 2
2298 * SQLSetParam to SQLBindParameter conversion
2300 #define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT
2301 #define SQL_SETPARAM_VALUE_MAX (-1L)
2305 * SQLStatistics - fAccuracy
2307 #define SQL_QUICK 0
2308 #define SQL_ENSURE 1
2312 * SQLStatistics - TYPE
2314 #define SQL_TABLE_STAT 0
2318 * SQLTables
2320 #if (ODBCVER >= 0x0300)
2321 #define SQL_ALL_CATALOGS "%"
2322 #define SQL_ALL_SCHEMAS "%"
2323 #define SQL_ALL_TABLE_TYPES "%"
2324 #endif /* ODBCVER >= 0x0300 */
2327 * SQLSpecialColumns - PSEUDO_COLUMN
2329 #define SQL_PC_NOT_PSEUDO 1
2333 * Deprecated defines from prior versions of ODBC
2335 #define SQL_DATABASE_NAME 16
2336 #define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR
2337 #define SQL_FETCH_PREV SQL_FETCH_PRIOR
2338 #define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER
2339 #define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER
2340 #define SQL_CC_DELETE SQL_CB_DELETE
2341 #define SQL_CR_DELETE SQL_CB_DELETE
2342 #define SQL_CC_CLOSE SQL_CB_CLOSE
2343 #define SQL_CR_CLOSE SQL_CB_CLOSE
2344 #define SQL_CC_PRESERVE SQL_CB_PRESERVE
2345 #define SQL_CR_PRESERVE SQL_CB_PRESERVE
2346 #if (ODBCVER < 0x0200)
2347 #define SQL_FETCH_RESUME 7
2348 #endif
2349 #define SQL_SCROLL_FORWARD_ONLY 0L
2350 #define SQL_SCROLL_KEYSET_DRIVEN (-1L)
2351 #define SQL_SCROLL_DYNAMIC (-2L)
2352 #define SQL_SCROLL_STATIC (-3L)
2356 * Level 1 function prototypes
2358 SQLRETURN SQL_API SQLDriverConnect (
2359 SQLHDBC hdbc,
2360 SQLHWND hwnd,
2361 SQLCHAR * szConnStrIn,
2362 SQLSMALLINT cbConnStrIn,
2363 SQLCHAR * szConnStrOut,
2364 SQLSMALLINT cbConnStrOutMax,
2365 SQLSMALLINT * pcbConnStrOut,
2366 SQLUSMALLINT fDriverCompletion);
2369 * Level 2 function prototypes
2372 SQLRETURN SQL_API SQLBrowseConnect (
2373 SQLHDBC hdbc,
2374 SQLCHAR * szConnStrIn,
2375 SQLSMALLINT cbConnStrIn,
2376 SQLCHAR * szConnStrOut,
2377 SQLSMALLINT cbConnStrOutMax,
2378 SQLSMALLINT * pcbConnStrOut);
2380 #if (ODBCVER >= 0x0300)
2381 SQLRETURN SQL_API SQLBulkOperations (
2382 SQLHSTMT StatementHandle,
2383 SQLSMALLINT Operation);
2384 #endif /* ODBCVER >= 0x0300 */
2386 SQLRETURN SQL_API SQLColAttributes (
2387 SQLHSTMT hstmt,
2388 SQLUSMALLINT icol,
2389 SQLUSMALLINT fDescType,
2390 SQLPOINTER rgbDesc,
2391 SQLSMALLINT cbDescMax,
2392 SQLSMALLINT * pcbDesc,
2393 SQLLEN * pfDesc);
2395 SQLRETURN SQL_API SQLColumnPrivileges (
2396 SQLHSTMT hstmt,
2397 SQLCHAR * szCatalogName,
2398 SQLSMALLINT cbCatalogName,
2399 SQLCHAR * szSchemaName,
2400 SQLSMALLINT cbSchemaName,
2401 SQLCHAR * szTableName,
2402 SQLSMALLINT cbTableName,
2403 SQLCHAR * szColumnName,
2404 SQLSMALLINT cbColumnName);
2406 SQLRETURN SQL_API SQLDescribeParam (
2407 SQLHSTMT hstmt,
2408 SQLUSMALLINT ipar,
2409 SQLSMALLINT * pfSqlType,
2410 SQLULEN * pcbParamDef,
2411 SQLSMALLINT * pibScale,
2412 SQLSMALLINT * pfNullable);
2414 SQLRETURN SQL_API SQLExtendedFetch (
2415 SQLHSTMT hstmt,
2416 SQLUSMALLINT fFetchType,
2417 SQLLEN irow,
2418 SQLULEN * pcrow,
2419 SQLUSMALLINT * rgfRowStatus);
2421 SQLRETURN SQL_API SQLForeignKeys (
2422 SQLHSTMT hstmt,
2423 SQLCHAR * szPkCatalogName,
2424 SQLSMALLINT cbPkCatalogName,
2425 SQLCHAR * szPkSchemaName,
2426 SQLSMALLINT cbPkSchemaName,
2427 SQLCHAR * szPkTableName,
2428 SQLSMALLINT cbPkTableName,
2429 SQLCHAR * szFkCatalogName,
2430 SQLSMALLINT cbFkCatalogName,
2431 SQLCHAR * szFkSchemaName,
2432 SQLSMALLINT cbFkSchemaName,
2433 SQLCHAR * szFkTableName,
2434 SQLSMALLINT cbFkTableName);
2436 SQLRETURN SQL_API SQLMoreResults (
2437 SQLHSTMT hstmt);
2439 SQLRETURN SQL_API SQLNativeSql (
2440 SQLHDBC hdbc,
2441 SQLCHAR * szSqlStrIn,
2442 SQLINTEGER cbSqlStrIn,
2443 SQLCHAR * szSqlStr,
2444 SQLINTEGER cbSqlStrMax,
2445 SQLINTEGER * pcbSqlStr);
2447 SQLRETURN SQL_API SQLNumParams (
2448 SQLHSTMT hstmt,
2449 SQLSMALLINT * pcpar);
2451 SQLRETURN SQL_API SQLParamOptions (
2452 SQLHSTMT hstmt,
2453 SQLULEN crow,
2454 SQLULEN * pirow);
2456 SQLRETURN SQL_API SQLPrimaryKeys (
2457 SQLHSTMT hstmt,
2458 SQLCHAR * szCatalogName,
2459 SQLSMALLINT cbCatalogName,
2460 SQLCHAR * szSchemaName,
2461 SQLSMALLINT cbSchemaName,
2462 SQLCHAR * szTableName,
2463 SQLSMALLINT cbTableName);
2465 SQLRETURN SQL_API SQLProcedureColumns (
2466 SQLHSTMT hstmt,
2467 SQLCHAR * szCatalogName,
2468 SQLSMALLINT cbCatalogName,
2469 SQLCHAR * szSchemaName,
2470 SQLSMALLINT cbSchemaName,
2471 SQLCHAR * szProcName,
2472 SQLSMALLINT cbProcName,
2473 SQLCHAR * szColumnName,
2474 SQLSMALLINT cbColumnName);
2476 SQLRETURN SQL_API SQLProcedures (
2477 SQLHSTMT hstmt,
2478 SQLCHAR * szCatalogName,
2479 SQLSMALLINT cbCatalogName,
2480 SQLCHAR * szSchemaName,
2481 SQLSMALLINT cbSchemaName,
2482 SQLCHAR * szProcName,
2483 SQLSMALLINT cbProcName);
2485 SQLRETURN SQL_API SQLSetPos (
2486 SQLHSTMT hstmt,
2487 SQLSETPOSIROW irow,
2488 SQLUSMALLINT fOption,
2489 SQLUSMALLINT fLock);
2491 SQLRETURN SQL_API SQLTablePrivileges (
2492 SQLHSTMT hstmt,
2493 SQLCHAR * szCatalogName,
2494 SQLSMALLINT cbCatalogName,
2495 SQLCHAR * szSchemaName,
2496 SQLSMALLINT cbSchemaName,
2497 SQLCHAR * szTableName,
2498 SQLSMALLINT cbTableName);
2500 SQLRETURN SQL_API SQLDrivers (
2501 SQLHENV henv,
2502 SQLUSMALLINT fDirection,
2503 SQLCHAR * szDriverDesc,
2504 SQLSMALLINT cbDriverDescMax,
2505 SQLSMALLINT * pcbDriverDesc,
2506 SQLCHAR * szDriverAttributes,
2507 SQLSMALLINT cbDrvrAttrMax,
2508 SQLSMALLINT * pcbDrvrAttr);
2510 SQLRETURN SQL_API SQLBindParameter (
2511 SQLHSTMT hstmt,
2512 SQLUSMALLINT ipar,
2513 SQLSMALLINT fParamType,
2514 SQLSMALLINT fCType,
2515 SQLSMALLINT fSqlType,
2516 SQLULEN cbColDef,
2517 SQLSMALLINT ibScale,
2518 SQLPOINTER rgbValue,
2519 SQLLEN cbValueMax,
2520 SQLLEN * pcbValue);
2523 * Depreciated - use SQLSetStmtOptions
2525 SQLRETURN SQL_API SQLSetScrollOptions ( /* Use SQLSetStmtOptions */
2526 SQLHSTMT hstmt,
2527 SQLUSMALLINT fConcurrency,
2528 SQLLEN crowKeyset,
2529 SQLUSMALLINT crowRowset);
2533 * SQLAllocHandleStd - make SQLAllocHandle compatible with X/Open standard
2535 * NOTE: An application should not call SQLAllocHandleStd directly
2537 #ifdef ODBC_STD
2538 #define SQLAllocHandle SQLAllocHandleStd
2539 #define SQLAllocEnv(phenv) \
2540 SQLAllocHandleStd(SQL_HANDLE_ENV, SQL_NULL_HANDLE, phenv)
2542 #if (ODBCVER >= 0x0300)
2543 SQLRETURN SQL_API SQLAllocHandleStd (
2544 SQLSMALLINT fHandleType,
2545 SQLHANDLE hInput,
2546 SQLHANDLE * phOutput);
2547 #endif
2550 /* Internal type subcodes */
2551 #define SQL_YEAR SQL_CODE_YEAR
2552 #define SQL_MONTH SQL_CODE_MONTH
2553 #define SQL_DAY SQL_CODE_DAY
2554 #define SQL_HOUR SQL_CODE_HOUR
2555 #define SQL_MINUTE SQL_CODE_MINUTE
2556 #define SQL_SECOND SQL_CODE_SECOND
2557 #define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MONTH
2558 #define SQL_DAY_TO_HOUR SQL_CODE_DAY_TO_HOUR
2559 #define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINUTE
2560 #define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECOND
2561 #define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MINUTE
2562 #define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SECOND
2563 #define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND
2564 #endif /* ODBC_STD */
2567 #ifdef __cplusplus
2569 #endif
2571 #include "sqlucode.h"
2573 #endif /* _SQLEXT_H */