sqlext.h (cdf0e10c) | sqlext.h (24201887) |
---|---|
1/***************************************************** 2 * sqlext.h | 1/* 2 * sqlext.h |
3 * | 3 * |
4 * These should be consistent with the MS version. | 4 * $Id: sqlext.h,v 1.10 2006/01/20 15:58:34 source Exp $ |
5 * | 5 * |
6 *****************************************************/ 7#ifndef __SQLEXT_H 8#define __SQLEXT_H | 6 * ODBC defines (ext) 7 * 8 * The iODBC driver manager. 9 * 10 * Copyright (C) 1995 by Ke Jin <kejin@empress.com> 11 * Copyright (C) 1996-2006 by OpenLink Software <iodbc@openlinksw.com> 12 * All Rights Reserved. 13 * 14 * This software is released under the terms of either of the following 15 * licenses: 16 * 17 * - GNU Library General Public License (see LICENSE.LGPL) 18 * - The BSD License (see LICENSE.BSD). 19 * 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. 23 * 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: 28 * 29 * http://www.iodbc.org 30 * 31 * 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. 38 * 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. 43 * 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 47 * 48 * 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: 54 * 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. 64 * 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. 76 */ |
9 | 77 |
78#ifndef _SQLEXT_H 79#define _SQLEXT_H |
|
10 | 80 |
11/* BEGIN - unixODBC ONLY (programs like ODBCConfig and DataManager use these) */ 12 13/* COLUMNS IN SQLTables() RESULT SET */ 14#define SQLTables_TABLE_CATALOG 1 15#define SQLTables_TABLE_SCHEM 2 16#define SQLTables_TABLE_NAME 3 17#define SQLTables_TABLE_TYPE 4 18#define SQLTables_REMARKS 5 19 20/* COLUMNS IN SQLColumns() RESULT SET */ 21#define SQLColumns_TABLE_CAT 1 22#define SQLColumns_TABLE_SCHEM 2 23#define SQLColumns_TABLE_NAME 3 24#define SQLColumns_COLUMN_NAME 4 25#define SQLColumns_DATA_TYPE 5 26#define SQLColumns_TYPE_NAME 6 27#define SQLColumns_COLUMN_SIZE 7 28#define SQLColumns_BUFFER_LENGTH 8 29#define SQLColumns_DECIMAL_DIGITS 9 30#define SQLColumns_NUM_PREC_RADIX 10 31#define SQLColumns_NULLABLE 11 32#define SQLColumns_REMARKS 12 33#define SQLColumns_COLUMN_DEF 13 34#define SQLColumns_SQL_DATA_TYPE 14 35#define SQLColumns_SQL_DATETIME_SUB 15 36#define SQLColumns_CHAR_OCTET_LENGTH 16 37#define SQLColumns_ORDINAL_POSITION 17 38#define SQLColumns_IS_NULLABLE 18 39 40/* END - unixODBC ONLY */ 41 42#ifndef __SQL_H 43#include "odbc/sql.h" | 81#ifndef _SQL_H 82#include <odbc/sql.h> |
44#endif 45 46#ifdef __cplusplus | 83#endif 84 85#ifdef __cplusplus |
47extern "C" { /* Assume C declarations for C++ */ | 86extern "C" { |
48#endif 49 | 87#endif 88 |
50/* generally useful constants */ 51#define SQL_SPEC_MAJOR 3 /* Major version of specification */ 52#define SQL_SPEC_MINOR 52 /* Minor version of specification */ 53#define SQL_SPEC_STRING "03.52" /* String constant for version */ | |
54 | 89 |
55#define SQL_SQLSTATE_SIZE 5 /* size of SQLSTATE */ 56#define SQL_MAX_DSN_LENGTH 32 /* maximum data source name size */ | 90/* 91 * Useful Constants 92 */ 93#define SQL_SPEC_MAJOR 3 94#define SQL_SPEC_MINOR 52 95#define SQL_SPEC_STRING "03.52" |
57 | 96 |
58#define SQL_MAX_OPTION_STRING_LENGTH 256 | 97#define SQL_SQLSTATE_SIZE 5 98#define SQL_MAX_DSN_LENGTH 32 99#define SQL_MAX_OPTION_STRING_LENGTH 256 |
59 | 100 |
60/* return code SQL_NO_DATA_FOUND is the same as SQL_NO_DATA */ | 101 102/* 103 * Handle types 104 */ 105#if (ODBCVER >= 0x0300) 106#define SQL_HANDLE_SENV 5 107#endif /* ODBCVER >= 0x0300 */ 108 109 110/* 111 * Function return codes 112 */ |
61#if (ODBCVER < 0x0300) | 113#if (ODBCVER < 0x0300) |
62#define SQL_NO_DATA_FOUND 100 | 114#define SQL_NO_DATA_FOUND 100 |
63#else | 115#else |
64#define SQL_NO_DATA_FOUND SQL_NO_DATA 65#endif | 116#define SQL_NO_DATA_FOUND SQL_NO_DATA 117#endif /* ODBCVER < 0x0300 */ |
66 | 118 |
67/* an end handle type */ | 119 120/* 121 * Special length values for attributes 122 */ |
68#if (ODBCVER >= 0x0300) | 123#if (ODBCVER >= 0x0300) |
69#define SQL_HANDLE_SENV 5 70#endif /* 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 */ |
71 | 130 |
72/* env attribute */ | 131 132/* 133 * SQL extended datatypes 134 */ 135#define SQL_DATE 9 |
73#if (ODBCVER >= 0x0300) | 136#if (ODBCVER >= 0x0300) |
74#define SQL_ATTR_ODBC_VERSION 200 75#define SQL_ATTR_CONNECTION_POOLING 201 76#define SQL_ATTR_CP_MATCH 202 | 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 */ |
77 | 151 |
78/* unixODBC additions */ 79#define SQL_ATTR_UNIXODBC_SYSPATH 65001 80#define SQL_ATTR_UNIXODBC_VERSION 65002 81#define SQL_ATTR_UNIXODBC_ENVATTR 65003 82#endif /* ODBCVER >= 0x0300 */ | |
83 | 152 |
153/* 154 * SQL Interval datatypes 155 */ |
|
84#if (ODBCVER >= 0x0300) | 156#if (ODBCVER >= 0x0300) |
85/* values for SQL_ATTR_CONNECTION_POOLING */ 86#define SQL_CP_OFF 0UL 87#define SQL_CP_ONE_PER_DRIVER 1UL 88#define SQL_CP_ONE_PER_HENV 2UL 89#define SQL_CP_DEFAULT SQL_CP_OFF | 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 |
90 | 170 |
91/* values for SQL_ATTR_CP_MATCH */ 92#define SQL_CP_STRICT_MATCH 0UL 93#define SQL_CP_RELAXED_MATCH 1UL 94#define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH | 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 */ |
95 | 199 |
96/* values for SQL_ATTR_ODBC_VERSION */ 97#define SQL_OV_ODBC2 2UL 98#define SQL_OV_ODBC3 3UL 99#endif /* ODBCVER >= 0x0300 */ | |
100 | 200 |
101/* connection attributes */ 102#define SQL_ACCESS_MODE 101 103#define SQL_AUTOCOMMIT 102 104#define SQL_LOGIN_TIMEOUT 103 105#define SQL_OPT_TRACE 104 106#define SQL_OPT_TRACEFILE 105 107#define SQL_TRANSLATE_DLL 106 108#define SQL_TRANSLATE_OPTION 107 109#define SQL_TXN_ISOLATION 108 110#define SQL_CURRENT_QUALIFIER 109 111#define SQL_ODBC_CURSORS 110 112#define SQL_QUIET_MODE 111 113#define SQL_PACKET_SIZE 112 | 201/* 202 * SQL unicode data types 203 */ 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 */ |
114 | 216 |
115/* connection attributes with new names */ | 217 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 */ 222 223 224#define SQL_SIGNED_OFFSET (-20) 225#define SQL_UNSIGNED_OFFSET (-22) 226 227 228/* 229 * C datatype to SQL datatype mapping 230 */ 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 |
116#if (ODBCVER >= 0x0300) | 236#if (ODBCVER >= 0x0300) |
117#define SQL_ATTR_ACCESS_MODE SQL_ACCESS_MODE 118#define SQL_ATTR_AUTOCOMMIT SQL_AUTOCOMMIT 119#define SQL_ATTR_CONNECTION_TIMEOUT 113 120#define SQL_ATTR_CURRENT_CATALOG SQL_CURRENT_QUALIFIER 121#define SQL_ATTR_DISCONNECT_BEHAVIOR 114 122#define SQL_ATTR_ENLIST_IN_DTC 1207 123#define SQL_ATTR_ENLIST_IN_XA 1208 124#define SQL_ATTR_LOGIN_TIMEOUT SQL_LOGIN_TIMEOUT 125#define SQL_ATTR_ODBC_CURSORS SQL_ODBC_CURSORS 126#define SQL_ATTR_PACKET_SIZE SQL_PACKET_SIZE 127#define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE 128#define SQL_ATTR_TRACE SQL_OPT_TRACE 129#define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE 130#define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL 131#define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION 132#define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION 133#endif /* ODBCVER >= 0x0300 */ | 237#define SQL_C_NUMERIC SQL_NUMERIC 238#endif /* ODBCVER >= 0x0300 */ 239#define SQL_C_DEFAULT 99 |
134 | 240 |
135#define SQL_ATTR_CONNECTION_DEAD 1209 /* GetConnectAttr only */ | |
136 | 241 |
137#define SQL_ATTR_DRIVER_THREADING 1028 /* Driver threading level */ | 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) |
138 | 254 |
139#if (ODBCVER >= 0x0351) 140/* ODBC Driver Manager sets this connection attribute to a unicode driver 141 (which supports SQLConnectW) when the application is an ANSI application 142 (which calls SQLConnect, SQLDriverConnect, or SQLBrowseConnect). 143 This is SetConnectAttr only and application does not set this attribute 144 This attribute was introduced because some unicode driver's some APIs may 145 need to behave differently on ANSI or Unicode applications. A unicode 146 driver, which has same behavior for both ANSI or Unicode applications, 147 should return SQL_ERROR when the driver manager sets this connection 148 attribute. When a unicode driver returns SQL_SUCCESS on this attribute, 149 the driver manager treates ANSI and Unicode connections differently in 150 connection pooling. 151*/ 152#define SQL_ATTR_ANSI_APP 115 | 255#if defined(_WIN64) 256#define SQL_C_BOOKMARK SQL_C_UBIGINT 257#else 258#define SQL_C_BOOKMARK SQL_C_ULONG |
153#endif 154 | 259#endif 260 |
155/* SQL_CONNECT_OPT_DRVR_START is not meaningful for 3.0 driver */ | 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 */ 282 283#if (ODBCVER >= 0x0350) 284#define SQL_C_GUID SQL_GUID 285#endif 286 287#define SQL_TYPE_NULL 0 288 |
156#if (ODBCVER < 0x0300) | 289#if (ODBCVER < 0x0300) |
157#define SQL_CONNECT_OPT_DRVR_START 1000 158#endif /* ODBCVER < 0x0300 */ | 290#define SQL_TYPE_MIN SQL_BIT 291#define SQL_TYPE_MAX SQL_VARCHAR 292#endif /* ODBCVER < 0x0300 */ |
159 | 293 |
294 295/* 296 * ---------------------------------------------------------------------- 297 * Level 1 Functions 298 * ---------------------------------------------------------------------- 299 */ 300 301/* 302 * SQLBindParameter 303 */ 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) 311 312 313/* 314 * binary length for driver specific attributes 315 */ 316#define SQL_LEN_BINARY_ATTR_OFFSET (-100) 317#define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET) 318 319 320/* 321 * SQLColAttributes - ODBC 2.x defines 322 */ 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 |
|
160#if (ODBCVER < 0x0300) | 343#if (ODBCVER < 0x0300) |
161#define SQL_CONN_OPT_MAX SQL_PACKET_SIZE 162#define SQL_CONN_OPT_MIN SQL_ACCESS_MODE 163#endif /* ODBCVER < 0x0300 */ | 344#define SQL_COLUMN_DRIVER_START 1000 345#endif /* ODBCVER < 0x0300 */ |
164 | 346 |
165/* SQL_ACCESS_MODE options */ 166#define SQL_MODE_READ_WRITE 0UL 167#define SQL_MODE_READ_ONLY 1UL 168#define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE | 347#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT |
169 | 348 |
170/* SQL_AUTOCOMMIT options */ 171#define SQL_AUTOCOMMIT_OFF 0UL 172#define SQL_AUTOCOMMIT_ON 1UL 173#define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON | |
174 | 349 |
175/* SQL_LOGIN_TIMEOUT options */ 176#define SQL_LOGIN_TIMEOUT_DEFAULT 15UL | 350/* 351 * SQLColAttributes - SQL_COLUMN_UPDATABLE 352 */ 353#define SQL_ATTR_READONLY 0 354#define SQL_ATTR_WRITE 1 355#define SQL_ATTR_READWRITE_UNKNOWN 2 |
177 | 356 |
178/* SQL_OPT_TRACE options */ 179#define SQL_OPT_TRACE_OFF 0UL 180#define SQL_OPT_TRACE_ON 1UL 181#define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF 182#define SQL_OPT_TRACE_FILE_DEFAULT "/tmp/SQL.LOG" | |
183 | 357 |
184/* SQL_ODBC_CURSORS options */ 185#define SQL_CUR_USE_IF_NEEDED 0UL 186#define SQL_CUR_USE_ODBC 1UL 187#define SQL_CUR_USE_DRIVER 2UL 188#define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER | 358/* 359 * SQLColAttributes - SQL_COLUMN_SEARCHABLE 360 */ 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 |
189 | 366 |
367 368/* 369 * SQLDataSources - additional fetch directions 370 */ |
|
190#if (ODBCVER >= 0x0300) | 371#if (ODBCVER >= 0x0300) |
191/* values for SQL_ATTR_DISCONNECT_BEHAVIOR */ 192#define SQL_DB_RETURN_TO_POOL 0UL 193#define SQL_DB_DISCONNECT 1UL 194#define SQL_DB_DEFAULT SQL_DB_RETURN_TO_POOL | 372#define SQL_FETCH_FIRST_USER 31 373#define SQL_FETCH_FIRST_SYSTEM 32 374#endif /* ODBCVER >= 0x0300 */ |
195 | 375 |
196/* values for SQL_ATTR_ENLIST_IN_DTC */ 197#define SQL_DTC_DONE 0L 198#endif /* ODBCVER >= 0x0300 */ | |
199 | 376 |
200/* values for SQL_ATTR_CONNECTION_DEAD */ 201#define SQL_CD_TRUE 1L /* Connection is closed/dead */ 202#define SQL_CD_FALSE 0L /* Connection is open/available */ | 377/* 378 * SQLDriverConnect 379 */ 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 |
203 | 384 |
204/* values for SQL_ATTR_ANSI_APP */ 205#if (ODBCVER >= 0x0351) 206#define SQL_AA_TRUE 1L /* the application is an ANSI app */ 207#define SQL_AA_FALSE 0L /* the application is a Unicode app */ 208#endif | |
209 | 385 |
210/* statement attributes */ 211#define SQL_QUERY_TIMEOUT 0 212#define SQL_MAX_ROWS 1 213#define SQL_NOSCAN 2 214#define SQL_MAX_LENGTH 3 215#define SQL_ASYNC_ENABLE 4 /* same as SQL_ATTR_ASYNC_ENABLE */ 216#define SQL_BIND_TYPE 5 217#define SQL_CURSOR_TYPE 6 218#define SQL_CONCURRENCY 7 219#define SQL_KEYSET_SIZE 8 220#define SQL_ROWSET_SIZE 9 221#define SQL_SIMULATE_CURSOR 10 222#define SQL_RETRIEVE_DATA 11 223#define SQL_USE_BOOKMARKS 12 224#define SQL_GET_BOOKMARK 13 /* GetStmtOption Only */ 225#define SQL_ROW_NUMBER 14 /* GetStmtOption Only */ | 386/* 387 * SQLGetConnectAttr - ODBC 2.x attributes 388 */ 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 |
226 | 401 |
227/* statement attributes for ODBC 3.0 */ | 402 403/* 404 * SQLGetConnectAttr - ODBC 3.0 attributes 405 */ |
228#if (ODBCVER >= 0x0300) | 406#if (ODBCVER >= 0x0300) |
229#define SQL_ATTR_ASYNC_ENABLE 4 230#define SQL_ATTR_CONCURRENCY SQL_CONCURRENCY 231#define SQL_ATTR_CURSOR_TYPE SQL_CURSOR_TYPE 232#define SQL_ATTR_ENABLE_AUTO_IPD 15 233#define SQL_ATTR_FETCH_BOOKMARK_PTR 16 234#define SQL_ATTR_KEYSET_SIZE SQL_KEYSET_SIZE 235#define SQL_ATTR_MAX_LENGTH SQL_MAX_LENGTH 236#define SQL_ATTR_MAX_ROWS SQL_MAX_ROWS 237#define SQL_ATTR_NOSCAN SQL_NOSCAN 238#define SQL_ATTR_PARAM_BIND_OFFSET_PTR 17 239#define SQL_ATTR_PARAM_BIND_TYPE 18 240#define SQL_ATTR_PARAM_OPERATION_PTR 19 241#define SQL_ATTR_PARAM_STATUS_PTR 20 242#define SQL_ATTR_PARAMS_PROCESSED_PTR 21 243#define SQL_ATTR_PARAMSET_SIZE 22 244#define SQL_ATTR_QUERY_TIMEOUT SQL_QUERY_TIMEOUT 245#define SQL_ATTR_RETRIEVE_DATA SQL_RETRIEVE_DATA 246#define SQL_ATTR_ROW_BIND_OFFSET_PTR 23 247#define SQL_ATTR_ROW_BIND_TYPE SQL_BIND_TYPE 248#define SQL_ATTR_ROW_NUMBER SQL_ROW_NUMBER /*GetStmtAttr*/ 249#define SQL_ATTR_ROW_OPERATION_PTR 24 250#define SQL_ATTR_ROW_STATUS_PTR 25 251#define SQL_ATTR_ROWS_FETCHED_PTR 26 252#define SQL_ATTR_ROW_ARRAY_SIZE 27 253#define SQL_ATTR_SIMULATE_CURSOR SQL_SIMULATE_CURSOR 254#define SQL_ATTR_USE_BOOKMARKS SQL_USE_BOOKMARKS | 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 */ |
255 | 424 |
256#endif /* ODBCVER >= 0x0300 */ | 425#define SQL_ATTR_CONNECTION_DEAD 1209 /* GetConnectAttr only */ |
257 | 426 |
427 428/* 429 * These options have no meaning for a 3.0 driver 430 */ |
|
258#if (ODBCVER < 0x0300) | 431#if (ODBCVER < 0x0300) |
259#define SQL_STMT_OPT_MAX SQL_ROW_NUMBER 260#define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT 261#endif /* 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 */ |
262 | 436 |
263/* New defines for SEARCHABLE column in SQLGetTypeInfo */ | |
264 | 437 |
265#if (ODBCVER >= 0x0300) 266#define SQL_COL_PRED_CHAR SQL_LIKE_ONLY 267#define SQL_COL_PRED_BASIC SQL_ALL_EXCEPT_LIKE 268#endif /* ODBCVER >= 0x0300 */ | 438/* 439 * SQLGetConnectAttr - SQL_ACCESS_MODE 440 */ 441#define SQL_MODE_READ_WRITE 0UL 442#define SQL_MODE_READ_ONLY 1UL 443#define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE |
269 270 | 444 445 |
446/* 447 * SQLGetConnectAttr - SQL_AUTOCOMMIT 448 */ 449#define SQL_AUTOCOMMIT_OFF 0UL 450#define SQL_AUTOCOMMIT_ON 1UL 451#define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON |
|
271 | 452 |
272/* whether an attribute is a pointer or not */ 273#if (ODBCVER >= 0x0300) 274#define SQL_IS_POINTER (-4) 275#define SQL_IS_UINTEGER (-5) 276#define SQL_IS_INTEGER (-6) 277#define SQL_IS_USMALLINT (-7) 278#define SQL_IS_SMALLINT (-8) 279#endif /* ODBCVER >= 0x0300 */ | |
280 | 453 |
281/* the value of SQL_ATTR_PARAM_BIND_TYPE */ 282#if (ODBCVER >= 0x0300) 283#define SQL_PARAM_BIND_BY_COLUMN 0UL 284#define SQL_PARAM_BIND_TYPE_DEFAULT SQL_PARAM_BIND_BY_COLUMN 285#endif /* ODBCVER >= 0x0300 */ | 454/* 455 * SQLGetConnectAttr - SQL_LOGIN_TIMEOUT 456 */ 457#define SQL_LOGIN_TIMEOUT_DEFAULT 15UL |
286 | 458 |
287/* SQL_QUERY_TIMEOUT options */ 288#define SQL_QUERY_TIMEOUT_DEFAULT 0UL | |
289 | 459 |
290/* SQL_MAX_ROWS options */ 291#define SQL_MAX_ROWS_DEFAULT 0UL | 460/* 461 * SQLGetConnectAttr - SQL_ODBC_CURSORS 462 */ 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 |
292 | 467 |
293/* SQL_NOSCAN options */ 294#define SQL_NOSCAN_OFF 0UL /* 1.0 FALSE */ 295#define SQL_NOSCAN_ON 1UL /* 1.0 TRUE */ 296#define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF | |
297 | 468 |
298/* SQL_MAX_LENGTH options */ 299#define SQL_MAX_LENGTH_DEFAULT 0UL | 469/* 470 * SQLGetConnectAttr - SQL_OPT_TRACE 471 */ 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 |
300 | 482 |
301/* values for SQL_ATTR_ASYNC_ENABLE */ 302#define SQL_ASYNC_ENABLE_OFF 0UL 303#define SQL_ASYNC_ENABLE_ON 1UL 304#define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF | |
305 | 483 |
306/* SQL_BIND_TYPE options */ 307#define SQL_BIND_BY_COLUMN 0UL 308#define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN /* Default value */ | 484/* 485 * SQLGetConnectAttr - SQL_ATTR_ANSI_APP 486 */ 487#if (ODBCVER >= 0x0351) 488#define SQL_AA_TRUE 1L /* ANSI app */ 489#define SQL_AA_FALSE 0L /* Unicode app */ 490#endif |
309 | 491 |
310/* SQL_CONCURRENCY options */ 311#define SQL_CONCUR_READ_ONLY 1 312#define SQL_CONCUR_LOCK 2 313#define SQL_CONCUR_ROWVER 3 314#define SQL_CONCUR_VALUES 4 315#define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY /* Default value */ | |
316 | 492 |
317/* SQL_CURSOR_TYPE options */ 318#define SQL_CURSOR_FORWARD_ONLY 0UL 319#define SQL_CURSOR_KEYSET_DRIVEN 1UL 320#define SQL_CURSOR_DYNAMIC 2UL 321#define SQL_CURSOR_STATIC 3UL 322#define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY /* Default value */ | 493/* 494 * SQLGetConnectAttr - SQL_ATTR_CONNECTION_DEAD 495 */ 496#define SQL_CD_TRUE 1L /* closed/dead */ 497#define SQL_CD_FALSE 0L /* open/available */ |
323 | 498 |
324/* SQL_ROWSET_SIZE options */ 325#define SQL_ROWSET_SIZE_DEFAULT 1UL | |
326 | 499 |
327/* SQL_KEYSET_SIZE options */ 328#define SQL_KEYSET_SIZE_DEFAULT 0UL | 500/* 501 * SQLGetConnectAttr - SQL_ATTR_DISCONNECT_BEHAVIOR 502 */ 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 */ |
329 | 508 |
330/* SQL_SIMULATE_CURSOR options */ 331#define SQL_SC_NON_UNIQUE 0UL 332#define SQL_SC_TRY_UNIQUE 1UL 333#define SQL_SC_UNIQUE 2UL | |
334 | 509 |
335/* SQL_RETRIEVE_DATA options */ 336#define SQL_RD_OFF 0UL 337#define SQL_RD_ON 1UL 338#define SQL_RD_DEFAULT SQL_RD_ON | 510/* 511 * SQLGetConnectAttr - SQL_ATTR_ENLIST_IN_DTC 512 */ 513#if (ODBCVER >= 0x0300) 514#define SQL_DTC_DONE 0L 515#endif /* ODBCVER >= 0x0300 */ |
339 | 516 |
340/* SQL_USE_BOOKMARKS options */ 341#define SQL_UB_OFF 0UL 342#define SQL_UB_ON 01UL 343#define SQL_UB_DEFAULT SQL_UB_OFF | |
344 | 517 |
345/* New values for SQL_USE_BOOKMARKS attribute */ 346#if (ODBCVER >= 0x0300) 347#define SQL_UB_FIXED SQL_UB_ON 348#define SQL_UB_VARIABLE 2UL 349#endif /* ODBCVER >= 0x0300 */ | 518/* 519 * SQLGetConnectAttr - Unicode drivers 520 */ 521#if (ODBCVER >= 0x0351) 522#define SQL_ATTR_ANSI_APP 115 523#endif |
350 | 524 |
351/* extended descriptor field */ | 525 526/* 527 * SQLGetData 528 */ 529#define SQL_NO_TOTAL (-4) 530 531 532/* 533 * SQLGetDescField - extended descriptor field 534 */ |
352#if (ODBCVER >= 0x0300) | 535#if (ODBCVER >= 0x0300) |
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 | 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 |
363#define SQL_DESC_DATETIME_INTERVAL_PRECISION 26 | 546#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 | 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 |
375#if (ODBCVER >= 0x0350) | 558#if (ODBCVER >= 0x0350) |
376#define SQL_DESC_ROWVER 35 377#endif /* ODBCVER >= 0x0350 */ 378#define SQL_DESC_SCHEMA_NAME SQL_COLUMN_OWNER_NAME 379#define SQL_DESC_SEARCHABLE SQL_COLUMN_SEARCHABLE 380#define SQL_DESC_TYPE_NAME SQL_COLUMN_TYPE_NAME 381#define SQL_DESC_TABLE_NAME SQL_COLUMN_TABLE_NAME 382#define SQL_DESC_UNSIGNED SQL_COLUMN_UNSIGNED 383#define SQL_DESC_UPDATABLE SQL_COLUMN_UPDATABLE 384#endif /* ODBCVER >= 0x0300 */ | 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 */ |
385 386 | 568 569 |
387/* defines for diagnostics fields */ | 570/* 571 * SQLGetDiagField - defines for diagnostics fields 572 */ |
388#if (ODBCVER >= 0x0300) | 573#if (ODBCVER >= 0x0300) |
389#define SQL_DIAG_CURSOR_ROW_COUNT (-1249) 390#define SQL_DIAG_ROW_NUMBER (-1248) 391#define SQL_DIAG_COLUMN_NUMBER (-1247) 392#endif /* 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 */ |
393 | 578 |
394/* SQL extended datatypes */ 395#define SQL_DATE 9 | 579 580/* 581 * SQLGetDiagField - SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER 582 */ |
396#if (ODBCVER >= 0x0300) | 583#if (ODBCVER >= 0x0300) |
397#define SQL_INTERVAL 10 398#endif /* ODBCVER >= 0x0300 */ 399#define SQL_TIME 10 400#define SQL_TIMESTAMP 11 401#define SQL_LONGVARCHAR (-1) 402#define SQL_BINARY (-2) 403#define SQL_VARBINARY (-3) 404#define SQL_LONGVARBINARY (-4) 405#define SQL_BIGINT (-5) 406#define SQL_TINYINT (-6) 407#define SQL_BIT (-7) 408#if (ODBCVER >= 0x0350) 409#define SQL_GUID (-11) 410#endif /* ODBCVER >= 0x0350 */ | 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 |
411 | 589 |
590 |
|
412#if (ODBCVER >= 0x0300) | 591#if (ODBCVER >= 0x0300) |
413/* interval code */ 414#define SQL_CODE_YEAR 1 415#define SQL_CODE_MONTH 2 416#define SQL_CODE_DAY 3 417#define SQL_CODE_HOUR 4 418#define SQL_CODE_MINUTE 5 419#define SQL_CODE_SECOND 6 420#define SQL_CODE_YEAR_TO_MONTH 7 421#define SQL_CODE_DAY_TO_HOUR 8 422#define SQL_CODE_DAY_TO_MINUTE 9 423#define SQL_CODE_DAY_TO_SECOND 10 424#define SQL_CODE_HOUR_TO_MINUTE 11 425#define SQL_CODE_HOUR_TO_SECOND 12 426#define SQL_CODE_MINUTE_TO_SECOND 13 | 592/* 593 * SQLGetEnvAttr - Attributes 594 */ 595#define SQL_ATTR_ODBC_VERSION 200 596#define SQL_ATTR_CONNECTION_POOLING 201 597#define SQL_ATTR_CP_MATCH 202 |
427 | 598 |
428#define SQL_INTERVAL_YEAR (100 + SQL_CODE_YEAR) 429#define SQL_INTERVAL_MONTH (100 + SQL_CODE_MONTH) 430#define SQL_INTERVAL_DAY (100 + SQL_CODE_DAY) 431#define SQL_INTERVAL_HOUR (100 + SQL_CODE_HOUR) 432#define SQL_INTERVAL_MINUTE (100 + SQL_CODE_MINUTE) 433#define SQL_INTERVAL_SECOND (100 + SQL_CODE_SECOND) 434#define SQL_INTERVAL_YEAR_TO_MONTH (100 + SQL_CODE_YEAR_TO_MONTH) 435#define SQL_INTERVAL_DAY_TO_HOUR (100 + SQL_CODE_DAY_TO_HOUR) 436#define SQL_INTERVAL_DAY_TO_MINUTE (100 + SQL_CODE_DAY_TO_MINUTE) 437#define SQL_INTERVAL_DAY_TO_SECOND (100 + SQL_CODE_DAY_TO_SECOND) 438#define SQL_INTERVAL_HOUR_TO_MINUTE (100 + SQL_CODE_HOUR_TO_MINUTE) 439#define SQL_INTERVAL_HOUR_TO_SECOND (100 + SQL_CODE_HOUR_TO_SECOND) 440#define SQL_INTERVAL_MINUTE_TO_SECOND (100 + SQL_CODE_MINUTE_TO_SECOND) | |
441 | 599 |
442#else 443#define SQL_INTERVAL_YEAR (-80) 444#define SQL_INTERVAL_MONTH (-81) 445#define SQL_INTERVAL_YEAR_TO_MONTH (-82) 446#define SQL_INTERVAL_DAY (-83) 447#define SQL_INTERVAL_HOUR (-84) 448#define SQL_INTERVAL_MINUTE (-85) 449#define SQL_INTERVAL_SECOND (-86) 450#define SQL_INTERVAL_DAY_TO_HOUR (-87) 451#define SQL_INTERVAL_DAY_TO_MINUTE (-88) 452#define SQL_INTERVAL_DAY_TO_SECOND (-89) 453#define SQL_INTERVAL_HOUR_TO_MINUTE (-90) 454#define SQL_INTERVAL_HOUR_TO_SECOND (-91) 455#define SQL_INTERVAL_MINUTE_TO_SECOND (-92) 456#endif /* ODBCVER >= 0x0300 */ | 600/* 601 * SQLGetEnvAttr - SQL_ATTR_ODBC_VERSION 602 */ 603#define SQL_OV_ODBC2 2UL 604#define SQL_OV_ODBC3 3UL |
457 458 | 605 606 |
459#if (ODBCVER <= 0x0300) 460#define SQL_UNICODE (-95) 461#define SQL_UNICODE_VARCHAR (-96) 462#define SQL_UNICODE_LONGVARCHAR (-97) 463#define SQL_UNICODE_CHAR SQL_UNICODE 464#else 465/* The previous definitions for SQL_UNICODE_ are historical and obsolete */ | 607/* 608 * SQLGetEnvAttr - SQL_ATTR_CONNECTION_POOLING 609 */ 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 |
466 | 614 |
467#define SQL_UNICODE SQL_WCHAR 468#define SQL_UNICODE_VARCHAR SQL_WVARCHAR 469#define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR 470#define SQL_UNICODE_CHAR SQL_WCHAR 471#endif | |
472 | 615 |
473#if (ODBCVER < 0x0300) 474#define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR 475#define SQL_TYPE_DRIVER_END SQL_UNICODE_LONGVARCHAR 476#endif /* ODBCVER < 0x0300 */ | 616/* 617 * SQLGetEnvAttr - SQL_ATTR_CP_MATCH 618 */ 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 */ |
477 | 623 |
478/* C datatype to SQL datatype mapping SQL types 479 ------------------- */ 480#define SQL_C_CHAR SQL_CHAR /* CHAR, VARCHAR, DECIMAL, NUMERIC */ 481#define SQL_C_LONG SQL_INTEGER /* INTEGER */ 482#define SQL_C_SHORT SQL_SMALLINT /* SMALLINT */ 483#define SQL_C_FLOAT SQL_REAL /* REAL */ 484#define SQL_C_DOUBLE SQL_DOUBLE /* FLOAT, DOUBLE */ | 624 625/* 626 * SQLGetFunctions - extensions to the X/Open specification 627 */ |
485#if (ODBCVER >= 0x0300) | 628#if (ODBCVER >= 0x0300) |
486#define SQL_C_NUMERIC SQL_NUMERIC 487#endif /* ODBCVER >= 0x0300 */ 488#define SQL_C_DEFAULT 99 | 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 |
489 | 651 |
490#define SQL_SIGNED_OFFSET (-20) 491#define SQL_UNSIGNED_OFFSET (-22) | |
492 | 652 |
493/* C datatype to SQL datatype mapping */ 494#define SQL_C_DATE SQL_DATE 495#define SQL_C_TIME SQL_TIME 496#define SQL_C_TIMESTAMP SQL_TIMESTAMP | 653/* 654 * These are not useful anymore as the X/Open specification defines 655 * functions in the 10000 range 656 */ 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 */ 663 664 665/* 666 * SQLGetFunctions - ODBC version 2.x and earlier 667 */ 668#define SQL_API_ALL_FUNCTIONS 0 669 670 671/* 672 * Loading by ordinal is not supported for 3.0 and above drivers 673 */ 674#define SQL_API_LOADBYORDINAL 199 675 676 677/* 678 * SQLGetFunctions - SQL_API_ODBC3_ALL_FUNCTIONS 679 */ |
497#if (ODBCVER >= 0x0300) | 680#if (ODBCVER >= 0x0300) |
498#define SQL_C_TYPE_DATE SQL_TYPE_DATE 499#define SQL_C_TYPE_TIME SQL_TYPE_TIME 500#define SQL_C_TYPE_TIMESTAMP SQL_TYPE_TIMESTAMP 501#define SQL_C_INTERVAL_YEAR SQL_INTERVAL_YEAR 502#define SQL_C_INTERVAL_MONTH SQL_INTERVAL_MONTH 503#define SQL_C_INTERVAL_DAY SQL_INTERVAL_DAY 504#define SQL_C_INTERVAL_HOUR SQL_INTERVAL_HOUR 505#define SQL_C_INTERVAL_MINUTE SQL_INTERVAL_MINUTE 506#define SQL_C_INTERVAL_SECOND SQL_INTERVAL_SECOND 507#define SQL_C_INTERVAL_YEAR_TO_MONTH SQL_INTERVAL_YEAR_TO_MONTH 508#define SQL_C_INTERVAL_DAY_TO_HOUR SQL_INTERVAL_DAY_TO_HOUR 509#define SQL_C_INTERVAL_DAY_TO_MINUTE SQL_INTERVAL_DAY_TO_MINUTE 510#define SQL_C_INTERVAL_DAY_TO_SECOND SQL_INTERVAL_DAY_TO_SECOND 511#define SQL_C_INTERVAL_HOUR_TO_MINUTE SQL_INTERVAL_HOUR_TO_MINUTE 512#define SQL_C_INTERVAL_HOUR_TO_SECOND SQL_INTERVAL_HOUR_TO_SECOND 513#define SQL_C_INTERVAL_MINUTE_TO_SECOND SQL_INTERVAL_MINUTE_TO_SECOND 514#endif /* ODBCVER >= 0x0300 */ 515#define SQL_C_BINARY SQL_BINARY 516#define SQL_C_BIT SQL_BIT 517#if (ODBCVER >= 0x0300) 518#define SQL_C_SBIGINT (SQL_BIGINT+SQL_SIGNED_OFFSET) /* SIGNED BIGINT */ 519#define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED BIGINT */ 520#endif /* ODBCVER >= 0x0300 */ 521#define SQL_C_TINYINT SQL_TINYINT 522#define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET) /* SIGNED INTEGER */ 523#define SQL_C_SSHORT (SQL_C_SHORT+SQL_SIGNED_OFFSET) /* SIGNED SMALLINT */ 524#define SQL_C_STINYINT (SQL_TINYINT+SQL_SIGNED_OFFSET) /* SIGNED TINYINT */ 525#define SQL_C_ULONG (SQL_C_LONG+SQL_UNSIGNED_OFFSET) /* UNSIGNED INTEGER*/ 526#define SQL_C_USHORT (SQL_C_SHORT+SQL_UNSIGNED_OFFSET) /* UNSIGNED SMALLINT*/ 527#define SQL_C_UTINYINT (SQL_TINYINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED TINYINT*/ | 681#define SQL_API_ODBC3_ALL_FUNCTIONS 999 682#define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250 |
528 | 683 |
529#if (ODBCVER >= 0x0300) && (SIZEOF_LONG_INT == 8) && !defined(BUILD_LEGACY_64_BIT_MODE) 530#define SQL_C_BOOKMARK SQL_C_UBIGINT /* BOOKMARK */ 531#else 532#define SQL_C_BOOKMARK SQL_C_ULONG /* BOOKMARK */ 533#endif | 684#define SQL_FUNC_EXISTS(pfExists, uwAPI) \ 685 ((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) & (1 << ((uwAPI) & 0x000F))) \ 686 ? SQL_TRUE : SQL_FALSE) 687#endif /* ODBCVER >= 0x0300 */ |
534 | 688 |
535#if (ODBCVER >= 0x0350) 536#define SQL_C_GUID SQL_GUID 537#endif /* ODBCVER >= 0x0350 */ | |
538 | 689 |
539#define SQL_TYPE_NULL 0 | 690/* 691 * SQLGetInfo - ODBC 2.x extensions to the X/Open standard 692 */ 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 773 774#if (ODBCVER >= 0x0201 && ODBCVER < 0x0300) 775#define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */ 776#endif /* ODBCVER >= 0x0201 && ODBCVER < 0x0300 */ 777 778 779/* 780 * These values are not useful anymore as X/Open defines values in the 781 * 10000 range 782 */ |
540#if (ODBCVER < 0x0300) | 783#if (ODBCVER < 0x0300) |
541#define SQL_TYPE_MIN SQL_BIT 542#define SQL_TYPE_MAX SQL_VARCHAR 543#endif | 784#define SQL_INFO_LAST SQL_QUALIFIER_LOCATION 785#define SQL_INFO_DRIVER_START 1000 786#endif /* ODBCVER < 0x0300 */ |
544 | 787 |
545#if (ODBCVER >= 0x0300) 546#define SQL_C_VARBOOKMARK SQL_C_BINARY 547#endif /* ODBCVER >= 0x0300 */ | |
548 | 788 |
549/* define for SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER */ | 789/* 790 * SQLGetInfo - ODBC 3.x extensions to the X/Open standard 791 */ |
550#if (ODBCVER >= 0x0300) | 792#if (ODBCVER >= 0x0300) |
551#define SQL_NO_ROW_NUMBER (-1) 552#define SQL_NO_COLUMN_NUMBER (-1) 553#define SQL_ROW_NUMBER_UNKNOWN (-2) 554#define SQL_COLUMN_NUMBER_UNKNOWN (-2) 555#endif | 793#define SQL_ACTIVE_ENVIRONMENTS 116 794#define SQL_ALTER_DOMAIN 117 |
556 | 795 |
557/* SQLBindParameter extensions */ 558#define SQL_DEFAULT_PARAM (-5) 559#define SQL_IGNORE (-6) 560#if (ODBCVER >= 0x0300) 561#define SQL_COLUMN_IGNORE SQL_IGNORE 562#endif /* ODBCVER >= 0x0300 */ 563#define SQL_LEN_DATA_AT_EXEC_OFFSET (-100) 564#define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET) | 796#define SQL_SQL_CONFORMANCE 118 797#define SQL_DATETIME_LITERALS 119 |
565 | 798 |
566/* binary length for driver specific attributes */ 567#define SQL_LEN_BINARY_ATTR_OFFSET (-100) 568#define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET) | 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 |
569 | 856 |
570/* Defines used by Driver Manager when mapping SQLSetParam to SQLBindParameter 571*/ 572#define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT 573#define SQL_SETPARAM_VALUE_MAX (-1L) | 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_UNION_STATEMENT SQL_UNION |
574 | 862 |
575/* SQLColAttributes defines */ 576#define SQL_COLUMN_COUNT 0 577#define SQL_COLUMN_NAME 1 578#define SQL_COLUMN_TYPE 2 579#define SQL_COLUMN_LENGTH 3 580#define SQL_COLUMN_PRECISION 4 581#define SQL_COLUMN_SCALE 5 582#define SQL_COLUMN_DISPLAY_SIZE 6 583#define SQL_COLUMN_NULLABLE 7 584#define SQL_COLUMN_UNSIGNED 8 585#define SQL_COLUMN_MONEY 9 586#define SQL_COLUMN_UPDATABLE 10 587#define SQL_COLUMN_AUTO_INCREMENT 11 588#define SQL_COLUMN_CASE_SENSITIVE 12 589#define SQL_COLUMN_SEARCHABLE 13 590#define SQL_COLUMN_TYPE_NAME 14 591#define SQL_COLUMN_TABLE_NAME 15 592#define SQL_COLUMN_OWNER_NAME 16 593#define SQL_COLUMN_QUALIFIER_NAME 17 594#define SQL_COLUMN_LABEL 18 595#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL 596#if (ODBCVER < 0x0300) 597#define SQL_COLUMN_DRIVER_START 1000 598#endif /* ODBCVER < 0x0300 */ | 863#endif /* ODBCVER >= 0x0300 */ |
599 | 864 |
600#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT | 865#define SQL_DTC_TRANSITION_COST 1750 |
601 | 866 |
602/* SQLColAttributes subdefines for SQL_COLUMN_UPDATABLE */ 603#define SQL_ATTR_READONLY 0 604#define SQL_ATTR_WRITE 1 605#define SQL_ATTR_READWRITE_UNKNOWN 2 | |
606 | 867 |
607/* SQLColAttributes subdefines for SQL_COLUMN_SEARCHABLE */ 608/* These are also used by SQLGetInfo */ 609#define SQL_UNSEARCHABLE 0 610#define SQL_LIKE_ONLY 1 611#define SQL_ALL_EXCEPT_LIKE 2 612#define SQL_SEARCHABLE 3 613#define SQL_PRED_SEARCHABLE SQL_SEARCHABLE | 868/* 869 * SQLGetInfo - SQL_AGGREGATE_FUNCTIONS 870 */ 871#if (ODBCVER >= 0x0300) 872#define SQL_AF_AVG 0x00000001L 873#define SQL_AF_COUNT 0x00000002L 874#define SQL_AF_MAX 0x00000004L 875#define SQL_AF_MIN 0x00000008L 876#define SQL_AF_SUM 0x00000010L 877#define SQL_AF_DISTINCT 0x00000020L 878#define SQL_AF_ALL 0x00000040L 879#endif /* ODBCVER >= 0x0300 */ |
614 | 880 |
881/* 882 * SQLGetInfo - SQL_ALTER_DOMAIN 883 */ 884#if (ODBCVER >= 0x0300) 885#define SQL_AD_CONSTRAINT_NAME_DEFINITION 0x00000001L 886#define SQL_AD_ADD_DOMAIN_CONSTRAINT 0x00000002L 887#define SQL_AD_DROP_DOMAIN_CONSTRAINT 0x00000004L 888#define SQL_AD_ADD_DOMAIN_DEFAULT 0x00000008L 889#define SQL_AD_DROP_DOMAIN_DEFAULT 0x00000010L 890#define SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L 891#define SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L 892#define SQL_AD_ADD_CONSTRAINT_DEFERRABLE 0x00000080L 893#define SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE 0x00000100L 894#endif /* ODBCVER >= 0x0300 */ |
|
615 | 895 |
616/* Special return values for SQLGetData */ 617#define SQL_NO_TOTAL (-4) | |
618 | 896 |
619/********************************************/ 620/* SQLGetFunctions: additional values for */ 621/* fFunction to represent functions that */ 622/* are not in the X/Open spec. */ 623/********************************************/ | 897/* 898 * SQLGetInfo - SQL_ALTER_TABLE 899 */ 900#if (ODBCVER >= 0x0300) 901/* 902 * The following 5 bitmasks are defined in sql.h 903 * 904 * #define SQL_AT_ADD_COLUMN 0x00000001L 905 * #define SQL_AT_DROP_COLUMN 0x00000002L 906 * #define SQL_AT_ADD_CONSTRAINT 0x00000008L 907 */ 908#define SQL_AT_ADD_COLUMN_SINGLE 0x00000020L 909#define SQL_AT_ADD_COLUMN_DEFAULT 0x00000040L 910#define SQL_AT_ADD_COLUMN_COLLATION 0x00000080L 911#define SQL_AT_SET_COLUMN_DEFAULT 0x00000100L 912#define SQL_AT_DROP_COLUMN_DEFAULT 0x00000200L 913#define SQL_AT_DROP_COLUMN_CASCADE 0x00000400L 914#define SQL_AT_DROP_COLUMN_RESTRICT 0x00000800L 915#define SQL_AT_ADD_TABLE_CONSTRAINT 0x00001000L 916#define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE 0x00002000L 917#define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT 0x00004000L 918#define SQL_AT_CONSTRAINT_NAME_DEFINITION 0x00008000L 919#define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED 0x00010000L 920#define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00020000L 921#define SQL_AT_CONSTRAINT_DEFERRABLE 0x00040000L 922#define SQL_AT_CONSTRAINT_NON_DEFERRABLE 0x00080000L 923#endif /* ODBCVER >= 0x0300 */ |
624 | 924 |
925 926/* 927 * SQLGetInfo - SQL_ASYNC_MODE 928 */ |
|
625#if (ODBCVER >= 0x0300) | 929#if (ODBCVER >= 0x0300) |
626#define SQL_API_SQLALLOCHANDLESTD 73 627#define SQL_API_SQLBULKOPERATIONS 24 628#endif /* ODBCVER >= 0x0300 */ 629#define SQL_API_SQLBINDPARAMETER 72 630#define SQL_API_SQLBROWSECONNECT 55 631#define SQL_API_SQLCOLATTRIBUTES 6 632#define SQL_API_SQLCOLUMNPRIVILEGES 56 633#define SQL_API_SQLDESCRIBEPARAM 58 634#define SQL_API_SQLDRIVERCONNECT 41 635#define SQL_API_SQLDRIVERS 71 636#define SQL_API_SQLEXTENDEDFETCH 59 637#define SQL_API_SQLFOREIGNKEYS 60 638#define SQL_API_SQLMORERESULTS 61 639#define SQL_API_SQLNATIVESQL 62 640#define SQL_API_SQLNUMPARAMS 63 641#define SQL_API_SQLPARAMOPTIONS 64 642#define SQL_API_SQLPRIMARYKEYS 65 643#define SQL_API_SQLPROCEDURECOLUMNS 66 644#define SQL_API_SQLPROCEDURES 67 645#define SQL_API_SQLSETPOS 68 646#define SQL_API_SQLSETSCROLLOPTIONS 69 647#define SQL_API_SQLTABLEPRIVILEGES 70 | 930#define SQL_AM_NONE 0 931#define SQL_AM_CONNECTION 1 932#define SQL_AM_STATEMENT 2 933#endif /* ODBCVER >= 0x0300 */ |
648 | 934 |
649/*-------------------------------------------*/ 650/* SQL_EXT_API_LAST is not useful with ODBC */ 651/* version 3.0 because some of the values */ 652/* from X/Open are in the 10000 range. */ 653/*-------------------------------------------*/ | |
654 | 935 |
655#if (ODBCVER < 0x0300) 656#define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER 657#define SQL_NUM_FUNCTIONS 23 658#define SQL_EXT_API_START 40 659#define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1) 660#endif | 936/* 937 * SQLGetInfo - SQL_BATCH_ROW_COUNT 938 */ 939#if (ODBCVER >= 0x0300) 940#define SQL_BRC_PROCEDURES 0x0000001 941#define SQL_BRC_EXPLICIT 0x0000002 942#define SQL_BRC_ROLLED_UP 0x0000004 943#endif /* ODBCVER >= 0x0300 */ |
661 | 944 |
662/*--------------------------------------------*/ 663/* SQL_API_ALL_FUNCTIONS returns an array */ 664/* of 'booleans' representing whether a */ 665/* function is implemented by the driver. */ 666/* */ 667/* CAUTION: Only functions defined in ODBC */ 668/* version 2.0 and earlier are returned, the */ 669/* new high-range function numbers defined by */ 670/* X/Open break this scheme. See the new */ 671/* method -- SQL_API_ODBC3_ALL_FUNCTIONS */ 672/*--------------------------------------------*/ | |
673 | 945 |
674#define SQL_API_ALL_FUNCTIONS 0 /* See CAUTION above */ | 946/* 947 * SQLGetInfo - SQL_BATCH_SUPPORT 948 */ 949#if (ODBCVER >= 0x0300) 950#define SQL_BS_SELECT_EXPLICIT 0x00000001L 951#define SQL_BS_ROW_COUNT_EXPLICIT 0x00000002L 952#define SQL_BS_SELECT_PROC 0x00000004L 953#define SQL_BS_ROW_COUNT_PROC 0x00000008L 954#endif /* ODBCVER >= 0x0300 */ |
675 | 955 |
676/*----------------------------------------------*/ 677/* 2.X drivers export a dummy function with */ 678/* ordinal number SQL_API_LOADBYORDINAL to speed*/ 679/* loading under the windows operating system. */ 680/* */ 681/* CAUTION: Loading by ordinal is not supported */ 682/* for 3.0 and above drivers. */ 683/*----------------------------------------------*/ | |
684 | 956 |
685#define SQL_API_LOADBYORDINAL 199 /* See CAUTION above */ | 957/* 958 * SQLGetInfo - SQL_BOOKMARK_PERSISTENCE 959 */ 960#define SQL_BP_CLOSE 0x00000001L 961#define SQL_BP_DELETE 0x00000002L 962#define SQL_BP_DROP 0x00000004L 963#define SQL_BP_TRANSACTION 0x00000008L 964#define SQL_BP_UPDATE 0x00000010L 965#define SQL_BP_OTHER_HSTMT 0x00000020L 966#define SQL_BP_SCROLL 0x00000040L |
686 | 967 |
687/*----------------------------------------------*/ 688/* SQL_API_ODBC3_ALL_FUNCTIONS */ 689/* This returns a bitmap, which allows us to */ 690/* handle the higher-valued function numbers. */ 691/* Use SQL_FUNC_EXISTS(bitmap,function_number) */ 692/* to determine if the function exists. */ 693/*----------------------------------------------*/ | |
694 | 968 |
969/* 970 * SQLGetInfo - SQL_CATALOG_LOCATION 971 */ 972#if (ODBCVER >= 0x0300) 973#define SQL_CL_START SQL_QL_START 974#define SQL_CL_END SQL_QL_END 975#endif /* ODBCVER >= 0x0300 */ |
|
695 | 976 |
977 978/* 979 * SQLGetInfo - SQL_CATALOG_USAGE 980 */ |
|
696#if (ODBCVER >= 0x0300) | 981#if (ODBCVER >= 0x0300) |
697#define SQL_API_ODBC3_ALL_FUNCTIONS 999 698#define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250 /* array of 250 words */ | 982#define SQL_CU_DML_STATEMENTS SQL_QU_DML_STATEMENTS 983#define SQL_CU_PROCEDURE_INVOCATION SQL_QU_PROCEDURE_INVOCATION 984#define SQL_CU_TABLE_DEFINITION SQL_QU_TABLE_DEFINITION 985#define SQL_CU_INDEX_DEFINITION SQL_QU_INDEX_DEFINITION 986#define SQL_CU_PRIVILEGE_DEFINITION SQL_QU_PRIVILEGE_DEFINITION 987#endif /* ODBCVER >= 0x0300 */ |
699 700 | 988 989 |
701#define SQL_FUNC_EXISTS(pfExists, uwAPI) ((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) & (1 << ((uwAPI) & 0x000F)) ) ? SQL_TRUE : SQL_FALSE ) | 990/* 991 * SQLGetInfo - SQL_CONCAT_NULL_BEHAVIOR 992 */ 993#define SQL_CB_NULL 0x0000 994#define SQL_CB_NON_NULL 0x0001 |
702 | 995 |
703#endif /* ODBCVER >= 0x0300 */ | |
704 | 996 |
997/* 998 * SQLGetInfo - SQL_CONVERT_* bitmask values 999 */ 1000#define SQL_CVT_CHAR 0x00000001L 1001#define SQL_CVT_NUMERIC 0x00000002L 1002#define SQL_CVT_DECIMAL 0x00000004L 1003#define SQL_CVT_INTEGER 0x00000008L 1004#define SQL_CVT_SMALLINT 0x00000010L 1005#define SQL_CVT_FLOAT 0x00000020L 1006#define SQL_CVT_REAL 0x00000040L 1007#define SQL_CVT_DOUBLE 0x00000080L 1008#define SQL_CVT_VARCHAR 0x00000100L 1009#define SQL_CVT_LONGVARCHAR 0x00000200L 1010#define SQL_CVT_BINARY 0x00000400L 1011#define SQL_CVT_VARBINARY 0x00000800L 1012#define SQL_CVT_BIT 0x00001000L 1013#define SQL_CVT_TINYINT 0x00002000L 1014#define SQL_CVT_BIGINT 0x00004000L 1015#define SQL_CVT_DATE 0x00008000L 1016#define SQL_CVT_TIME 0x00010000L 1017#define SQL_CVT_TIMESTAMP 0x00020000L 1018#define SQL_CVT_LONGVARBINARY 0x00040000L 1019#if (ODBCVER >= 0x0300) 1020#define SQL_CVT_INTERVAL_YEAR_MONTH 0x00080000L 1021#define SQL_CVT_INTERVAL_DAY_TIME 0x00100000L 1022#define SQL_CVT_WCHAR 0x00200000L 1023#define SQL_CVT_WLONGVARCHAR 0x00400000L 1024#define SQL_CVT_WVARCHAR 0x00800000L 1025#endif /* ODBCVER >= 0x0300 */ |
|
705 | 1026 |
706/************************************************/ 707/* Extended definitions for SQLGetInfo */ 708/************************************************/ | |
709 | 1027 |
710/*---------------------------------*/ 711/* Values in ODBC 2.0 that are not */ 712/* in the X/Open spec */ 713/*---------------------------------*/ | 1028/* 1029 * SQLGetInfo - SQL_CONVERT_FUNCTIONS 1030 */ 1031#define SQL_FN_CVT_CONVERT 0x00000001L 1032#if (ODBCVER >= 0x0300) 1033#define SQL_FN_CVT_CAST 0x00000002L 1034#endif /* ODBCVER >= 0x0300 */ |
714 | 1035 |
715#define SQL_INFO_FIRST 0 716#define SQL_ACTIVE_CONNECTIONS 0 /* MAX_DRIVER_CONNECTIONS */ 717#define SQL_ACTIVE_STATEMENTS 1 /* MAX_CONCURRENT_ACTIVITIES */ 718#define SQL_DRIVER_HDBC 3 719#define SQL_DRIVER_HENV 4 720#define SQL_DRIVER_HSTMT 5 721#define SQL_DRIVER_NAME 6 722#define SQL_DRIVER_VER 7 723#define SQL_ODBC_API_CONFORMANCE 9 724#define SQL_ODBC_VER 10 725#define SQL_ROW_UPDATES 11 726#define SQL_ODBC_SAG_CLI_CONFORMANCE 12 727#define SQL_ODBC_SQL_CONFORMANCE 15 728#define SQL_PROCEDURES 21 729#define SQL_CONCAT_NULL_BEHAVIOR 22 730#define SQL_CURSOR_ROLLBACK_BEHAVIOR 24 731#define SQL_EXPRESSIONS_IN_ORDERBY 27 732#define SQL_MAX_OWNER_NAME_LEN 32 /* MAX_SCHEMA_NAME_LEN */ 733#define SQL_MAX_PROCEDURE_NAME_LEN 33 734#define SQL_MAX_QUALIFIER_NAME_LEN 34 /* MAX_CATALOG_NAME_LEN */ 735#define SQL_MULT_RESULT_SETS 36 736#define SQL_MULTIPLE_ACTIVE_TXN 37 737#define SQL_OUTER_JOINS 38 738#define SQL_OWNER_TERM 39 739#define SQL_PROCEDURE_TERM 40 740#define SQL_QUALIFIER_NAME_SEPARATOR 41 741#define SQL_QUALIFIER_TERM 42 742#define SQL_SCROLL_OPTIONS 44 743#define SQL_TABLE_TERM 45 744#define SQL_CONVERT_FUNCTIONS 48 745#define SQL_NUMERIC_FUNCTIONS 49 746#define SQL_STRING_FUNCTIONS 50 747#define SQL_SYSTEM_FUNCTIONS 51 748#define SQL_TIMEDATE_FUNCTIONS 52 749#define SQL_CONVERT_BIGINT 53 750#define SQL_CONVERT_BINARY 54 751#define SQL_CONVERT_BIT 55 752#define SQL_CONVERT_CHAR 56 753#define SQL_CONVERT_DATE 57 754#define SQL_CONVERT_DECIMAL 58 755#define SQL_CONVERT_DOUBLE 59 756#define SQL_CONVERT_FLOAT 60 757#define SQL_CONVERT_INTEGER 61 758#define SQL_CONVERT_LONGVARCHAR 62 759#define SQL_CONVERT_NUMERIC 63 760#define SQL_CONVERT_REAL 64 761#define SQL_CONVERT_SMALLINT 65 762#define SQL_CONVERT_TIME 66 763#define SQL_CONVERT_TIMESTAMP 67 764#define SQL_CONVERT_TINYINT 68 765#define SQL_CONVERT_VARBINARY 69 766#define SQL_CONVERT_VARCHAR 70 767#define SQL_CONVERT_LONGVARBINARY 71 768#define SQL_CONVERT_GUID 173 769#define SQL_ODBC_SQL_OPT_IEF 73 /* SQL_INTEGRITY */ 770#define SQL_CORRELATION_NAME 74 771#define SQL_NON_NULLABLE_COLUMNS 75 772#define SQL_DRIVER_HLIB 76 773#define SQL_DRIVER_ODBC_VER 77 774#define SQL_LOCK_TYPES 78 775#define SQL_POS_OPERATIONS 79 776#define SQL_POSITIONED_STATEMENTS 80 777#define SQL_BOOKMARK_PERSISTENCE 82 778#define SQL_STATIC_SENSITIVITY 83 779#define SQL_FILE_USAGE 84 780#define SQL_COLUMN_ALIAS 87 781#define SQL_GROUP_BY 88 782#define SQL_KEYWORDS 89 783#define SQL_OWNER_USAGE 91 784#define SQL_QUALIFIER_USAGE 92 785#define SQL_QUOTED_IDENTIFIER_CASE 93 786#define SQL_SUBQUERIES 95 787#define SQL_UNION 96 788#define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103 789#define SQL_MAX_CHAR_LITERAL_LEN 108 790#define SQL_TIMEDATE_ADD_INTERVALS 109 791#define SQL_TIMEDATE_DIFF_INTERVALS 110 792#define SQL_NEED_LONG_DATA_LEN 111 793#define SQL_MAX_BINARY_LITERAL_LEN 112 794#define SQL_LIKE_ESCAPE_CLAUSE 113 795#define SQL_QUALIFIER_LOCATION 114 | |
796 | 1036 |
797#if (ODBCVER >= 0x0201 && ODBCVER < 0x0300) 798#ifndef SQL_OJ_CAPABILITIES 799#define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */ 800#endif 801#endif /* ODBCVER >= 0x0201 && ODBCVER < 0x0300 */ | 1037/* 1038 * SQLGetInfo - SQL_CORRELATION_NAME 1039 */ 1040#define SQL_CN_NONE 0x0000 1041#define SQL_CN_DIFFERENT 0x0001 1042#define SQL_CN_ANY 0x0002 |
802 | 1043 |
803/*----------------------------------------------*/ 804/* SQL_INFO_LAST and SQL_INFO_DRIVER_START are */ 805/* not useful anymore, because X/Open has */ 806/* values in the 10000 range. You */ 807/* must contact X/Open directly to get a range */ 808/* of numbers for driver-specific values. */ 809/*----------------------------------------------*/ | |
810 | 1044 |
811#if (ODBCVER < 0x0300) 812#define SQL_INFO_LAST SQL_QUALIFIER_LOCATION 813#define SQL_INFO_DRIVER_START 1000 814#endif /* ODBCVER < 0x0300 */ | 1045/* 1046 * SQLGetInfo - SQL_CREATE_ASSERTION 1047 */ 1048#if (ODBCVER >= 0x0300) 1049#define SQL_CA_CREATE_ASSERTION 0x00000001L 1050#define SQL_CA_CONSTRAINT_INITIALLY_DEFERRED 0x00000010L 1051#define SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000020L 1052#define SQL_CA_CONSTRAINT_DEFERRABLE 0x00000040L 1053#define SQL_CA_CONSTRAINT_NON_DEFERRABLE 0x00000080L 1054#endif /* ODBCVER >= 0x0300 */ |
815 | 1055 |
816/*-----------------------------------------------*/ 817/* ODBC 3.0 SQLGetInfo values that are not part */ 818/* of the X/Open standard at this time. X/Open */ 819/* standard values are in sql.h. */ 820/*-----------------------------------------------*/ | |
821 | 1056 |
1057/* 1058 * SQLGetInfo - SQL_CREATE_CHARACTER_SET 1059 */ |
|
822#if (ODBCVER >= 0x0300) | 1060#if (ODBCVER >= 0x0300) |
823#define SQL_ACTIVE_ENVIRONMENTS 116 824#define SQL_ALTER_DOMAIN 117 | 1061#define SQL_CCS_CREATE_CHARACTER_SET 0x00000001L 1062#define SQL_CCS_COLLATE_CLAUSE 0x00000002L 1063#define SQL_CCS_LIMITED_COLLATION 0x00000004L 1064#endif /* ODBCVER >= 0x0300 */ |
825 | 1065 |
826#define SQL_SQL_CONFORMANCE 118 827#define SQL_DATETIME_LITERALS 119 | |
828 | 1066 |
829#define SQL_ASYNC_MODE 10021 /* new X/Open spec */ 830#define SQL_BATCH_ROW_COUNT 120 831#define SQL_BATCH_SUPPORT 121 832#define SQL_CATALOG_LOCATION SQL_QUALIFIER_LOCATION 833#define SQL_CATALOG_NAME_SEPARATOR SQL_QUALIFIER_NAME_SEPARATOR 834#define SQL_CATALOG_TERM SQL_QUALIFIER_TERM 835#define SQL_CATALOG_USAGE SQL_QUALIFIER_USAGE 836#define SQL_CONVERT_WCHAR 122 837#define SQL_CONVERT_INTERVAL_DAY_TIME 123 838#define SQL_CONVERT_INTERVAL_YEAR_MONTH 124 839#define SQL_CONVERT_WLONGVARCHAR 125 840#define SQL_CONVERT_WVARCHAR 126 841#define SQL_CREATE_ASSERTION 127 842#define SQL_CREATE_CHARACTER_SET 128 843#define SQL_CREATE_COLLATION 129 844#define SQL_CREATE_DOMAIN 130 845#define SQL_CREATE_SCHEMA 131 846#define SQL_CREATE_TABLE 132 847#define SQL_CREATE_TRANSLATION 133 848#define SQL_CREATE_VIEW 134 849#define SQL_DRIVER_HDESC 135 850#define SQL_DROP_ASSERTION 136 851#define SQL_DROP_CHARACTER_SET 137 852#define SQL_DROP_COLLATION 138 853#define SQL_DROP_DOMAIN 139 854#define SQL_DROP_SCHEMA 140 855#define SQL_DROP_TABLE 141 856#define SQL_DROP_TRANSLATION 142 857#define SQL_DROP_VIEW 143 858#define SQL_DYNAMIC_CURSOR_ATTRIBUTES1 144 859#define SQL_DYNAMIC_CURSOR_ATTRIBUTES2 145 860#define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 146 861#define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 147 862#define SQL_INDEX_KEYWORDS 148 863#define SQL_INFO_SCHEMA_VIEWS 149 864#define SQL_KEYSET_CURSOR_ATTRIBUTES1 150 865#define SQL_KEYSET_CURSOR_ATTRIBUTES2 151 866#define SQL_MAX_ASYNC_CONCURRENT_STATEMENTS 10022 /* new X/Open spec */ 867#define SQL_ODBC_INTERFACE_CONFORMANCE 152 868#define SQL_PARAM_ARRAY_ROW_COUNTS 153 869#define SQL_PARAM_ARRAY_SELECTS 154 870#define SQL_SCHEMA_TERM SQL_OWNER_TERM 871#define SQL_SCHEMA_USAGE SQL_OWNER_USAGE 872#define SQL_SQL92_DATETIME_FUNCTIONS 155 873#define SQL_SQL92_FOREIGN_KEY_DELETE_RULE 156 874#define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE 157 875#define SQL_SQL92_GRANT 158 876#define SQL_SQL92_NUMERIC_VALUE_FUNCTIONS 159 877#define SQL_SQL92_PREDICATES 160 878#define SQL_SQL92_RELATIONAL_JOIN_OPERATORS 161 879#define SQL_SQL92_REVOKE 162 880#define SQL_SQL92_ROW_VALUE_CONSTRUCTOR 163 881#define SQL_SQL92_STRING_FUNCTIONS 164 882#define SQL_SQL92_VALUE_EXPRESSIONS 165 883#define SQL_STANDARD_CLI_CONFORMANCE 166 884#define SQL_STATIC_CURSOR_ATTRIBUTES1 167 885#define SQL_STATIC_CURSOR_ATTRIBUTES2 168 | 1067/* 1068 * SQLGetInfo - SQL_CREATE_COLLATION 1069 */ 1070#if (ODBCVER >= 0x0300) 1071#define SQL_CCOL_CREATE_COLLATION 0x00000001L 1072#endif /* ODBCVER >= 0x0300 */ |
886 | 1073 |
887#define SQL_AGGREGATE_FUNCTIONS 169 888#define SQL_DDL_INDEX 170 889#define SQL_DM_VER 171 890#define SQL_INSERT_STATEMENT 172 891#define SQL_UNION_STATEMENT SQL_UNION 892#endif /* ODBCVER >= 0x0300 */ | |
893 | 1074 |
894#define SQL_DTC_TRANSITION_COST 1750 | 1075/* 1076 * SQLGetInfo - SQL_CREATE_DOMAIN 1077 */ 1078#if (ODBCVER >= 0x0300) 1079#define SQL_CDO_CREATE_DOMAIN 0x00000001L 1080#define SQL_CDO_DEFAULT 0x00000002L 1081#define SQL_CDO_CONSTRAINT 0x00000004L 1082#define SQL_CDO_COLLATION 0x00000008L 1083#define SQL_CDO_CONSTRAINT_NAME_DEFINITION 0x00000010L 1084#define SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L 1085#define SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L 1086#define SQL_CDO_CONSTRAINT_DEFERRABLE 0x00000080L 1087#define SQL_CDO_CONSTRAINT_NON_DEFERRABLE 0x00000100L 1088#endif /* ODBCVER >= 0x0300 */ |
895 | 1089 |
896/* SQL_ALTER_TABLE bitmasks */ | 1090 1091/* 1092 * SQLGetInfo - SQL_CREATE_SCHEMA 1093 */ |
897#if (ODBCVER >= 0x0300) | 1094#if (ODBCVER >= 0x0300) |
898/* the following 5 bitmasks are defined in sql.h 899*#define SQL_AT_ADD_COLUMN 0x00000001L 900*#define SQL_AT_DROP_COLUMN 0x00000002L 901*#define SQL_AT_ADD_CONSTRAINT 0x00000008L 902*/ 903#define SQL_AT_ADD_COLUMN_SINGLE 0x00000020L 904#define SQL_AT_ADD_COLUMN_DEFAULT 0x00000040L 905#define SQL_AT_ADD_COLUMN_COLLATION 0x00000080L 906#define SQL_AT_SET_COLUMN_DEFAULT 0x00000100L 907#define SQL_AT_DROP_COLUMN_DEFAULT 0x00000200L 908#define SQL_AT_DROP_COLUMN_CASCADE 0x00000400L 909#define SQL_AT_DROP_COLUMN_RESTRICT 0x00000800L 910#define SQL_AT_ADD_TABLE_CONSTRAINT 0x00001000L 911#define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE 0x00002000L 912#define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT 0x00004000L 913#define SQL_AT_CONSTRAINT_NAME_DEFINITION 0x00008000L 914#define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED 0x00010000L 915#define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00020000L 916#define SQL_AT_CONSTRAINT_DEFERRABLE 0x00040000L 917#define SQL_AT_CONSTRAINT_NON_DEFERRABLE 0x00080000L | 1095#define SQL_CS_CREATE_SCHEMA 0x00000001L 1096#define SQL_CS_AUTHORIZATION 0x00000002L 1097#define SQL_CS_DEFAULT_CHARACTER_SET 0x00000004L |
918#endif /* ODBCVER >= 0x0300 */ 919 | 1098#endif /* ODBCVER >= 0x0300 */ 1099 |
920/* SQL_CONVERT_* return value bitmasks */ | |
921 | 1100 |
922#define SQL_CVT_CHAR 0x00000001L 923#define SQL_CVT_NUMERIC 0x00000002L 924#define SQL_CVT_DECIMAL 0x00000004L 925#define SQL_CVT_INTEGER 0x00000008L 926#define SQL_CVT_SMALLINT 0x00000010L 927#define SQL_CVT_FLOAT 0x00000020L 928#define SQL_CVT_REAL 0x00000040L 929#define SQL_CVT_DOUBLE 0x00000080L 930#define SQL_CVT_VARCHAR 0x00000100L 931#define SQL_CVT_LONGVARCHAR 0x00000200L 932#define SQL_CVT_BINARY 0x00000400L 933#define SQL_CVT_VARBINARY 0x00000800L 934#define SQL_CVT_BIT 0x00001000L 935#define SQL_CVT_TINYINT 0x00002000L 936#define SQL_CVT_BIGINT 0x00004000L 937#define SQL_CVT_DATE 0x00008000L 938#define SQL_CVT_TIME 0x00010000L 939#define SQL_CVT_TIMESTAMP 0x00020000L 940#define SQL_CVT_LONGVARBINARY 0x00040000L | 1101/* 1102 * SQLGetInfo - SQL_CREATE_TABLE 1103 */ |
941#if (ODBCVER >= 0x0300) | 1104#if (ODBCVER >= 0x0300) |
942#define SQL_CVT_INTERVAL_YEAR_MONTH 0x00080000L 943#define SQL_CVT_INTERVAL_DAY_TIME 0x00100000L 944#define SQL_CVT_WCHAR 0x00200000L 945#define SQL_CVT_WLONGVARCHAR 0x00400000L 946#define SQL_CVT_WVARCHAR 0x00800000L 947#define SQL_CVT_GUID 0x01000000L | 1105#define SQL_CT_CREATE_TABLE 0x00000001L 1106#define SQL_CT_COMMIT_PRESERVE 0x00000002L 1107#define SQL_CT_COMMIT_DELETE 0x00000004L 1108#define SQL_CT_GLOBAL_TEMPORARY 0x00000008L 1109#define SQL_CT_LOCAL_TEMPORARY 0x00000010L 1110#define SQL_CT_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L 1111#define SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L 1112#define SQL_CT_CONSTRAINT_DEFERRABLE 0x00000080L 1113#define SQL_CT_CONSTRAINT_NON_DEFERRABLE 0x00000100L 1114#define SQL_CT_COLUMN_CONSTRAINT 0x00000200L 1115#define SQL_CT_COLUMN_DEFAULT 0x00000400L 1116#define SQL_CT_COLUMN_COLLATION 0x00000800L 1117#define SQL_CT_TABLE_CONSTRAINT 0x00001000L 1118#define SQL_CT_CONSTRAINT_NAME_DEFINITION 0x00002000L 1119#endif /* ODBCVER >= 0x0300 */ |
948 | 1120 |
949#endif /* ODBCVER >= 0x0300 */ | |
950 | 1121 |
1122/* 1123 * SQLGetInfo - SQL_CREATE_TRANSLATION 1124 */ 1125#if (ODBCVER >= 0x0300) 1126#define SQL_CTR_CREATE_TRANSLATION 0x00000001L 1127#endif /* ODBCVER >= 0x0300 */ |
|
951 | 1128 |
952/* SQL_CONVERT_FUNCTIONS functions */ 953#define SQL_FN_CVT_CONVERT 0x00000001L | 1129 1130/* 1131 * SQLGetInfo - SQL_CREATE_VIEW 1132 */ 1133#define SQL_CV_CREATE_VIEW 0x00000001L 1134#define SQL_CV_CHECK_OPTION 0x00000002L 1135#define SQL_CV_CASCADED 0x00000004L 1136#define SQL_CV_LOCAL 0x00000008L 1137 1138 1139/* 1140 * SQLGetInfo - SQL_DATETIME_LITERALS 1141 */ |
954#if (ODBCVER >= 0x0300) | 1142#if (ODBCVER >= 0x0300) |
955#define SQL_FN_CVT_CAST 0x00000002L 956#endif /* ODBCVER >= 0x0300 */ | 1143#define SQL_DL_SQL92_DATE 0x00000001L 1144#define SQL_DL_SQL92_TIME 0x00000002L 1145#define SQL_DL_SQL92_TIMESTAMP 0x00000004L 1146#define SQL_DL_SQL92_INTERVAL_YEAR 0x00000008L 1147#define SQL_DL_SQL92_INTERVAL_MONTH 0x00000010L 1148#define SQL_DL_SQL92_INTERVAL_DAY 0x00000020L 1149#define SQL_DL_SQL92_INTERVAL_HOUR 0x00000040L 1150#define SQL_DL_SQL92_INTERVAL_MINUTE 0x00000080L 1151#define SQL_DL_SQL92_INTERVAL_SECOND 0x00000100L 1152#define SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH 0x00000200L 1153#define SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR 0x00000400L 1154#define SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE 0x00000800L 1155#define SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND 0x00001000L 1156#define SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE 0x00002000L 1157#define SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND 0x00004000L 1158#define SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND 0x00008000L 1159#endif /* ODBCVER >= 0x0300 */ |
957 958 | 1160 1161 |
959/* SQL_STRING_FUNCTIONS functions */ | 1162/* 1163 * SQLGetInfo - SQL_DDL_INDEX 1164 */ 1165#if (ODBCVER >= 0x0300) 1166#define SQL_DI_CREATE_INDEX 0x00000001L 1167#define SQL_DI_DROP_INDEX 0x00000002L 1168#endif /* ODBCVER >= 0x0300 */ |
960 | 1169 |
961#define SQL_FN_STR_CONCAT 0x00000001L 962#define SQL_FN_STR_INSERT 0x00000002L 963#define SQL_FN_STR_LEFT 0x00000004L 964#define SQL_FN_STR_LTRIM 0x00000008L 965#define SQL_FN_STR_LENGTH 0x00000010L 966#define SQL_FN_STR_LOCATE 0x00000020L 967#define SQL_FN_STR_LCASE 0x00000040L 968#define SQL_FN_STR_REPEAT 0x00000080L 969#define SQL_FN_STR_REPLACE 0x00000100L 970#define SQL_FN_STR_RIGHT 0x00000200L 971#define SQL_FN_STR_RTRIM 0x00000400L 972#define SQL_FN_STR_SUBSTRING 0x00000800L 973#define SQL_FN_STR_UCASE 0x00001000L 974#define SQL_FN_STR_ASCII 0x00002000L 975#define SQL_FN_STR_CHAR 0x00004000L 976#define SQL_FN_STR_DIFFERENCE 0x00008000L 977#define SQL_FN_STR_LOCATE_2 0x00010000L 978#define SQL_FN_STR_SOUNDEX 0x00020000L 979#define SQL_FN_STR_SPACE 0x00040000L | 1170 1171/* 1172 * SQLGetInfo - SQL_DROP_ASSERTION 1173 */ |
980#if (ODBCVER >= 0x0300) | 1174#if (ODBCVER >= 0x0300) |
981#define SQL_FN_STR_BIT_LENGTH 0x00080000L 982#define SQL_FN_STR_CHAR_LENGTH 0x00100000L 983#define SQL_FN_STR_CHARACTER_LENGTH 0x00200000L 984#define SQL_FN_STR_OCTET_LENGTH 0x00400000L 985#define SQL_FN_STR_POSITION 0x00800000L 986#endif /* ODBCVER >= 0x0300 */ | 1175#define SQL_DA_DROP_ASSERTION 0x00000001L 1176#endif /* ODBCVER >= 0x0300 */ |
987 | 1177 |
988/* SQL_SQL92_STRING_FUNCTIONS */ | 1178 1179/* 1180 * SQLGetInfo - SQL_DROP_CHARACTER_SET 1181 */ |
989#if (ODBCVER >= 0x0300) | 1182#if (ODBCVER >= 0x0300) |
990#define SQL_SSF_CONVERT 0x00000001L 991#define SQL_SSF_LOWER 0x00000002L 992#define SQL_SSF_UPPER 0x00000004L 993#define SQL_SSF_SUBSTRING 0x00000008L 994#define SQL_SSF_TRANSLATE 0x00000010L 995#define SQL_SSF_TRIM_BOTH 0x00000020L 996#define SQL_SSF_TRIM_LEADING 0x00000040L 997#define SQL_SSF_TRIM_TRAILING 0x00000080L 998#endif /* ODBCVER >= 0x0300 */ | 1183#define SQL_DCS_DROP_CHARACTER_SET 0x00000001L 1184#endif /* ODBCVER >= 0x0300 */ |
999 | 1185 |
1000/* SQL_NUMERIC_FUNCTIONS functions */ | |
1001 | 1186 |
1002#define SQL_FN_NUM_ABS 0x00000001L 1003#define SQL_FN_NUM_ACOS 0x00000002L 1004#define SQL_FN_NUM_ASIN 0x00000004L 1005#define SQL_FN_NUM_ATAN 0x00000008L 1006#define SQL_FN_NUM_ATAN2 0x00000010L 1007#define SQL_FN_NUM_CEILING 0x00000020L 1008#define SQL_FN_NUM_COS 0x00000040L 1009#define SQL_FN_NUM_COT 0x00000080L 1010#define SQL_FN_NUM_EXP 0x00000100L 1011#define SQL_FN_NUM_FLOOR 0x00000200L 1012#define SQL_FN_NUM_LOG 0x00000400L 1013#define SQL_FN_NUM_MOD 0x00000800L 1014#define SQL_FN_NUM_SIGN 0x00001000L 1015#define SQL_FN_NUM_SIN 0x00002000L 1016#define SQL_FN_NUM_SQRT 0x00004000L 1017#define SQL_FN_NUM_TAN 0x00008000L 1018#define SQL_FN_NUM_PI 0x00010000L 1019#define SQL_FN_NUM_RAND 0x00020000L 1020#define SQL_FN_NUM_DEGREES 0x00040000L 1021#define SQL_FN_NUM_LOG10 0x00080000L 1022#define SQL_FN_NUM_POWER 0x00100000L 1023#define SQL_FN_NUM_RADIANS 0x00200000L 1024#define SQL_FN_NUM_ROUND 0x00400000L 1025#define SQL_FN_NUM_TRUNCATE 0x00800000L | 1187/* 1188 * SQLGetInfo - SQL_DROP_COLLATION 1189 */ 1190#if (ODBCVER >= 0x0300) 1191#define SQL_DC_DROP_COLLATION 0x00000001L 1192#endif /* ODBCVER >= 0x0300 */ |
1026 | 1193 |
1027/* SQL_SQL92_NUMERIC_VALUE_FUNCTIONS */ | 1194 1195/* 1196 * SQLGetInfo - SQL_DROP_DOMAIN 1197 */ |
1028#if (ODBCVER >= 0x0300) | 1198#if (ODBCVER >= 0x0300) |
1029#define SQL_SNVF_BIT_LENGTH 0x00000001L 1030#define SQL_SNVF_CHAR_LENGTH 0x00000002L 1031#define SQL_SNVF_CHARACTER_LENGTH 0x00000004L 1032#define SQL_SNVF_EXTRACT 0x00000008L 1033#define SQL_SNVF_OCTET_LENGTH 0x00000010L 1034#define SQL_SNVF_POSITION 0x00000020L 1035#endif /* ODBCVER >= 0x0300 */ | 1199#define SQL_DD_DROP_DOMAIN 0x00000001L 1200#define SQL_DD_RESTRICT 0x00000002L 1201#define SQL_DD_CASCADE 0x00000004L 1202#endif /* ODBCVER >= 0x0300 */ |
1036 | 1203 |
1037/* SQL_TIMEDATE_FUNCTIONS functions */ | |
1038 | 1204 |
1039#define SQL_FN_TD_NOW 0x00000001L 1040#define SQL_FN_TD_CURDATE 0x00000002L 1041#define SQL_FN_TD_DAYOFMONTH 0x00000004L 1042#define SQL_FN_TD_DAYOFWEEK 0x00000008L 1043#define SQL_FN_TD_DAYOFYEAR 0x00000010L 1044#define SQL_FN_TD_MONTH 0x00000020L 1045#define SQL_FN_TD_QUARTER 0x00000040L 1046#define SQL_FN_TD_WEEK 0x00000080L 1047#define SQL_FN_TD_YEAR 0x00000100L 1048#define SQL_FN_TD_CURTIME 0x00000200L 1049#define SQL_FN_TD_HOUR 0x00000400L 1050#define SQL_FN_TD_MINUTE 0x00000800L 1051#define SQL_FN_TD_SECOND 0x00001000L 1052#define SQL_FN_TD_TIMESTAMPADD 0x00002000L 1053#define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L 1054#define SQL_FN_TD_DAYNAME 0x00008000L 1055#define SQL_FN_TD_MONTHNAME 0x00010000L | 1205/* 1206 * SQLGetInfo - SQL_DROP_SCHEMA 1207 */ |
1056#if (ODBCVER >= 0x0300) | 1208#if (ODBCVER >= 0x0300) |
1057#define SQL_FN_TD_CURRENT_DATE 0x00020000L 1058#define SQL_FN_TD_CURRENT_TIME 0x00040000L 1059#define SQL_FN_TD_CURRENT_TIMESTAMP 0x00080000L 1060#define SQL_FN_TD_EXTRACT 0x00100000L 1061#endif /* ODBCVER >= 0x0300 */ | 1209#define SQL_DS_DROP_SCHEMA 0x00000001L 1210#define SQL_DS_RESTRICT 0x00000002L 1211#define SQL_DS_CASCADE 0x00000004L 1212#endif /* ODBCVER >= 0x0300 */ |
1062 | 1213 |
1063/* SQL_SQL92_DATETIME_FUNCTIONS */ | 1214 1215/* 1216 * SQLGetInfo - SQL_DROP_TABLE 1217 */ |
1064#if (ODBCVER >= 0x0300) | 1218#if (ODBCVER >= 0x0300) |
1065#define SQL_SDF_CURRENT_DATE 0x00000001L 1066#define SQL_SDF_CURRENT_TIME 0x00000002L 1067#define SQL_SDF_CURRENT_TIMESTAMP 0x00000004L 1068#endif /* ODBCVER >= 0x0300 */ | 1219#define SQL_DT_DROP_TABLE 0x00000001L 1220#define SQL_DT_RESTRICT 0x00000002L 1221#define SQL_DT_CASCADE 0x00000004L 1222#endif /* ODBCVER >= 0x0300 */ |
1069 | 1223 |
1070/* SQL_SYSTEM_FUNCTIONS functions */ | |
1071 | 1224 |
1072#define SQL_FN_SYS_USERNAME 0x00000001L 1073#define SQL_FN_SYS_DBNAME 0x00000002L 1074#define SQL_FN_SYS_IFNULL 0x00000004L | 1225/* 1226 * SQLGetInfo - SQL_DROP_TRANSLATION 1227 */ 1228#if (ODBCVER >= 0x0300) 1229#define SQL_DTR_DROP_TRANSLATION 0x00000001L 1230#endif /* ODBCVER >= 0x0300 */ |
1075 | 1231 |
1076/* SQL_TIMEDATE_ADD_INTERVALS and SQL_TIMEDATE_DIFF_INTERVALS functions */ | |
1077 | 1232 |
1078#define SQL_FN_TSI_FRAC_SECOND 0x00000001L 1079#define SQL_FN_TSI_SECOND 0x00000002L 1080#define SQL_FN_TSI_MINUTE 0x00000004L 1081#define SQL_FN_TSI_HOUR 0x00000008L 1082#define SQL_FN_TSI_DAY 0x00000010L 1083#define SQL_FN_TSI_WEEK 0x00000020L 1084#define SQL_FN_TSI_MONTH 0x00000040L 1085#define SQL_FN_TSI_QUARTER 0x00000080L 1086#define SQL_FN_TSI_YEAR 0x00000100L | 1233/* 1234 * SQLGetInfo - SQL_DROP_VIEW 1235 */ 1236#if (ODBCVER >= 0x0300) 1237#define SQL_DV_DROP_VIEW 0x00000001L 1238#define SQL_DV_RESTRICT 0x00000002L 1239#define SQL_DV_CASCADE 0x00000004L 1240#endif /* ODBCVER >= 0x0300 */ |
1087 | 1241 |
1088/* bitmasks for SQL_DYNAMIC_CURSOR_ATTRIBUTES1, 1089 * SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1, 1090 * SQL_KEYSET_CURSOR_ATTRIBUTES1, and SQL_STATIC_CURSOR_ATTRIBUTES1 | 1242 1243/* 1244 * SQLGetInfo - SQL_DTC_TRANSITION_COST |
1091 */ | 1245 */ |
1246#define SQL_DTC_ENLIST_EXPENSIVE 0x00000001L 1247#define SQL_DTC_UNENLIST_EXPENSIVE 0x00000002L 1248 1249 1250/* 1251 * SQLGetInfo - SQL_DYNAMIC_CURSOR_ATTRIBUTES1 1252 * SQLGetInfo - SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 1253 * SQLGetInfo - SQL_KEYSET_CURSOR_ATTRIBUTES1 1254 * SQLGetInfo - SQL_STATIC_CURSOR_ATTRIBUTES1 1255 */ 1256/* 1257 * SQLFetchScroll - FetchOrientation 1258 */ |
|
1092#if (ODBCVER >= 0x0300) | 1259#if (ODBCVER >= 0x0300) |
1093/* supported SQLFetchScroll FetchOrientation's */ 1094#define SQL_CA1_NEXT 0x00000001L 1095#define SQL_CA1_ABSOLUTE 0x00000002L 1096#define SQL_CA1_RELATIVE 0x00000004L 1097#define SQL_CA1_BOOKMARK 0x00000008L | 1260#define SQL_CA1_NEXT 0x00000001L 1261#define SQL_CA1_ABSOLUTE 0x00000002L 1262#define SQL_CA1_RELATIVE 0x00000004L 1263#define SQL_CA1_BOOKMARK 0x00000008L 1264#endif /* ODBCVER >= 0x0300 */ |
1098 | 1265 |
1099/* supported SQLSetPos LockType's */ 1100#define SQL_CA1_LOCK_NO_CHANGE 0x00000040L 1101#define SQL_CA1_LOCK_EXCLUSIVE 0x00000080L 1102#define SQL_CA1_LOCK_UNLOCK 0x00000100L | |
1103 | 1266 |
1104/* supported SQLSetPos Operations */ 1105#define SQL_CA1_POS_POSITION 0x00000200L 1106#define SQL_CA1_POS_UPDATE 0x00000400L 1107#define SQL_CA1_POS_DELETE 0x00000800L 1108#define SQL_CA1_POS_REFRESH 0x00001000L | 1267/* 1268 * SQLSetPos - LockType 1269 */ 1270#if (ODBCVER >= 0x0300) 1271#define SQL_CA1_LOCK_NO_CHANGE 0x00000040L 1272#define SQL_CA1_LOCK_EXCLUSIVE 0x00000080L 1273#define SQL_CA1_LOCK_UNLOCK 0x00000100L 1274#endif /* ODBCVER >= 0x0300 */ |
1109 | 1275 |
1110/* positioned updates and deletes */ 1111#define SQL_CA1_POSITIONED_UPDATE 0x00002000L 1112#define SQL_CA1_POSITIONED_DELETE 0x00004000L 1113#define SQL_CA1_SELECT_FOR_UPDATE 0x00008000L | |
1114 | 1276 |
1115/* supported SQLBulkOperations operations */ 1116#define SQL_CA1_BULK_ADD 0x00010000L | 1277/* 1278 * SQLSetPos Operations 1279 */ 1280#if (ODBCVER >= 0x0300) 1281#define SQL_CA1_POS_POSITION 0x00000200L 1282#define SQL_CA1_POS_UPDATE 0x00000400L 1283#define SQL_CA1_POS_DELETE 0x00000800L 1284#define SQL_CA1_POS_REFRESH 0x00001000L 1285#endif /* ODBCVER >= 0x0300 */ 1286 1287 1288/* 1289 * positioned updates and deletes 1290 */ 1291#if (ODBCVER >= 0x0300) 1292#define SQL_CA1_POSITIONED_UPDATE 0x00002000L 1293#define SQL_CA1_POSITIONED_DELETE 0x00004000L 1294#define SQL_CA1_SELECT_FOR_UPDATE 0x00008000L 1295#endif /* ODBCVER >= 0x0300 */ 1296 1297 1298/* 1299 * SQLBulkOperations operations 1300 */ 1301#if (ODBCVER >= 0x0300) 1302#define SQL_CA1_BULK_ADD 0x00010000L |
1117#define SQL_CA1_BULK_UPDATE_BY_BOOKMARK 0x00020000L 1118#define SQL_CA1_BULK_DELETE_BY_BOOKMARK 0x00040000L 1119#define SQL_CA1_BULK_FETCH_BY_BOOKMARK 0x00080000L | 1303#define SQL_CA1_BULK_UPDATE_BY_BOOKMARK 0x00020000L 1304#define SQL_CA1_BULK_DELETE_BY_BOOKMARK 0x00040000L 1305#define SQL_CA1_BULK_FETCH_BY_BOOKMARK 0x00080000L |
1120#endif /* ODBCVER >= 0x0300 */ | 1306#endif /* ODBCVER >= 0x0300 */ |
1121 | 1307 |
1122/* bitmasks for SQL_DYNAMIC_CURSOR_ATTRIBUTES2, 1123 * SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2, 1124 * SQL_KEYSET_CURSOR_ATTRIBUTES2, and SQL_STATIC_CURSOR_ATTRIBUTES2 | 1308 1309/* 1310 * SQLGetInfo - SQL_DYNAMIC_CURSOR_ATTRIBUTES2 1311 * SQLGetInfo - SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 1312 * SQLGetInfo - SQL_KEYSET_CURSOR_ATTRIBUTES2 1313 * SQLGetInfo - SQL_STATIC_CURSOR_ATTRIBUTES2 |
1125 */ | 1314 */ |
1315/* 1316 * SQL_ATTR_SCROLL_CONCURRENCY 1317 */ |
|
1126#if (ODBCVER >= 0x0300) | 1318#if (ODBCVER >= 0x0300) |
1127/* supported values for SQL_ATTR_SCROLL_CONCURRENCY */ | |
1128#define SQL_CA2_READ_ONLY_CONCURRENCY 0x00000001L | 1319#define SQL_CA2_READ_ONLY_CONCURRENCY 0x00000001L |
1129#define SQL_CA2_LOCK_CONCURRENCY 0x00000002L | 1320#define SQL_CA2_LOCK_CONCURRENCY 0x00000002L |
1130#define SQL_CA2_OPT_ROWVER_CONCURRENCY 0x00000004L 1131#define SQL_CA2_OPT_VALUES_CONCURRENCY 0x00000008L | 1321#define SQL_CA2_OPT_ROWVER_CONCURRENCY 0x00000004L 1322#define SQL_CA2_OPT_VALUES_CONCURRENCY 0x00000008L |
1323#endif /* ODBCVER >= 0x0300 */ |
|
1132 | 1324 |
1133/* sensitivity of the cursor to its own inserts, deletes, and updates */ | 1325 1326/* 1327 * sensitivity of the cursor to its own inserts, deletes, and updates 1328 */ 1329#if (ODBCVER >= 0x0300) |
1134#define SQL_CA2_SENSITIVITY_ADDITIONS 0x00000010L 1135#define SQL_CA2_SENSITIVITY_DELETIONS 0x00000020L | 1330#define SQL_CA2_SENSITIVITY_ADDITIONS 0x00000010L 1331#define SQL_CA2_SENSITIVITY_DELETIONS 0x00000020L |
1136#define SQL_CA2_SENSITIVITY_UPDATES 0x00000040L | 1332#define SQL_CA2_SENSITIVITY_UPDATES 0x00000040L 1333#endif /* ODBCVER >= 0x0300 */ |
1137 | 1334 |
1138/* semantics of SQL_ATTR_MAX_ROWS */ 1139#define SQL_CA2_MAX_ROWS_SELECT 0x00000080L 1140#define SQL_CA2_MAX_ROWS_INSERT 0x00000100L 1141#define SQL_CA2_MAX_ROWS_DELETE 0x00000200L 1142#define SQL_CA2_MAX_ROWS_UPDATE 0x00000400L 1143#define SQL_CA2_MAX_ROWS_CATALOG 0x00000800L 1144#define SQL_CA2_MAX_ROWS_AFFECTS_ALL (SQL_CA2_MAX_ROWS_SELECT | SQL_CA2_MAX_ROWS_INSERT | SQL_CA2_MAX_ROWS_DELETE | SQL_CA2_MAX_ROWS_UPDATE | SQL_CA2_MAX_ROWS_CATALOG) | |
1145 | 1335 |
1146/* semantics of SQL_DIAG_CURSOR_ROW_COUNT */ 1147#define SQL_CA2_CRC_EXACT 0x00001000L 1148#define SQL_CA2_CRC_APPROXIMATE 0x00002000L | 1336/* 1337 * SQL_ATTR_MAX_ROWS 1338 */ 1339#if (ODBCVER >= 0x0300) 1340#define SQL_CA2_MAX_ROWS_SELECT 0x00000080L 1341#define SQL_CA2_MAX_ROWS_INSERT 0x00000100L 1342#define SQL_CA2_MAX_ROWS_DELETE 0x00000200L 1343#define SQL_CA2_MAX_ROWS_UPDATE 0x00000400L 1344#define SQL_CA2_MAX_ROWS_CATALOG 0x00000800L 1345#define SQL_CA2_MAX_ROWS_AFFECTS_ALL (SQL_CA2_MAX_ROWS_SELECT | \ 1346 SQL_CA2_MAX_ROWS_INSERT | \ 1347 SQL_CA2_MAX_ROWS_DELETE | \ 1348 SQL_CA2_MAX_ROWS_UPDATE | \ 1349 SQL_CA2_MAX_ROWS_CATALOG) 1350#endif /* ODBCVER >= 0x0300 */ |
1149 | 1351 |
1150/* the kinds of positioned statements that can be simulated */ 1151#define SQL_CA2_SIMULATE_NON_UNIQUE 0x00004000L 1152#define SQL_CA2_SIMULATE_TRY_UNIQUE 0x00008000L 1153#define SQL_CA2_SIMULATE_UNIQUE 0x00010000L 1154#endif /* ODBCVER >= 0x0300 */ | |
1155 | 1352 |
1156/* SQL_ODBC_API_CONFORMANCE values */ | 1353/* 1354 * SQL_DIAG_CURSOR_ROW_COUNT 1355 */ 1356#if (ODBCVER >= 0x0300) 1357#define SQL_CA2_CRC_EXACT 0x00001000L 1358#define SQL_CA2_CRC_APPROXIMATE 0x00002000L 1359#endif /* ODBCVER >= 0x0300 */ |
1157 | 1360 |
1158#define SQL_OAC_NONE 0x0000 1159#define SQL_OAC_LEVEL1 0x0001 1160#define SQL_OAC_LEVEL2 0x0002 | |
1161 | 1361 |
1162/* SQL_ODBC_SAG_CLI_CONFORMANCE values */ | 1362/* 1363 * the kinds of positioned statements that can be simulated 1364 */ 1365#if (ODBCVER >= 0x0300) 1366#define SQL_CA2_SIMULATE_NON_UNIQUE 0x00004000L 1367#define SQL_CA2_SIMULATE_TRY_UNIQUE 0x00008000L 1368#define SQL_CA2_SIMULATE_UNIQUE 0x00010000L 1369#endif /* ODBCVER >= 0x0300 */ |
1163 | 1370 |
1164#define SQL_OSCC_NOT_COMPLIANT 0x0000 1165#define SQL_OSCC_COMPLIANT 0x0001 | |
1166 | 1371 |
1167/* SQL_ODBC_SQL_CONFORMANCE values */ | 1372/* 1373 * SQLGetInfo - SQL_FETCH_DIRECTION 1374 */ 1375#if (ODBCVER < 0x0300) 1376#define SQL_FD_FETCH_RESUME 0x00000040L 1377#endif /* ODBCVER < 0x0300 */ 1378#define SQL_FD_FETCH_BOOKMARK 0x00000080L |
1168 | 1379 |
1169#define SQL_OSC_MINIMUM 0x0000 1170#define SQL_OSC_CORE 0x0001 1171#define SQL_OSC_EXTENDED 0x0002 | |
1172 | 1380 |
1381/* 1382 * SQLGetInfo - SQL_FILE_USAGE 1383 */ 1384#define SQL_FILE_NOT_SUPPORTED 0x0000 1385#define SQL_FILE_TABLE 0x0001 1386#define SQL_FILE_QUALIFIER 0x0002 1387#define SQL_FILE_CATALOG SQL_FILE_QUALIFIER |
|
1173 | 1388 |
1174/* SQL_CONCAT_NULL_BEHAVIOR values */ | |
1175 | 1389 |
1176#define SQL_CB_NULL 0x0000 1177#define SQL_CB_NON_NULL 0x0001 | 1390/* 1391 * SQLGetInfo - SQL_GETDATA_EXTENSIONS 1392 */ 1393#define SQL_GD_BLOCK 0x00000004L 1394#define SQL_GD_BOUND 0x00000008L |
1178 | 1395 |
1179/* SQL_SCROLL_OPTIONS masks */ | |
1180 | 1396 |
1181#define SQL_SO_FORWARD_ONLY 0x00000001L 1182#define SQL_SO_KEYSET_DRIVEN 0x00000002L 1183#define SQL_SO_DYNAMIC 0x00000004L 1184#define SQL_SO_MIXED 0x00000008L 1185#define SQL_SO_STATIC 0x00000010L | 1397/* 1398 * SQLGetInfo - SQL_GROUP_BY 1399 */ 1400#define SQL_GB_NOT_SUPPORTED 0x0000 1401#define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001 1402#define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002 1403#define SQL_GB_NO_RELATION 0x0003 1404#if (ODBCVER >= 0x0300) 1405#define SQL_GB_COLLATE 0x0004 1406#endif /* ODBCVER >= 0x0300 */ |
1186 | 1407 |
1187/* SQL_FETCH_DIRECTION masks */ | |
1188 | 1408 |
1189/* SQL_FETCH_RESUME is no longer supported 1190#define SQL_FD_FETCH_RESUME 0x00000040L 1191*/ 1192#define SQL_FD_FETCH_BOOKMARK 0x00000080L | 1409/* 1410 * SQLGetInfo - SQL_INDEX_KEYWORDS 1411 */ 1412#if (ODBCVER >= 0x0300) 1413#define SQL_IK_NONE 0x00000000L 1414#define SQL_IK_ASC 0x00000001L 1415#define SQL_IK_DESC 0x00000002L 1416#define SQL_IK_ALL (SQL_IK_ASC | SQL_IK_DESC) 1417#endif /* ODBCVER >= 0x0300 */ |
1193 | 1418 |
1194/* SQL_TXN_ISOLATION_OPTION masks */ 1195/* SQL_TXN_VERSIONING is no longer supported 1196#define SQL_TXN_VERSIONING 0x00000010L 1197*/ | |
1198 | 1419 |
1199/* SQL_CORRELATION_NAME values */ | 1420/* 1421 * SQLGetInfo - SQL_INFO_SCHEMA_VIEWS 1422 */ 1423#if (ODBCVER >= 0x0300) 1424#define SQL_ISV_ASSERTIONS 0x00000001L 1425#define SQL_ISV_CHARACTER_SETS 0x00000002L 1426#define SQL_ISV_CHECK_CONSTRAINTS 0x00000004L 1427#define SQL_ISV_COLLATIONS 0x00000008L 1428#define SQL_ISV_COLUMN_DOMAIN_USAGE 0x00000010L 1429#define SQL_ISV_COLUMN_PRIVILEGES 0x00000020L 1430#define SQL_ISV_COLUMNS 0x00000040L 1431#define SQL_ISV_CONSTRAINT_COLUMN_USAGE 0x00000080L 1432#define SQL_ISV_CONSTRAINT_TABLE_USAGE 0x00000100L 1433#define SQL_ISV_DOMAIN_CONSTRAINTS 0x00000200L 1434#define SQL_ISV_DOMAINS 0x00000400L 1435#define SQL_ISV_KEY_COLUMN_USAGE 0x00000800L 1436#define SQL_ISV_REFERENTIAL_CONSTRAINTS 0x00001000L 1437#define SQL_ISV_SCHEMATA 0x00002000L 1438#define SQL_ISV_SQL_LANGUAGES 0x00004000L 1439#define SQL_ISV_TABLE_CONSTRAINTS 0x00008000L 1440#define SQL_ISV_TABLE_PRIVILEGES 0x00010000L 1441#define SQL_ISV_TABLES 0x00020000L 1442#define SQL_ISV_TRANSLATIONS 0x00040000L 1443#define SQL_ISV_USAGE_PRIVILEGES 0x00080000L 1444#define SQL_ISV_VIEW_COLUMN_USAGE 0x00100000L 1445#define SQL_ISV_VIEW_TABLE_USAGE 0x00200000L 1446#define SQL_ISV_VIEWS 0x00400000L 1447#endif /* ODBCVER >= 0x0300 */ |
1200 | 1448 |
1201#define SQL_CN_NONE 0x0000 1202#define SQL_CN_DIFFERENT 0x0001 1203#define SQL_CN_ANY 0x0002 | |
1204 | 1449 |
1205/* SQL_NON_NULLABLE_COLUMNS values */ | 1450/* 1451 * SQLGetInfo - SQL_INSERT_STATEMENT 1452 */ 1453#if (ODBCVER >= 0x0300) 1454#define SQL_IS_INSERT_LITERALS 0x00000001L 1455#define SQL_IS_INSERT_SEARCHED 0x00000002L 1456#define SQL_IS_SELECT_INTO 0x00000004L 1457#endif /* ODBCVER >= 0x0300 */ |
1206 | 1458 |
1207#define SQL_NNC_NULL 0x0000 1208#define SQL_NNC_NON_NULL 0x0001 | |
1209 | 1459 |
1210/* SQL_NULL_COLLATION values */ | 1460/* 1461 * SQLGetInfo - SQL_LOCK_TYPES 1462 */ 1463#define SQL_LCK_NO_CHANGE 0x00000001L 1464#define SQL_LCK_EXCLUSIVE 0x00000002L 1465#define SQL_LCK_UNLOCK 0x00000004L |
1211 | 1466 |
1212#define SQL_NC_START 0x0002 1213#define SQL_NC_END 0x0004 | |
1214 | 1467 |
1215/* SQL_FILE_USAGE values */ | 1468/* 1469 * SQLGetInfo - SQL_POS_OPERATIONS 1470 */ 1471#define SQL_POS_POSITION 0x00000001L 1472#define SQL_POS_REFRESH 0x00000002L 1473#define SQL_POS_UPDATE 0x00000004L 1474#define SQL_POS_DELETE 0x00000008L 1475#define SQL_POS_ADD 0x00000010L |
1216 | 1476 |
1217#define SQL_FILE_NOT_SUPPORTED 0x0000 1218#define SQL_FILE_TABLE 0x0001 1219#define SQL_FILE_QUALIFIER 0x0002 1220#define SQL_FILE_CATALOG SQL_FILE_QUALIFIER /* ODBC 3.0 */ | |
1221 | 1477 |
1478/* 1479 * SQLGetInfo - SQL_NON_NULLABLE_COLUMNS 1480 */ 1481#define SQL_NNC_NULL 0x0000 1482#define SQL_NNC_NON_NULL 0x0001 |
|
1222 | 1483 |
1223/* SQL_GETDATA_EXTENSIONS values */ | |
1224 | 1484 |
1225#define SQL_GD_BLOCK 0x00000004L 1226#define SQL_GD_BOUND 0x00000008L | 1485/* 1486 * SQLGetInfo - SQL_NULL_COLLATION 1487 */ 1488#define SQL_NC_START 0x0002 1489#define SQL_NC_END 0x0004 |
1227 | 1490 |
1228/* SQL_POSITIONED_STATEMENTS masks */ | |
1229 | 1491 |
1230#define SQL_PS_POSITIONED_DELETE 0x00000001L 1231#define SQL_PS_POSITIONED_UPDATE 0x00000002L 1232#define SQL_PS_SELECT_FOR_UPDATE 0x00000004L | 1492/* 1493 * SQLGetInfo - SQL_NUMERIC_FUNCTIONS 1494 */ 1495#define SQL_FN_NUM_ABS 0x00000001L 1496#define SQL_FN_NUM_ACOS 0x00000002L 1497#define SQL_FN_NUM_ASIN 0x00000004L 1498#define SQL_FN_NUM_ATAN 0x00000008L 1499#define SQL_FN_NUM_ATAN2 0x00000010L 1500#define SQL_FN_NUM_CEILING 0x00000020L 1501#define SQL_FN_NUM_COS 0x00000040L 1502#define SQL_FN_NUM_COT 0x00000080L 1503#define SQL_FN_NUM_EXP 0x00000100L 1504#define SQL_FN_NUM_FLOOR 0x00000200L 1505#define SQL_FN_NUM_LOG 0x00000400L 1506#define SQL_FN_NUM_MOD 0x00000800L 1507#define SQL_FN_NUM_SIGN 0x00001000L 1508#define SQL_FN_NUM_SIN 0x00002000L 1509#define SQL_FN_NUM_SQRT 0x00004000L 1510#define SQL_FN_NUM_TAN 0x00008000L 1511#define SQL_FN_NUM_PI 0x00010000L 1512#define SQL_FN_NUM_RAND 0x00020000L 1513#define SQL_FN_NUM_DEGREES 0x00040000L 1514#define SQL_FN_NUM_LOG10 0x00080000L 1515#define SQL_FN_NUM_POWER 0x00100000L 1516#define SQL_FN_NUM_RADIANS 0x00200000L 1517#define SQL_FN_NUM_ROUND 0x00400000L 1518#define SQL_FN_NUM_TRUNCATE 0x00800000L |
1233 | 1519 |
1234/* SQL_GROUP_BY values */ | |
1235 | 1520 |
1236#define SQL_GB_NOT_SUPPORTED 0x0000 1237#define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001 1238#define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002 1239#define SQL_GB_NO_RELATION 0x0003 | 1521/* 1522 * SQLGetInfo - SQL_ODBC_API_CONFORMANCE 1523 */ 1524#define SQL_OAC_NONE 0x0000 1525#define SQL_OAC_LEVEL1 0x0001 1526#define SQL_OAC_LEVEL2 0x0002 1527 1528 1529/* 1530 * SQLGetInfo - SQL_ODBC_INTERFACE_CONFORMANCE 1531 */ |
1240#if (ODBCVER >= 0x0300) | 1532#if (ODBCVER >= 0x0300) |
1241#define SQL_GB_COLLATE 0x0004 | 1533#define SQL_OIC_CORE 1UL 1534#define SQL_OIC_LEVEL1 2UL 1535#define SQL_OIC_LEVEL2 3UL 1536#endif /* ODBCVER >= 0x0300 */ |
1242 | 1537 |
1243#endif /* ODBCVER >= 0x0300 */ | |
1244 | 1538 |
1245/* SQL_OWNER_USAGE masks */ | 1539/* 1540 * SQLGetInfo - SQL_ODBC_SAG_CLI_CONFORMANCE 1541 */ 1542#define SQL_OSCC_NOT_COMPLIANT 0x0000 1543#define SQL_OSCC_COMPLIANT 0x0001 |
1246 | 1544 |
1247#define SQL_OU_DML_STATEMENTS 0x00000001L 1248#define SQL_OU_PROCEDURE_INVOCATION 0x00000002L 1249#define SQL_OU_TABLE_DEFINITION 0x00000004L 1250#define SQL_OU_INDEX_DEFINITION 0x00000008L 1251#define SQL_OU_PRIVILEGE_DEFINITION 0x00000010L | |
1252 | 1545 |
1253/* SQL_SCHEMA_USAGE masks */ | 1546/* 1547 * SQLGetInfo - SQL_ODBC_SQL_CONFORMANCE 1548 */ 1549#define SQL_OSC_MINIMUM 0x0000 1550#define SQL_OSC_CORE 0x0001 1551#define SQL_OSC_EXTENDED 0x0002 1552 1553 1554/* 1555 * SQLGetInfo - SQL_OWNER_USAGE 1556 */ 1557#define SQL_OU_DML_STATEMENTS 0x00000001L 1558#define SQL_OU_PROCEDURE_INVOCATION 0x00000002L 1559#define SQL_OU_TABLE_DEFINITION 0x00000004L 1560#define SQL_OU_INDEX_DEFINITION 0x00000008L 1561#define SQL_OU_PRIVILEGE_DEFINITION 0x00000010L 1562 1563 1564/* 1565 * SQLGetInfo - SQL_PARAM_ARRAY_ROW_COUNTS 1566 */ |
1254#if (ODBCVER >= 0x0300) | 1567#if (ODBCVER >= 0x0300) |
1568#define SQL_PARC_BATCH 1 1569#define SQL_PARC_NO_BATCH 2 1570#endif /* ODBCVER >= 0x0300 */ 1571 1572 1573/* 1574 * SQLGetInfo - SQL_PARAM_ARRAY_SELECTS 1575 */ 1576#if (ODBCVER >= 0x0300) 1577#define SQL_PAS_BATCH 1 1578#define SQL_PAS_NO_BATCH 2 1579#define SQL_PAS_NO_SELECT 3 1580#endif /* ODBCVER >= 0x0300 */ 1581 1582 1583/* 1584 * SQLGetInfo - SQL_POSITIONED_STATEMENTS 1585 */ 1586#define SQL_PS_POSITIONED_DELETE 0x00000001L 1587#define SQL_PS_POSITIONED_UPDATE 0x00000002L 1588#define SQL_PS_SELECT_FOR_UPDATE 0x00000004L 1589 1590 1591/* 1592 * SQLGetInfo - SQL_QUALIFIER_LOCATION 1593 */ 1594#define SQL_QL_START 0x0001 1595#define SQL_QL_END 0x0002 1596 1597 1598/* 1599 * SQLGetInfo - SQL_QUALIFIER_USAGE 1600 */ 1601#define SQL_QU_DML_STATEMENTS 0x00000001L 1602#define SQL_QU_PROCEDURE_INVOCATION 0x00000002L 1603#define SQL_QU_TABLE_DEFINITION 0x00000004L 1604#define SQL_QU_INDEX_DEFINITION 0x00000008L 1605#define SQL_QU_PRIVILEGE_DEFINITION 0x00000010L 1606 1607 1608/* 1609 * SQLGetInfo - SQL_SCHEMA_USAGE 1610 */ 1611#if (ODBCVER >= 0x0300) |
|
1255#define SQL_SU_DML_STATEMENTS SQL_OU_DML_STATEMENTS 1256#define SQL_SU_PROCEDURE_INVOCATION SQL_OU_PROCEDURE_INVOCATION 1257#define SQL_SU_TABLE_DEFINITION SQL_OU_TABLE_DEFINITION 1258#define SQL_SU_INDEX_DEFINITION SQL_OU_INDEX_DEFINITION 1259#define SQL_SU_PRIVILEGE_DEFINITION SQL_OU_PRIVILEGE_DEFINITION | 1612#define SQL_SU_DML_STATEMENTS SQL_OU_DML_STATEMENTS 1613#define SQL_SU_PROCEDURE_INVOCATION SQL_OU_PROCEDURE_INVOCATION 1614#define SQL_SU_TABLE_DEFINITION SQL_OU_TABLE_DEFINITION 1615#define SQL_SU_INDEX_DEFINITION SQL_OU_INDEX_DEFINITION 1616#define SQL_SU_PRIVILEGE_DEFINITION SQL_OU_PRIVILEGE_DEFINITION |
1260#endif /* ODBCVER >= 0x0300 */ | 1617#endif /* ODBCVER >= 0x0300 */ |
1261 | 1618 |
1262/* SQL_QUALIFIER_USAGE masks */ | |
1263 | 1619 |
1264#define SQL_QU_DML_STATEMENTS 0x00000001L 1265#define SQL_QU_PROCEDURE_INVOCATION 0x00000002L 1266#define SQL_QU_TABLE_DEFINITION 0x00000004L 1267#define SQL_QU_INDEX_DEFINITION 0x00000008L 1268#define SQL_QU_PRIVILEGE_DEFINITION 0x00000010L | 1620/* 1621 * SQLGetInfo - SQL_SCROLL_OPTIONS 1622 */ 1623#define SQL_SO_FORWARD_ONLY 0x00000001L 1624#define SQL_SO_KEYSET_DRIVEN 0x00000002L 1625#define SQL_SO_DYNAMIC 0x00000004L 1626#define SQL_SO_MIXED 0x00000008L 1627#define SQL_SO_STATIC 0x00000010L |
1269 | 1628 |
1629 1630/* 1631 * SQLGetInfo - SQL_SQL_CONFORMANCE 1632 */ |
|
1270#if (ODBCVER >= 0x0300) | 1633#if (ODBCVER >= 0x0300) |
1271/* SQL_CATALOG_USAGE masks */ 1272#define SQL_CU_DML_STATEMENTS SQL_QU_DML_STATEMENTS 1273#define SQL_CU_PROCEDURE_INVOCATION SQL_QU_PROCEDURE_INVOCATION 1274#define SQL_CU_TABLE_DEFINITION SQL_QU_TABLE_DEFINITION 1275#define SQL_CU_INDEX_DEFINITION SQL_QU_INDEX_DEFINITION 1276#define SQL_CU_PRIVILEGE_DEFINITION SQL_QU_PRIVILEGE_DEFINITION 1277#endif /* ODBCVER >= 0x0300 */ | 1634#define SQL_SC_SQL92_ENTRY 0x00000001L 1635#define SQL_SC_FIPS127_2_TRANSITIONAL 0x00000002L 1636#define SQL_SC_SQL92_INTERMEDIATE 0x00000004L 1637#define SQL_SC_SQL92_FULL 0x00000008L 1638#endif /* ODBCVER >= 0x0300 */ |
1278 | 1639 |
1279/* SQL_SUBQUERIES masks */ | |
1280 | 1640 |
1281#define SQL_SQ_COMPARISON 0x00000001L 1282#define SQL_SQ_EXISTS 0x00000002L 1283#define SQL_SQ_IN 0x00000004L 1284#define SQL_SQ_QUANTIFIED 0x00000008L 1285#define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L | 1641/* 1642 * SQLGetInfo - SQL_SQL92_DATETIME_FUNCTIONS 1643 */ 1644#if (ODBCVER >= 0x0300) 1645#define SQL_SDF_CURRENT_DATE 0x00000001L 1646#define SQL_SDF_CURRENT_TIME 0x00000002L 1647#define SQL_SDF_CURRENT_TIMESTAMP 0x00000004L 1648#endif /* ODBCVER >= 0x0300 */ |
1286 | 1649 |
1287/* SQL_UNION masks */ | |
1288 | 1650 |
1289#define SQL_U_UNION 0x00000001L 1290#define SQL_U_UNION_ALL 0x00000002L | 1651/* 1652 * SQLGetInfo - SQL_SQL92_FOREIGN_KEY_DELETE_RULE 1653 */ 1654#if (ODBCVER >= 0x0300) 1655#define SQL_SFKD_CASCADE 0x00000001L 1656#define SQL_SFKD_NO_ACTION 0x00000002L 1657#define SQL_SFKD_SET_DEFAULT 0x00000004L 1658#define SQL_SFKD_SET_NULL 0x00000008L 1659#endif /* ODBCVER >= 0x0300 */ |
1291 | 1660 |
1292/* SQL_BOOKMARK_PERSISTENCE values */ | |
1293 | 1661 |
1294#define SQL_BP_CLOSE 0x00000001L 1295#define SQL_BP_DELETE 0x00000002L 1296#define SQL_BP_DROP 0x00000004L 1297#define SQL_BP_TRANSACTION 0x00000008L 1298#define SQL_BP_UPDATE 0x00000010L 1299#define SQL_BP_OTHER_HSTMT 0x00000020L 1300#define SQL_BP_SCROLL 0x00000040L | 1662/* 1663 * SQLGetInfo - SQL_SQL92_FOREIGN_KEY_UPDATE_RULE 1664 */ 1665#if (ODBCVER >= 0x0300) 1666#define SQL_SFKU_CASCADE 0x00000001L 1667#define SQL_SFKU_NO_ACTION 0x00000002L 1668#define SQL_SFKU_SET_DEFAULT 0x00000004L 1669#define SQL_SFKU_SET_NULL 0x00000008L 1670#endif /* ODBCVER >= 0x0300 */ |
1301 | 1671 |
1302/* SQL_STATIC_SENSITIVITY values */ | |
1303 | 1672 |
1304#define SQL_SS_ADDITIONS 0x00000001L 1305#define SQL_SS_DELETIONS 0x00000002L 1306#define SQL_SS_UPDATES 0x00000004L | 1673/* 1674 * SQLGetInfo - SQL_SQL92_GRANT 1675 */ 1676#if (ODBCVER >= 0x0300) 1677#define SQL_SG_USAGE_ON_DOMAIN 0x00000001L 1678#define SQL_SG_USAGE_ON_CHARACTER_SET 0x00000002L 1679#define SQL_SG_USAGE_ON_COLLATION 0x00000004L 1680#define SQL_SG_USAGE_ON_TRANSLATION 0x00000008L 1681#define SQL_SG_WITH_GRANT_OPTION 0x00000010L 1682#define SQL_SG_DELETE_TABLE 0x00000020L 1683#define SQL_SG_INSERT_TABLE 0x00000040L 1684#define SQL_SG_INSERT_COLUMN 0x00000080L 1685#define SQL_SG_REFERENCES_TABLE 0x00000100L 1686#define SQL_SG_REFERENCES_COLUMN 0x00000200L 1687#define SQL_SG_SELECT_TABLE 0x00000400L 1688#define SQL_SG_UPDATE_TABLE 0x00000800L 1689#define SQL_SG_UPDATE_COLUMN 0x00001000L 1690#endif /* ODBCVER >= 0x0300 */ |
1307 | 1691 |
1308/* SQL_VIEW values */ 1309#define SQL_CV_CREATE_VIEW 0x00000001L 1310#define SQL_CV_CHECK_OPTION 0x00000002L 1311#define SQL_CV_CASCADED 0x00000004L 1312#define SQL_CV_LOCAL 0x00000008L | |
1313 | 1692 |
1314/* SQL_LOCK_TYPES masks */ | 1693/* 1694 * SQLGetInfo - SQL_SQL92_NUMERIC_VALUE_FUNCTIONS 1695 */ 1696#if (ODBCVER >= 0x0300) 1697#define SQL_SNVF_BIT_LENGTH 0x00000001L 1698#define SQL_SNVF_CHAR_LENGTH 0x00000002L 1699#define SQL_SNVF_CHARACTER_LENGTH 0x00000004L 1700#define SQL_SNVF_EXTRACT 0x00000008L 1701#define SQL_SNVF_OCTET_LENGTH 0x00000010L 1702#define SQL_SNVF_POSITION 0x00000020L 1703#endif /* ODBCVER >= 0x0300 */ |
1315 | 1704 |
1316#define SQL_LCK_NO_CHANGE 0x00000001L 1317#define SQL_LCK_EXCLUSIVE 0x00000002L 1318#define SQL_LCK_UNLOCK 0x00000004L | |
1319 | 1705 |
1320/* SQL_POS_OPERATIONS masks */ | 1706/* 1707 * SQLGetInfo - SQL_SQL92_PREDICATES 1708 */ 1709#if (ODBCVER >= 0x0300) 1710#define SQL_SP_EXISTS 0x00000001L 1711#define SQL_SP_ISNOTNULL 0x00000002L 1712#define SQL_SP_ISNULL 0x00000004L 1713#define SQL_SP_MATCH_FULL 0x00000008L 1714#define SQL_SP_MATCH_PARTIAL 0x00000010L 1715#define SQL_SP_MATCH_UNIQUE_FULL 0x00000020L 1716#define SQL_SP_MATCH_UNIQUE_PARTIAL 0x00000040L 1717#define SQL_SP_OVERLAPS 0x00000080L 1718#define SQL_SP_UNIQUE 0x00000100L 1719#define SQL_SP_LIKE 0x00000200L 1720#define SQL_SP_IN 0x00000400L 1721#define SQL_SP_BETWEEN 0x00000800L 1722#define SQL_SP_COMPARISON 0x00001000L 1723#define SQL_SP_QUANTIFIED_COMPARISON 0x00002000L 1724#endif /* ODBCVER >= 0x0300 */ |
1321 | 1725 |
1322#define SQL_POS_POSITION 0x00000001L 1323#define SQL_POS_REFRESH 0x00000002L 1324#define SQL_POS_UPDATE 0x00000004L 1325#define SQL_POS_DELETE 0x00000008L 1326#define SQL_POS_ADD 0x00000010L | |
1327 | 1726 |
1328/* SQL_QUALIFIER_LOCATION values */ | 1727/* 1728 * SQLGetInfo - SQL_SQL92_RELATIONAL_JOIN_OPERATORS 1729 */ 1730#if (ODBCVER >= 0x0300) 1731#define SQL_SRJO_CORRESPONDING_CLAUSE 0x00000001L 1732#define SQL_SRJO_CROSS_JOIN 0x00000002L 1733#define SQL_SRJO_EXCEPT_JOIN 0x00000004L 1734#define SQL_SRJO_FULL_OUTER_JOIN 0x00000008L 1735#define SQL_SRJO_INNER_JOIN 0x00000010L 1736#define SQL_SRJO_INTERSECT_JOIN 0x00000020L 1737#define SQL_SRJO_LEFT_OUTER_JOIN 0x00000040L 1738#define SQL_SRJO_NATURAL_JOIN 0x00000080L 1739#define SQL_SRJO_RIGHT_OUTER_JOIN 0x00000100L 1740#define SQL_SRJO_UNION_JOIN 0x00000200L 1741#endif /* ODBCVER >= 0x0300 */ |
1329 | 1742 |
1330#define SQL_QL_START 0x0001 1331#define SQL_QL_END 0x0002 | |
1332 | 1743 |
1333/* Here start return values for ODBC 3.0 SQLGetInfo */ | 1744/* 1745 * SQLGetInfo - SQL_SQL92_REVOKE 1746 */ 1747#if (ODBCVER >= 0x0300) 1748#define SQL_SR_USAGE_ON_DOMAIN 0x00000001L 1749#define SQL_SR_USAGE_ON_CHARACTER_SET 0x00000002L 1750#define SQL_SR_USAGE_ON_COLLATION 0x00000004L 1751#define SQL_SR_USAGE_ON_TRANSLATION 0x00000008L 1752#define SQL_SR_GRANT_OPTION_FOR 0x00000010L 1753#define SQL_SR_CASCADE 0x00000020L 1754#define SQL_SR_RESTRICT 0x00000040L 1755#define SQL_SR_DELETE_TABLE 0x00000080L 1756#define SQL_SR_INSERT_TABLE 0x00000100L 1757#define SQL_SR_INSERT_COLUMN 0x00000200L 1758#define SQL_SR_REFERENCES_TABLE 0x00000400L 1759#define SQL_SR_REFERENCES_COLUMN 0x00000800L 1760#define SQL_SR_SELECT_TABLE 0x00001000L 1761#define SQL_SR_UPDATE_TABLE 0x00002000L 1762#define SQL_SR_UPDATE_COLUMN 0x00004000L 1763#endif /* ODBCVER >= 0x0300 */ |
1334 | 1764 |
1765 1766/* 1767 * SQLGetInfo - SQL_SQL92_ROW_VALUE_CONSTRUCTOR 1768 */ |
|
1335#if (ODBCVER >= 0x0300) | 1769#if (ODBCVER >= 0x0300) |
1336/* SQL_AGGREGATE_FUNCTIONS bitmasks */ 1337#define SQL_AF_AVG 0x00000001L 1338#define SQL_AF_COUNT 0x00000002L 1339#define SQL_AF_MAX 0x00000004L 1340#define SQL_AF_MIN 0x00000008L 1341#define SQL_AF_SUM 0x00000010L 1342#define SQL_AF_DISTINCT 0x00000020L 1343#define SQL_AF_ALL 0x00000040L | 1770#define SQL_SRVC_VALUE_EXPRESSION 0x00000001L 1771#define SQL_SRVC_NULL 0x00000002L 1772#define SQL_SRVC_DEFAULT 0x00000004L 1773#define SQL_SRVC_ROW_SUBQUERY 0x00000008L 1774#endif /* ODBCVER >= 0x0300 */ |
1344 | 1775 |
1345/* SQL_SQL_CONFORMANCE bit masks */ 1346#define SQL_SC_SQL92_ENTRY 0x00000001L 1347#define SQL_SC_FIPS127_2_TRANSITIONAL 0x00000002L 1348#define SQL_SC_SQL92_INTERMEDIATE 0x00000004L 1349#define SQL_SC_SQL92_FULL 0x00000008L | |
1350 | 1776 |
1351/* SQL_DATETIME_LITERALS masks */ 1352#define SQL_DL_SQL92_DATE 0x00000001L 1353#define SQL_DL_SQL92_TIME 0x00000002L 1354#define SQL_DL_SQL92_TIMESTAMP 0x00000004L 1355#define SQL_DL_SQL92_INTERVAL_YEAR 0x00000008L 1356#define SQL_DL_SQL92_INTERVAL_MONTH 0x00000010L 1357#define SQL_DL_SQL92_INTERVAL_DAY 0x00000020L 1358#define SQL_DL_SQL92_INTERVAL_HOUR 0x00000040L 1359#define SQL_DL_SQL92_INTERVAL_MINUTE 0x00000080L 1360#define SQL_DL_SQL92_INTERVAL_SECOND 0x00000100L 1361#define SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH 0x00000200L 1362#define SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR 0x00000400L 1363#define SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE 0x00000800L 1364#define SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND 0x00001000L 1365#define SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE 0x00002000L 1366#define SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND 0x00004000L 1367#define SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND 0x00008000L | 1777/* 1778 * SQLGetInfo - SQL_SQL92_STRING_FUNCTIONS 1779 */ 1780#if (ODBCVER >= 0x0300) 1781#define SQL_SSF_CONVERT 0x00000001L 1782#define SQL_SSF_LOWER 0x00000002L 1783#define SQL_SSF_UPPER 0x00000004L 1784#define SQL_SSF_SUBSTRING 0x00000008L 1785#define SQL_SSF_TRANSLATE 0x00000010L 1786#define SQL_SSF_TRIM_BOTH 0x00000020L 1787#define SQL_SSF_TRIM_LEADING 0x00000040L 1788#define SQL_SSF_TRIM_TRAILING 0x00000080L 1789#endif /* ODBCVER >= 0x0300 */ |
1368 | 1790 |
1369/* SQL_CATALOG_LOCATION values */ 1370#define SQL_CL_START SQL_QL_START 1371#define SQL_CL_END SQL_QL_END | |
1372 | 1791 |
1373/* values for SQL_BATCH_ROW_COUNT */ 1374#define SQL_BRC_PROCEDURES 0x0000001 1375#define SQL_BRC_EXPLICIT 0x0000002 1376#define SQL_BRC_ROLLED_UP 0x0000004 | 1792/* 1793 * SQLGetInfo - SQL_SQL92_VALUE_EXPRESSIONS 1794 */ 1795#if (ODBCVER >= 0x0300) 1796#define SQL_SVE_CASE 0x00000001L 1797#define SQL_SVE_CAST 0x00000002L 1798#define SQL_SVE_COALESCE 0x00000004L 1799#define SQL_SVE_NULLIF 0x00000008L 1800#endif /* ODBCVER >= 0x0300 */ |
1377 | 1801 |
1378/* bitmasks for SQL_BATCH_SUPPORT */ 1379#define SQL_BS_SELECT_EXPLICIT 0x00000001L 1380#define SQL_BS_ROW_COUNT_EXPLICIT 0x00000002L 1381#define SQL_BS_SELECT_PROC 0x00000004L 1382#define SQL_BS_ROW_COUNT_PROC 0x00000008L | |
1383 | 1802 |
1384/* Values for SQL_PARAM_ARRAY_ROW_COUNTS getinfo */ 1385#define SQL_PARC_BATCH 1 1386#define SQL_PARC_NO_BATCH 2 | 1803/* 1804 * SQLGetInfo - SQL_STANDARD_CLI_CONFORMANCE 1805 */ 1806#if (ODBCVER >= 0x0300) 1807#define SQL_SCC_XOPEN_CLI_VERSION1 0x00000001L 1808#define SQL_SCC_ISO92_CLI 0x00000002L 1809#endif /* ODBCVER >= 0x0300 */ |
1387 | 1810 |
1388/* values for SQL_PARAM_ARRAY_SELECTS */ 1389#define SQL_PAS_BATCH 1 1390#define SQL_PAS_NO_BATCH 2 1391#define SQL_PAS_NO_SELECT 3 | |
1392 | 1811 |
1393/* Bitmasks for SQL_INDEX_KEYWORDS */ 1394#define SQL_IK_NONE 0x00000000L 1395#define SQL_IK_ASC 0x00000001L 1396#define SQL_IK_DESC 0x00000002L 1397#define SQL_IK_ALL (SQL_IK_ASC | SQL_IK_DESC) | 1812/* 1813 * SQLGetInfo - SQL_STATIC_SENSITIVITY 1814 */ 1815#define SQL_SS_ADDITIONS 0x00000001L 1816#define SQL_SS_DELETIONS 0x00000002L 1817#define SQL_SS_UPDATES 0x00000004L |
1398 | 1818 |
1399/* Bitmasks for SQL_INFO_SCHEMA_VIEWS */ | |
1400 | 1819 |
1401#define SQL_ISV_ASSERTIONS 0x00000001L 1402#define SQL_ISV_CHARACTER_SETS 0x00000002L 1403#define SQL_ISV_CHECK_CONSTRAINTS 0x00000004L 1404#define SQL_ISV_COLLATIONS 0x00000008L 1405#define SQL_ISV_COLUMN_DOMAIN_USAGE 0x00000010L 1406#define SQL_ISV_COLUMN_PRIVILEGES 0x00000020L 1407#define SQL_ISV_COLUMNS 0x00000040L 1408#define SQL_ISV_CONSTRAINT_COLUMN_USAGE 0x00000080L 1409#define SQL_ISV_CONSTRAINT_TABLE_USAGE 0x00000100L 1410#define SQL_ISV_DOMAIN_CONSTRAINTS 0x00000200L 1411#define SQL_ISV_DOMAINS 0x00000400L 1412#define SQL_ISV_KEY_COLUMN_USAGE 0x00000800L 1413#define SQL_ISV_REFERENTIAL_CONSTRAINTS 0x00001000L 1414#define SQL_ISV_SCHEMATA 0x00002000L 1415#define SQL_ISV_SQL_LANGUAGES 0x00004000L 1416#define SQL_ISV_TABLE_CONSTRAINTS 0x00008000L 1417#define SQL_ISV_TABLE_PRIVILEGES 0x00010000L 1418#define SQL_ISV_TABLES 0x00020000L 1419#define SQL_ISV_TRANSLATIONS 0x00040000L 1420#define SQL_ISV_USAGE_PRIVILEGES 0x00080000L 1421#define SQL_ISV_VIEW_COLUMN_USAGE 0x00100000L 1422#define SQL_ISV_VIEW_TABLE_USAGE 0x00200000L 1423#define SQL_ISV_VIEWS 0x00400000L | 1820/* 1821 * SQLGetInfo - SQL_SUBQUERIES 1822 */ 1823#define SQL_SQ_COMPARISON 0x00000001L 1824#define SQL_SQ_EXISTS 0x00000002L 1825#define SQL_SQ_IN 0x00000004L 1826#define SQL_SQ_QUANTIFIED 0x00000008L 1827#define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L |
1424 | 1828 |
1425/* Bitmasks for SQL_ASYNC_MODE */ | |
1426 | 1829 |
1427#define SQL_AM_NONE 0 1428#define SQL_AM_CONNECTION 1 1429#define SQL_AM_STATEMENT 2 | 1830/* 1831 * SQLGetInfo - SQL_SYSTEM_FUNCTIONS 1832 */ 1833#define SQL_FN_SYS_USERNAME 0x00000001L 1834#define SQL_FN_SYS_DBNAME 0x00000002L 1835#define SQL_FN_SYS_IFNULL 0x00000004L |
1430 | 1836 |
1431/* Bitmasks for SQL_ALTER_DOMAIN */ 1432#define SQL_AD_CONSTRAINT_NAME_DEFINITION 0x00000001L 1433#define SQL_AD_ADD_DOMAIN_CONSTRAINT 0x00000002L 1434#define SQL_AD_DROP_DOMAIN_CONSTRAINT 0x00000004L 1435#define SQL_AD_ADD_DOMAIN_DEFAULT 0x00000008L 1436#define SQL_AD_DROP_DOMAIN_DEFAULT 0x00000010L 1437#define SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L 1438#define SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L 1439#define SQL_AD_ADD_CONSTRAINT_DEFERRABLE 0x00000080L 1440#define SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE 0x00000100L | |
1441 | 1837 |
1838/* 1839 * SQLGetInfo - SQL_STRING_FUNCTIONS 1840 */ 1841#define SQL_FN_STR_CONCAT 0x00000001L 1842#define SQL_FN_STR_INSERT 0x00000002L 1843#define SQL_FN_STR_LEFT 0x00000004L 1844#define SQL_FN_STR_LTRIM 0x00000008L 1845#define SQL_FN_STR_LENGTH 0x00000010L 1846#define SQL_FN_STR_LOCATE 0x00000020L 1847#define SQL_FN_STR_LCASE 0x00000040L 1848#define SQL_FN_STR_REPEAT 0x00000080L 1849#define SQL_FN_STR_REPLACE 0x00000100L 1850#define SQL_FN_STR_RIGHT 0x00000200L 1851#define SQL_FN_STR_RTRIM 0x00000400L 1852#define SQL_FN_STR_SUBSTRING 0x00000800L 1853#define SQL_FN_STR_UCASE 0x00001000L 1854#define SQL_FN_STR_ASCII 0x00002000L 1855#define SQL_FN_STR_CHAR 0x00004000L 1856#define SQL_FN_STR_DIFFERENCE 0x00008000L 1857#define SQL_FN_STR_LOCATE_2 0x00010000L 1858#define SQL_FN_STR_SOUNDEX 0x00020000L 1859#define SQL_FN_STR_SPACE 0x00040000L 1860#if (ODBCVER >= 0x0300) 1861#define SQL_FN_STR_BIT_LENGTH 0x00080000L 1862#define SQL_FN_STR_CHAR_LENGTH 0x00100000L 1863#define SQL_FN_STR_CHARACTER_LENGTH 0x00200000L 1864#define SQL_FN_STR_OCTET_LENGTH 0x00400000L 1865#define SQL_FN_STR_POSITION 0x00800000L 1866#endif /* ODBCVER >= 0x0300 */ |
|
1442 | 1867 |
1443/* SQL_CREATE_SCHEMA bitmasks */ 1444#define SQL_CS_CREATE_SCHEMA 0x00000001L 1445#define SQL_CS_AUTHORIZATION 0x00000002L 1446#define SQL_CS_DEFAULT_CHARACTER_SET 0x00000004L | |
1447 | 1868 |
1448/* SQL_CREATE_TRANSLATION bitmasks */ 1449#define SQL_CTR_CREATE_TRANSLATION 0x00000001L | 1869/* 1870 * SQLGetInfo - SQL_TIMEDATE_ADD_INTERVALS 1871 * SQLGetInfo - SQL_TIMEDATE_DIFF_INTERVALS 1872 */ 1873#define SQL_FN_TSI_FRAC_SECOND 0x00000001L 1874#define SQL_FN_TSI_SECOND 0x00000002L 1875#define SQL_FN_TSI_MINUTE 0x00000004L 1876#define SQL_FN_TSI_HOUR 0x00000008L 1877#define SQL_FN_TSI_DAY 0x00000010L 1878#define SQL_FN_TSI_WEEK 0x00000020L 1879#define SQL_FN_TSI_MONTH 0x00000040L 1880#define SQL_FN_TSI_QUARTER 0x00000080L 1881#define SQL_FN_TSI_YEAR 0x00000100L |
1450 | 1882 |
1451/* SQL_CREATE_ASSERTION bitmasks */ 1452#define SQL_CA_CREATE_ASSERTION 0x00000001L 1453#define SQL_CA_CONSTRAINT_INITIALLY_DEFERRED 0x00000010L 1454#define SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000020L 1455#define SQL_CA_CONSTRAINT_DEFERRABLE 0x00000040L 1456#define SQL_CA_CONSTRAINT_NON_DEFERRABLE 0x00000080L | |
1457 | 1883 |
1458/* SQL_CREATE_CHARACTER_SET bitmasks */ 1459#define SQL_CCS_CREATE_CHARACTER_SET 0x00000001L 1460#define SQL_CCS_COLLATE_CLAUSE 0x00000002L 1461#define SQL_CCS_LIMITED_COLLATION 0x00000004L | 1884/* 1885 * SQLGetInfo - SQL_TIMEDATE_FUNCTIONS 1886 */ 1887#define SQL_FN_TD_NOW 0x00000001L 1888#define SQL_FN_TD_CURDATE 0x00000002L 1889#define SQL_FN_TD_DAYOFMONTH 0x00000004L 1890#define SQL_FN_TD_DAYOFWEEK 0x00000008L 1891#define SQL_FN_TD_DAYOFYEAR 0x00000010L 1892#define SQL_FN_TD_MONTH 0x00000020L 1893#define SQL_FN_TD_QUARTER 0x00000040L 1894#define SQL_FN_TD_WEEK 0x00000080L 1895#define SQL_FN_TD_YEAR 0x00000100L 1896#define SQL_FN_TD_CURTIME 0x00000200L 1897#define SQL_FN_TD_HOUR 0x00000400L 1898#define SQL_FN_TD_MINUTE 0x00000800L 1899#define SQL_FN_TD_SECOND 0x00001000L 1900#define SQL_FN_TD_TIMESTAMPADD 0x00002000L 1901#define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L 1902#define SQL_FN_TD_DAYNAME 0x00008000L 1903#define SQL_FN_TD_MONTHNAME 0x00010000L 1904#if (ODBCVER >= 0x0300) 1905#define SQL_FN_TD_CURRENT_DATE 0x00020000L 1906#define SQL_FN_TD_CURRENT_TIME 0x00040000L 1907#define SQL_FN_TD_CURRENT_TIMESTAMP 0x00080000L 1908#define SQL_FN_TD_EXTRACT 0x00100000L 1909#endif /* ODBCVER >= 0x0300 */ |
1462 | 1910 |
1463/* SQL_CREATE_COLLATION bitmasks */ 1464#define SQL_CCOL_CREATE_COLLATION 0x00000001L | |
1465 | 1911 |
1466/* SQL_CREATE_DOMAIN bitmasks */ 1467#define SQL_CDO_CREATE_DOMAIN 0x00000001L 1468#define SQL_CDO_DEFAULT 0x00000002L 1469#define SQL_CDO_CONSTRAINT 0x00000004L 1470#define SQL_CDO_COLLATION 0x00000008L 1471#define SQL_CDO_CONSTRAINT_NAME_DEFINITION 0x00000010L 1472#define SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L 1473#define SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L 1474#define SQL_CDO_CONSTRAINT_DEFERRABLE 0x00000080L 1475#define SQL_CDO_CONSTRAINT_NON_DEFERRABLE 0x00000100L | 1912/* 1913 * SQLGetInfo - SQL_TXN_ISOLATION_OPTION 1914 */ 1915#if (ODBCVER < 0x0300) 1916#define SQL_TXN_VERSIONING 0x00000010L 1917#endif /* ODBCVER < 0x0300 */ |
1476 | 1918 |
1477/* SQL_CREATE_TABLE bitmasks */ 1478#define SQL_CT_CREATE_TABLE 0x00000001L 1479#define SQL_CT_COMMIT_PRESERVE 0x00000002L 1480#define SQL_CT_COMMIT_DELETE 0x00000004L 1481#define SQL_CT_GLOBAL_TEMPORARY 0x00000008L 1482#define SQL_CT_LOCAL_TEMPORARY 0x00000010L 1483#define SQL_CT_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L 1484#define SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L 1485#define SQL_CT_CONSTRAINT_DEFERRABLE 0x00000080L 1486#define SQL_CT_CONSTRAINT_NON_DEFERRABLE 0x00000100L 1487#define SQL_CT_COLUMN_CONSTRAINT 0x00000200L 1488#define SQL_CT_COLUMN_DEFAULT 0x00000400L 1489#define SQL_CT_COLUMN_COLLATION 0x00000800L 1490#define SQL_CT_TABLE_CONSTRAINT 0x00001000L 1491#define SQL_CT_CONSTRAINT_NAME_DEFINITION 0x00002000L | |
1492 | 1919 |
1493/* SQL_DDL_INDEX bitmasks */ 1494#define SQL_DI_CREATE_INDEX 0x00000001L 1495#define SQL_DI_DROP_INDEX 0x00000002L | 1920/* 1921 * SQLGetInfo - SQL_UNION 1922 */ 1923#define SQL_U_UNION 0x00000001L 1924#define SQL_U_UNION_ALL 0x00000002L |
1496 | 1925 |
1497/* SQL_DROP_COLLATION bitmasks */ 1498#define SQL_DC_DROP_COLLATION 0x00000001L | |
1499 | 1926 |
1500/* SQL_DROP_DOMAIN bitmasks */ 1501#define SQL_DD_DROP_DOMAIN 0x00000001L 1502#define SQL_DD_RESTRICT 0x00000002L 1503#define SQL_DD_CASCADE 0x00000004L | 1927/* 1928 * SQLGetInfo - SQL_UNION_STATEMENT 1929 */ 1930#if (ODBCVER >= 0x0300) 1931#define SQL_US_UNION SQL_U_UNION 1932#define SQL_US_UNION_ALL SQL_U_UNION_ALL 1933#endif /* ODBCVER >= 0x0300 */ |
1504 | 1934 |
1505/* SQL_DROP_SCHEMA bitmasks */ 1506#define SQL_DS_DROP_SCHEMA 0x00000001L 1507#define SQL_DS_RESTRICT 0x00000002L 1508#define SQL_DS_CASCADE 0x00000004L | |
1509 | 1935 |
1510/* SQL_DROP_CHARACTER_SET bitmasks */ 1511#define SQL_DCS_DROP_CHARACTER_SET 0x00000001L | 1936/* 1937 * SQLGetStmtAttr - ODBC 2.x attributes 1938 */ 1939#define SQL_QUERY_TIMEOUT 0 1940#define SQL_MAX_ROWS 1 1941#define SQL_NOSCAN 2 1942#define SQL_MAX_LENGTH 3 1943#define SQL_ASYNC_ENABLE 4 1944#define SQL_BIND_TYPE 5 1945#define SQL_CURSOR_TYPE 6 1946#define SQL_CONCURRENCY 7 1947#define SQL_KEYSET_SIZE 8 1948#define SQL_ROWSET_SIZE 9 1949#define SQL_SIMULATE_CURSOR 10 1950#define SQL_RETRIEVE_DATA 11 1951#define SQL_USE_BOOKMARKS 12 1952#define SQL_GET_BOOKMARK 13 1953#define SQL_ROW_NUMBER 14 |
1512 | 1954 |
1513/* SQL_DROP_ASSERTION bitmasks */ 1514#define SQL_DA_DROP_ASSERTION 0x00000001L | |
1515 | 1955 |
1516/* SQL_DROP_TABLE bitmasks */ 1517#define SQL_DT_DROP_TABLE 0x00000001L 1518#define SQL_DT_RESTRICT 0x00000002L 1519#define SQL_DT_CASCADE 0x00000004L | 1956/* 1957 * SQLGetStmtAttr - ODBC 3.x attributes 1958 */ 1959#if (ODBCVER >= 0x0300) 1960#define SQL_ATTR_ASYNC_ENABLE 4 1961#define SQL_ATTR_CONCURRENCY SQL_CONCURRENCY 1962#define SQL_ATTR_CURSOR_TYPE SQL_CURSOR_TYPE 1963#define SQL_ATTR_ENABLE_AUTO_IPD 15 1964#define SQL_ATTR_FETCH_BOOKMARK_PTR 16 1965#define SQL_ATTR_KEYSET_SIZE SQL_KEYSET_SIZE 1966#define SQL_ATTR_MAX_LENGTH SQL_MAX_LENGTH 1967#define SQL_ATTR_MAX_ROWS SQL_MAX_ROWS 1968#define SQL_ATTR_NOSCAN SQL_NOSCAN 1969#define SQL_ATTR_PARAM_BIND_OFFSET_PTR 17 1970#define SQL_ATTR_PARAM_BIND_TYPE 18 1971#define SQL_ATTR_PARAM_OPERATION_PTR 19 1972#define SQL_ATTR_PARAM_STATUS_PTR 20 1973#define SQL_ATTR_PARAMS_PROCESSED_PTR 21 1974#define SQL_ATTR_PARAMSET_SIZE 22 1975#define SQL_ATTR_QUERY_TIMEOUT SQL_QUERY_TIMEOUT 1976#define SQL_ATTR_RETRIEVE_DATA SQL_RETRIEVE_DATA 1977#define SQL_ATTR_ROW_BIND_OFFSET_PTR 23 1978#define SQL_ATTR_ROW_BIND_TYPE SQL_BIND_TYPE 1979#define SQL_ATTR_ROW_NUMBER SQL_ROW_NUMBER /*GetStmtAttr*/ 1980#define SQL_ATTR_ROW_OPERATION_PTR 24 1981#define SQL_ATTR_ROW_STATUS_PTR 25 1982#define SQL_ATTR_ROWS_FETCHED_PTR 26 1983#define SQL_ATTR_ROW_ARRAY_SIZE 27 1984#define SQL_ATTR_SIMULATE_CURSOR SQL_SIMULATE_CURSOR 1985#define SQL_ATTR_USE_BOOKMARKS SQL_USE_BOOKMARKS 1986#endif /* ODBCVER >= 0x0300 */ |
1520 | 1987 |
1521/* SQL_DROP_TRANSLATION bitmasks */ 1522#define SQL_DTR_DROP_TRANSLATION 0x00000001L | 1988#if (ODBCVER < 0x0300) 1989#define SQL_STMT_OPT_MAX SQL_ROW_NUMBER 1990#define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT 1991#endif /* ODBCVER < 0x0300 */ |
1523 | 1992 |
1524/* SQL_DROP_VIEW bitmasks */ 1525#define SQL_DV_DROP_VIEW 0x00000001L 1526#define SQL_DV_RESTRICT 0x00000002L 1527#define SQL_DV_CASCADE 0x00000004L | |
1528 | 1993 |
1529/* SQL_INSERT_STATEMENT bitmasks */ 1530#define SQL_IS_INSERT_LITERALS 0x00000001L 1531#define SQL_IS_INSERT_SEARCHED 0x00000002L 1532#define SQL_IS_SELECT_INTO 0x00000004L | 1994/* 1995 * SQLGetStmtAttr - SQL_ATTR_ASYNC_ENABLE 1996 */ 1997#define SQL_ASYNC_ENABLE_OFF 0UL 1998#define SQL_ASYNC_ENABLE_ON 1UL 1999#define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF |
1533 | 2000 |
1534/* SQL_ODBC_INTERFACE_CONFORMANCE values */ 1535#define SQL_OIC_CORE 1UL 1536#define SQL_OIC_LEVEL1 2UL 1537#define SQL_OIC_LEVEL2 3UL | |
1538 | 2001 |
1539/* SQL_SQL92_FOREIGN_KEY_DELETE_RULE bitmasks */ 1540#define SQL_SFKD_CASCADE 0x00000001L 1541#define SQL_SFKD_NO_ACTION 0x00000002L 1542#define SQL_SFKD_SET_DEFAULT 0x00000004L 1543#define SQL_SFKD_SET_NULL 0x00000008L | 2002/* 2003 * SQLGetStmtAttr - SQL_ATTR_PARAM_BIND_TYPE 2004 */ 2005#if (ODBCVER >= 0x0300) 2006#define SQL_PARAM_BIND_BY_COLUMN 0UL 2007#define SQL_PARAM_BIND_TYPE_DEFAULT SQL_PARAM_BIND_BY_COLUMN 2008#endif /* ODBCVER >= 0x0300 */ |
1544 | 2009 |
1545/* SQL_SQL92_FOREIGN_KEY_UPDATE_RULE bitmasks */ 1546#define SQL_SFKU_CASCADE 0x00000001L 1547#define SQL_SFKU_NO_ACTION 0x00000002L 1548#define SQL_SFKU_SET_DEFAULT 0x00000004L 1549#define SQL_SFKU_SET_NULL 0x00000008L | |
1550 | 2010 |
1551/* SQL_SQL92_GRANT bitmasks */ 1552#define SQL_SG_USAGE_ON_DOMAIN 0x00000001L 1553#define SQL_SG_USAGE_ON_CHARACTER_SET 0x00000002L 1554#define SQL_SG_USAGE_ON_COLLATION 0x00000004L 1555#define SQL_SG_USAGE_ON_TRANSLATION 0x00000008L 1556#define SQL_SG_WITH_GRANT_OPTION 0x00000010L 1557#define SQL_SG_DELETE_TABLE 0x00000020L 1558#define SQL_SG_INSERT_TABLE 0x00000040L 1559#define SQL_SG_INSERT_COLUMN 0x00000080L 1560#define SQL_SG_REFERENCES_TABLE 0x00000100L 1561#define SQL_SG_REFERENCES_COLUMN 0x00000200L 1562#define SQL_SG_SELECT_TABLE 0x00000400L 1563#define SQL_SG_UPDATE_TABLE 0x00000800L 1564#define SQL_SG_UPDATE_COLUMN 0x00001000L | 2011/* 2012 * SQLGetStmtAttr - SQL_BIND_TYPE 2013 */ 2014#define SQL_BIND_BY_COLUMN 0UL 2015#define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN |
1565 | 2016 |
1566/* SQL_SQL92_PREDICATES bitmasks */ 1567#define SQL_SP_EXISTS 0x00000001L 1568#define SQL_SP_ISNOTNULL 0x00000002L 1569#define SQL_SP_ISNULL 0x00000004L 1570#define SQL_SP_MATCH_FULL 0x00000008L 1571#define SQL_SP_MATCH_PARTIAL 0x00000010L 1572#define SQL_SP_MATCH_UNIQUE_FULL 0x00000020L 1573#define SQL_SP_MATCH_UNIQUE_PARTIAL 0x00000040L 1574#define SQL_SP_OVERLAPS 0x00000080L 1575#define SQL_SP_UNIQUE 0x00000100L 1576#define SQL_SP_LIKE 0x00000200L 1577#define SQL_SP_IN 0x00000400L 1578#define SQL_SP_BETWEEN 0x00000800L 1579#define SQL_SP_COMPARISON 0x00001000L 1580#define SQL_SP_QUANTIFIED_COMPARISON 0x00002000L | |
1581 | 2017 |
1582/* SQL_SQL92_RELATIONAL_JOIN_OPERATORS bitmasks */ 1583#define SQL_SRJO_CORRESPONDING_CLAUSE 0x00000001L 1584#define SQL_SRJO_CROSS_JOIN 0x00000002L 1585#define SQL_SRJO_EXCEPT_JOIN 0x00000004L 1586#define SQL_SRJO_FULL_OUTER_JOIN 0x00000008L 1587#define SQL_SRJO_INNER_JOIN 0x00000010L 1588#define SQL_SRJO_INTERSECT_JOIN 0x00000020L 1589#define SQL_SRJO_LEFT_OUTER_JOIN 0x00000040L 1590#define SQL_SRJO_NATURAL_JOIN 0x00000080L 1591#define SQL_SRJO_RIGHT_OUTER_JOIN 0x00000100L 1592#define SQL_SRJO_UNION_JOIN 0x00000200L | 2018/* 2019 * SQLGetStmtAttr - SQL_CONCURRENCY 2020 */ 2021#define SQL_CONCUR_READ_ONLY 1 2022#define SQL_CONCUR_LOCK 2 2023#define SQL_CONCUR_ROWVER 3 2024#define SQL_CONCUR_VALUES 4 2025#define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY |
1593 | 2026 |
1594/* SQL_SQL92_REVOKE bitmasks */ 1595#define SQL_SR_USAGE_ON_DOMAIN 0x00000001L 1596#define SQL_SR_USAGE_ON_CHARACTER_SET 0x00000002L 1597#define SQL_SR_USAGE_ON_COLLATION 0x00000004L 1598#define SQL_SR_USAGE_ON_TRANSLATION 0x00000008L 1599#define SQL_SR_GRANT_OPTION_FOR 0x00000010L 1600#define SQL_SR_CASCADE 0x00000020L 1601#define SQL_SR_RESTRICT 0x00000040L 1602#define SQL_SR_DELETE_TABLE 0x00000080L 1603#define SQL_SR_INSERT_TABLE 0x00000100L 1604#define SQL_SR_INSERT_COLUMN 0x00000200L 1605#define SQL_SR_REFERENCES_TABLE 0x00000400L 1606#define SQL_SR_REFERENCES_COLUMN 0x00000800L 1607#define SQL_SR_SELECT_TABLE 0x00001000L 1608#define SQL_SR_UPDATE_TABLE 0x00002000L 1609#define SQL_SR_UPDATE_COLUMN 0x00004000L | |
1610 | 2027 |
1611/* SQL_SQL92_ROW_VALUE_CONSTRUCTOR bitmasks */ 1612#define SQL_SRVC_VALUE_EXPRESSION 0x00000001L 1613#define SQL_SRVC_NULL 0x00000002L 1614#define SQL_SRVC_DEFAULT 0x00000004L 1615#define SQL_SRVC_ROW_SUBQUERY 0x00000008L | 2028/* 2029 * SQLGetStmtAttr - SQL_CURSOR_TYPE 2030 */ 2031#define SQL_CURSOR_FORWARD_ONLY 0UL 2032#define SQL_CURSOR_KEYSET_DRIVEN 1UL 2033#define SQL_CURSOR_DYNAMIC 2UL 2034#define SQL_CURSOR_STATIC 3UL 2035#define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY |
1616 | 2036 |
1617/* SQL_SQL92_VALUE_EXPRESSIONS bitmasks */ 1618#define SQL_SVE_CASE 0x00000001L 1619#define SQL_SVE_CAST 0x00000002L 1620#define SQL_SVE_COALESCE 0x00000004L 1621#define SQL_SVE_NULLIF 0x00000008L | |
1622 | 2037 |
1623/* SQL_STANDARD_CLI_CONFORMANCE bitmasks */ 1624#define SQL_SCC_XOPEN_CLI_VERSION1 0x00000001L 1625#define SQL_SCC_ISO92_CLI 0x00000002L | 2038/* 2039 * SQLGetStmtAttr - SQL_KEYSET_SIZE 2040 */ 2041#define SQL_KEYSET_SIZE_DEFAULT 0UL |
1626 | 2042 |
1627/* SQL_UNION_STATEMENT bitmasks */ 1628#define SQL_US_UNION SQL_U_UNION 1629#define SQL_US_UNION_ALL SQL_U_UNION_ALL | |
1630 | 2043 |
1631#endif /* ODBCVER >= 0x0300 */ | 2044/* 2045 * SQLGetStmtAttr - SQL_MAX_LENGTH 2046 */ 2047#define SQL_MAX_LENGTH_DEFAULT 0UL |
1632 | 2048 |
1633/* SQL_DTC_TRANSITION_COST bitmasks */ 1634#define SQL_DTC_ENLIST_EXPENSIVE 0x00000001L 1635#define SQL_DTC_UNENLIST_EXPENSIVE 0x00000002L | |
1636 | 2049 |
1637/* additional SQLDataSources fetch directions */ 1638#if (ODBCVER >= 0x0300) 1639#define SQL_FETCH_FIRST_USER 31 1640#define SQL_FETCH_FIRST_SYSTEM 32 1641#endif /* ODBCVER >= 0x0300 */ | 2050/* 2051 * SQLGetStmtAttr - SQL_MAX_ROWS 2052 */ 2053#define SQL_MAX_ROWS_DEFAULT 0UL |
1642 1643 | 2054 2055 |
1644/* Defines for SQLSetPos */ 1645#define SQL_ENTIRE_ROWSET 0 | 2056/* 2057 * SQLGetStmtAttr - SQL_NOSCAN 2058 */ 2059#define SQL_NOSCAN_OFF 0UL /* 1.0 FALSE */ 2060#define SQL_NOSCAN_ON 1UL /* 1.0 TRUE */ 2061#define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF |
1646 | 2062 |
1647/* Operations in SQLSetPos */ 1648#define SQL_POSITION 0 /* 1.0 FALSE */ 1649#define SQL_REFRESH 1 /* 1.0 TRUE */ 1650#define SQL_UPDATE 2 1651#define SQL_DELETE 3 | |
1652 | 2063 |
1653/* Operations in SQLBulkOperations */ 1654#define SQL_ADD 4 1655#define SQL_SETPOS_MAX_OPTION_VALUE SQL_ADD 1656#if (ODBCVER >= 0x0300) 1657#define SQL_UPDATE_BY_BOOKMARK 5 1658#define SQL_DELETE_BY_BOOKMARK 6 1659#define SQL_FETCH_BY_BOOKMARK 7 | 2064/* 2065 * SQLGetStmtAttr - SQL_QUERY_TIMEOUT 2066 */ 2067#define SQL_QUERY_TIMEOUT_DEFAULT 0UL |
1660 | 2068 |
1661#endif /* ODBCVER >= 0x0300 */ | |
1662 | 2069 |
1663/* Lock options in SQLSetPos */ 1664#define SQL_LOCK_NO_CHANGE 0 /* 1.0 FALSE */ 1665#define SQL_LOCK_EXCLUSIVE 1 /* 1.0 TRUE */ 1666#define SQL_LOCK_UNLOCK 2 | 2070/* 2071 * SQLGetStmtAttr - SQL_RETRIEVE_DATA 2072 */ 2073#define SQL_RD_OFF 0UL 2074#define SQL_RD_ON 1UL 2075#define SQL_RD_DEFAULT SQL_RD_ON |
1667 | 2076 |
1668#define SQL_SETPOS_MAX_LOCK_VALUE SQL_LOCK_UNLOCK | |
1669 | 2077 |
1670/* Macros for SQLSetPos */ 1671#define SQL_POSITION_TO(hstmt,irow) SQLSetPos(hstmt,irow,SQL_POSITION,SQL_LOCK_NO_CHANGE) 1672#define SQL_LOCK_RECORD(hstmt,irow,fLock) SQLSetPos(hstmt,irow,SQL_POSITION,fLock) 1673#define SQL_REFRESH_RECORD(hstmt,irow,fLock) SQLSetPos(hstmt,irow,SQL_REFRESH,fLock) 1674#define SQL_UPDATE_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_UPDATE,SQL_LOCK_NO_CHANGE) 1675#define SQL_DELETE_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_DELETE,SQL_LOCK_NO_CHANGE) 1676#define SQL_ADD_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_ADD,SQL_LOCK_NO_CHANGE) | 2078/* 2079 * SQLGetStmtAttr - SQL_ROWSET_SIZE 2080 */ 2081#define SQL_ROWSET_SIZE_DEFAULT 1UL |
1677 | 2082 |
1678/* Column types and scopes in SQLSpecialColumns. */ 1679#define SQL_BEST_ROWID 1 1680#define SQL_ROWVER 2 | |
1681 | 2083 |
1682/* Defines for SQLSpecialColumns (returned in the result set) 1683 SQL_PC_UNKNOWN and SQL_PC_PSEUDO are defined in sql.h */ 1684#define SQL_PC_NOT_PSEUDO 1 | 2084/* 2085 * SQLGetStmtAttr - SQL_SIMULATE_CURSOR 2086 */ 2087#define SQL_SC_NON_UNIQUE 0UL 2088#define SQL_SC_TRY_UNIQUE 1UL 2089#define SQL_SC_UNIQUE 2UL |
1685 | 2090 |
1686/* Defines for SQLStatistics */ 1687#define SQL_QUICK 0 1688#define SQL_ENSURE 1 | |
1689 | 2091 |
1690/* Defines for SQLStatistics (returned in the result set) 1691 SQL_INDEX_CLUSTERED, SQL_INDEX_HASHED, and SQL_INDEX_OTHER are 1692 defined in sql.h */ 1693#define SQL_TABLE_STAT 0 | 2092/* 2093 * SQLGetStmtAttr - SQL_USE_BOOKMARKS 2094 */ 2095#define SQL_UB_OFF 0UL 2096#define SQL_UB_ON 1UL 2097#define SQL_UB_DEFAULT SQL_UB_OFF 2098#if (ODBCVER >= 0x0300) 2099#define SQL_UB_FIXED SQL_UB_ON 2100#define SQL_UB_VARIABLE 2UL 2101#endif /* ODBCVER >= 0x0300 */ |
1694 1695 | 2102 2103 |
1696/* Defines for SQLTables */ | 2104/* 2105 * SQLGetTypeInfo - SEARCHABLE 2106 */ |
1697#if (ODBCVER >= 0x0300) | 2107#if (ODBCVER >= 0x0300) |
1698#define SQL_ALL_CATALOGS "%" 1699#define SQL_ALL_SCHEMAS "%" 1700#define SQL_ALL_TABLE_TYPES "%" 1701#endif /* ODBCVER >= 0x0300 */ | 2108#define SQL_COL_PRED_CHAR SQL_LIKE_ONLY 2109#define SQL_COL_PRED_BASIC SQL_ALL_EXCEPT_LIKE 2110#endif /* ODBCVER >= 0x0300 */ |
1702 | 2111 |
1703/* Options for SQLDriverConnect */ 1704#define SQL_DRIVER_NOPROMPT 0 1705#define SQL_DRIVER_COMPLETE 1 1706#define SQL_DRIVER_PROMPT 2 1707#define SQL_DRIVER_COMPLETE_REQUIRED 3 | |
1708 | 2112 |
1709SQLRETURN SQL_API SQLDriverConnect( 1710 SQLHDBC hdbc, 1711 SQLHWND hwnd, 1712 SQLCHAR *szConnStrIn, 1713 SQLSMALLINT cbConnStrIn, 1714 SQLCHAR *szConnStrOut, 1715 SQLSMALLINT cbConnStrOutMax, 1716 SQLSMALLINT *pcbConnStrOut, 1717 SQLUSMALLINT fDriverCompletion); | 2113/* 2114 * SQLSetPos 2115 */ 2116#define SQL_ENTIRE_ROWSET 0 |
1718 | 2117 |
1719/* Level 2 Functions */ | |
1720 | 2118 |
1721/* SQLExtendedFetch "fFetchType" values */ 1722#define SQL_FETCH_BOOKMARK 8 | 2119/* 2120 * SQLSetPos - Operation 2121 */ 2122#define SQL_POSITION 0 2123#define SQL_REFRESH 1 2124#define SQL_UPDATE 2 2125#define SQL_DELETE 3 |
1723 | 2126 |
1724/* SQLExtendedFetch "rgfRowStatus" element values */ 1725#define SQL_ROW_SUCCESS 0 1726#define SQL_ROW_DELETED 1 1727#define SQL_ROW_UPDATED 2 1728#define SQL_ROW_NOROW 3 1729#define SQL_ROW_ADDED 4 1730#define SQL_ROW_ERROR 5 1731#if (ODBCVER >= 0x0300) 1732#define SQL_ROW_SUCCESS_WITH_INFO 6 1733#define SQL_ROW_PROCEED 0 1734#define SQL_ROW_IGNORE 1 1735#endif | |
1736 | 2127 |
1737/* value for SQL_DESC_ARRAY_STATUS_PTR */ | 2128/* 2129 * SQLBulkOperations - Operation 2130 */ 2131#define SQL_ADD 4 2132#define SQL_SETPOS_MAX_OPTION_VALUE SQL_ADD |
1738#if (ODBCVER >= 0x0300) | 2133#if (ODBCVER >= 0x0300) |
1739#define SQL_PARAM_SUCCESS 0 1740#define SQL_PARAM_SUCCESS_WITH_INFO 6 1741#define SQL_PARAM_ERROR 5 1742#define SQL_PARAM_UNUSED 7 1743#define SQL_PARAM_DIAG_UNAVAILABLE 1 | 2134#define SQL_UPDATE_BY_BOOKMARK 5 2135#define SQL_DELETE_BY_BOOKMARK 6 2136#define SQL_FETCH_BY_BOOKMARK 7 2137#endif /* ODBCVER >= 0x0300 */ |
1744 | 2138 |
1745#define SQL_PARAM_PROCEED 0 1746#define SQL_PARAM_IGNORE 1 1747#endif /* ODBCVER >= 0x0300 */ | |
1748 | 2139 |
1749/* Defines for SQLForeignKeys (UPDATE_RULE and DELETE_RULE) */ 1750#define SQL_CASCADE 0 1751#define SQL_RESTRICT 1 1752#define SQL_SET_NULL 2 1753#if (ODBCVER >= 0x0250) 1754#define SQL_NO_ACTION 3 1755#define SQL_SET_DEFAULT 4 1756#endif /* ODBCVER >= 0x0250 */ | 2140/* 2141 * SQLSetPos - LockType 2142 */ 2143#define SQL_LOCK_NO_CHANGE 0 2144#define SQL_LOCK_EXCLUSIVE 1 2145#define SQL_LOCK_UNLOCK 2 2146#define SQL_SETPOS_MAX_LOCK_VALUE SQL_LOCK_UNLOCK |
1757 | 2147 |
1758#if (ODBCVER >= 0x0300) 1759/* Note that the following are in a different column of SQLForeignKeys than */ 1760/* the previous #defines. These are for DEFERRABILITY. */ | |
1761 | 2148 |
1762#define SQL_INITIALLY_DEFERRED 5 1763#define SQL_INITIALLY_IMMEDIATE 6 1764#define SQL_NOT_DEFERRABLE 7 | 2149/* 2150 * SQLSetPos macros 2151 */ 2152#define SQL_POSITION_TO(hstmt,irow) \ 2153 SQLSetPos(hstmt,irow,SQL_POSITION,SQL_LOCK_NO_CHANGE) 2154#define SQL_LOCK_RECORD(hstmt,irow,fLock) \ 2155 SQLSetPos(hstmt,irow,SQL_POSITION,fLock) 2156#define SQL_REFRESH_RECORD(hstmt,irow,fLock) \ 2157 SQLSetPos(hstmt,irow,SQL_REFRESH,fLock) 2158#define SQL_UPDATE_RECORD(hstmt,irow) \ 2159 SQLSetPos(hstmt,irow,SQL_UPDATE,SQL_LOCK_NO_CHANGE) 2160#define SQL_DELETE_RECORD(hstmt,irow) \ 2161 SQLSetPos(hstmt,irow,SQL_DELETE,SQL_LOCK_NO_CHANGE) 2162#define SQL_ADD_RECORD(hstmt,irow) \ 2163 SQLSetPos(hstmt,irow,SQL_ADD,SQL_LOCK_NO_CHANGE) |
1765 | 2164 |
1766#endif /* ODBCVER >= 0x0300 */ | |
1767 | 2165 |
1768/* Defines for SQLBindParameter and 1769 SQLProcedureColumns (returned in the result set) */ 1770#define SQL_PARAM_TYPE_UNKNOWN 0 1771#define SQL_PARAM_INPUT 1 1772#define SQL_PARAM_INPUT_OUTPUT 2 1773#define SQL_RESULT_COL 3 1774#define SQL_PARAM_OUTPUT 4 1775#define SQL_RETURN_VALUE 5 | 2166/* 2167 * SQLSpecialColumns - Column types and scopes 2168 */ 2169#define SQL_BEST_ROWID 1 2170#define SQL_ROWVER 2 |
1776 | 2171 |
1777/* Defines for SQLProcedures (returned in the result set) */ 1778#define SQL_PT_UNKNOWN 0 1779#define SQL_PT_PROCEDURE 1 1780#define SQL_PT_FUNCTION 2 | |
1781 | 2172 |
1782/* This define is too large for RC */ 1783#define SQL_ODBC_KEYWORDS "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,"\ | 2173/* 2174 * All the ODBC keywords 2175 */ 2176#define SQL_ODBC_KEYWORDS \ 2177"ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,"\ |
1784"ASC,ASSERTION,AT,AUTHORIZATION,AVG,"\ 1785"BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,"\ 1786"CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,"\ 1787"COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"\ 1788"CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"\ 1789"CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"\ 1790"DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"\ 1791"DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,"\ --- 15 unchanged lines hidden (view full) --- 1807"SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,"\ 1808"SUBSTRING,SUM,SYSTEM_USER,"\ 1809"TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"\ 1810"TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"\ 1811"UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"\ 1812"VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,"\ 1813"YEAR,ZONE" 1814 | 2178"ASC,ASSERTION,AT,AUTHORIZATION,AVG,"\ 2179"BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,"\ 2180"CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,"\ 2181"COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"\ 2182"CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"\ 2183"CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"\ 2184"DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"\ 2185"DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,"\ --- 15 unchanged lines hidden (view full) --- 2201"SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,"\ 2202"SUBSTRING,SUM,SYSTEM_USER,"\ 2203"TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"\ 2204"TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"\ 2205"UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"\ 2206"VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,"\ 2207"YEAR,ZONE" 2208 |
1815SQLRETURN SQL_API SQLBrowseConnect( 1816 SQLHDBC hdbc, 1817 SQLCHAR *szConnStrIn, 1818 SQLSMALLINT cbConnStrIn, 1819 SQLCHAR *szConnStrOut, 1820 SQLSMALLINT cbConnStrOutMax, 1821 SQLSMALLINT *pcbConnStrOut); | |
1822 | 2209 |
2210/* 2211 * ---------------------------------------------------------------------- 2212 * Level 2 Functions 2213 * ---------------------------------------------------------------------- 2214 */ 2215 2216/* 2217 * SQLExtendedFetch - fFetchType 2218 */ 2219#define SQL_FETCH_BOOKMARK 8 2220 2221 2222/* 2223 * SQLExtendedFetch - rgfRowStatus 2224 */ 2225#define SQL_ROW_SUCCESS 0 2226#define SQL_ROW_DELETED 1 2227#define SQL_ROW_UPDATED 2 2228#define SQL_ROW_NOROW 3 2229#define SQL_ROW_ADDED 4 2230#define SQL_ROW_ERROR 5 |
|
1823#if (ODBCVER >= 0x0300) | 2231#if (ODBCVER >= 0x0300) |
1824SQLRETURN SQL_API SQLBulkOperations( 1825 SQLHSTMT StatementHandle, 1826 SQLSMALLINT Operation); 1827#endif /* ODBCVER >= 0x0300 */ | 2232#define SQL_ROW_SUCCESS_WITH_INFO 6 2233#define SQL_ROW_PROCEED 0 2234#define SQL_ROW_IGNORE 1 2235#endif |
1828 | 2236 |
1829SQLRETURN SQL_API SQLColAttributes( 1830 SQLHSTMT hstmt, 1831 SQLUSMALLINT icol, 1832 SQLUSMALLINT fDescType, 1833 SQLPOINTER rgbDesc, 1834 SQLSMALLINT cbDescMax, 1835 SQLSMALLINT *pcbDesc, 1836 SQLLEN *pfDesc); | |
1837 | 2237 |
1838SQLRETURN SQL_API SQLColumnPrivileges( 1839 SQLHSTMT hstmt, 1840 SQLCHAR *szCatalogName, 1841 SQLSMALLINT cbCatalogName, 1842 SQLCHAR *szSchemaName, 1843 SQLSMALLINT cbSchemaName, 1844 SQLCHAR *szTableName, 1845 SQLSMALLINT cbTableName, 1846 SQLCHAR *szColumnName, 1847 SQLSMALLINT cbColumnName); | 2238/* 2239 * SQL_DESC_ARRAY_STATUS_PTR 2240 */ 2241#if (ODBCVER >= 0x0300) 2242#define SQL_PARAM_SUCCESS 0 2243#define SQL_PARAM_SUCCESS_WITH_INFO 6 2244#define SQL_PARAM_ERROR 5 2245#define SQL_PARAM_UNUSED 7 2246#define SQL_PARAM_DIAG_UNAVAILABLE 1 |
1848 | 2247 |
1849SQLRETURN SQL_API SQLDescribeParam( 1850 SQLHSTMT hstmt, 1851 SQLUSMALLINT ipar, 1852 SQLSMALLINT *pfSqlType, 1853 SQLULEN *pcbParamDef, 1854 SQLSMALLINT *pibScale, 1855 SQLSMALLINT *pfNullable); | 2248#define SQL_PARAM_PROCEED 0 2249#define SQL_PARAM_IGNORE 1 2250#endif /* ODBCVER >= 0x0300 */ |
1856 | 2251 |
1857SQLRETURN SQL_API SQLExtendedFetch( 1858 SQLHSTMT hstmt, 1859 SQLUSMALLINT fFetchType, 1860 SQLLEN irow, 1861 SQLULEN *pcrow, 1862 SQLUSMALLINT *rgfRowStatus); | |
1863 | 2252 |
1864SQLRETURN SQL_API SQLForeignKeys( 1865 SQLHSTMT hstmt, 1866 SQLCHAR *szPkCatalogName, 1867 SQLSMALLINT cbPkCatalogName, 1868 SQLCHAR *szPkSchemaName, 1869 SQLSMALLINT cbPkSchemaName, 1870 SQLCHAR *szPkTableName, 1871 SQLSMALLINT cbPkTableName, 1872 SQLCHAR *szFkCatalogName, 1873 SQLSMALLINT cbFkCatalogName, 1874 SQLCHAR *szFkSchemaName, 1875 SQLSMALLINT cbFkSchemaName, 1876 SQLCHAR *szFkTableName, 1877 SQLSMALLINT cbFkTableName); | 2253/* 2254 * SQLForeignKeys - UPDATE_RULE/DELETE_RULE 2255 */ 2256#define SQL_CASCADE 0 2257#define SQL_RESTRICT 1 2258#define SQL_SET_NULL 2 |
1878 | 2259 |
1879SQLRETURN SQL_API SQLMoreResults( 1880 SQLHSTMT hstmt); | 2260#if (ODBCVER >= 0x0250) 2261#define SQL_NO_ACTION 3 2262#define SQL_SET_DEFAULT 4 2263#endif /* ODBCVER >= 0x0250 */ |
1881 | 2264 |
1882SQLRETURN SQL_API SQLNativeSql( 1883 SQLHDBC hdbc, 1884 SQLCHAR *szSqlStrIn, 1885 SQLINTEGER cbSqlStrIn, 1886 SQLCHAR *szSqlStr, 1887 SQLINTEGER cbSqlStrMax, 1888 SQLINTEGER *pcbSqlStr); | |
1889 | 2265 |
1890SQLRETURN SQL_API SQLNumParams( 1891 SQLHSTMT hstmt, 1892 SQLSMALLINT *pcpar); | 2266/* 2267 * SQLForeignKeys - DEFERABILITY 2268 */ 2269#if (ODBCVER >= 0x0300) 2270#define SQL_INITIALLY_DEFERRED 5 2271#define SQL_INITIALLY_IMMEDIATE 6 2272#define SQL_NOT_DEFERRABLE 7 2273#endif /* ODBCVER >= 0x0300 */ |
1893 | 2274 |
1894SQLRETURN SQL_API SQLParamOptions( 1895 SQLHSTMT hstmt, 1896 SQLULEN crow, 1897 SQLULEN *pirow); | |
1898 | 2275 |
1899SQLRETURN SQL_API SQLPrimaryKeys( 1900 SQLHSTMT hstmt, 1901 SQLCHAR *szCatalogName, 1902 SQLSMALLINT cbCatalogName, 1903 SQLCHAR *szSchemaName, 1904 SQLSMALLINT cbSchemaName, 1905 SQLCHAR *szTableName, 1906 SQLSMALLINT cbTableName); | 2276/* 2277 * SQLBindParameter - fParamType 2278 * SQLProcedureColumns - COLUMN_TYPE 2279 */ 2280#define SQL_PARAM_TYPE_UNKNOWN 0 2281#define SQL_PARAM_INPUT 1 2282#define SQL_PARAM_INPUT_OUTPUT 2 2283#define SQL_RESULT_COL 3 2284#define SQL_PARAM_OUTPUT 4 2285#define SQL_RETURN_VALUE 5 |
1907 | 2286 |
1908SQLRETURN SQL_API SQLProcedureColumns( 1909 SQLHSTMT hstmt, 1910 SQLCHAR *szCatalogName, 1911 SQLSMALLINT cbCatalogName, 1912 SQLCHAR *szSchemaName, 1913 SQLSMALLINT cbSchemaName, 1914 SQLCHAR *szProcName, 1915 SQLSMALLINT cbProcName, 1916 SQLCHAR *szColumnName, 1917 SQLSMALLINT cbColumnName); | |
1918 | 2287 |
1919SQLRETURN SQL_API SQLProcedures( 1920 SQLHSTMT hstmt, 1921 SQLCHAR *szCatalogName, 1922 SQLSMALLINT cbCatalogName, 1923 SQLCHAR *szSchemaName, 1924 SQLSMALLINT cbSchemaName, 1925 SQLCHAR *szProcName, 1926 SQLSMALLINT cbProcName); | 2288/* 2289 * SQLProcedures - PROCEDURE_TYPE 2290 */ 2291#define SQL_PT_UNKNOWN 0 2292#define SQL_PT_PROCEDURE 1 2293#define SQL_PT_FUNCTION 2 |
1927 | 2294 |
1928SQLRETURN SQL_API SQLSetPos( 1929 SQLHSTMT hstmt, 1930 SQLSETPOSIROW irow, 1931 SQLUSMALLINT fOption, 1932 SQLUSMALLINT fLock); | |
1933 | 2295 |
1934SQLRETURN SQL_API SQLTablePrivileges( 1935 SQLHSTMT hstmt, 1936 SQLCHAR *szCatalogName, 1937 SQLSMALLINT cbCatalogName, 1938 SQLCHAR *szSchemaName, 1939 SQLSMALLINT cbSchemaName, 1940 SQLCHAR *szTableName, 1941 SQLSMALLINT cbTableName); | 2296/* 2297 * SQLSetParam to SQLBindParameter conversion 2298 */ 2299#define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT 2300#define SQL_SETPARAM_VALUE_MAX (-1L) |
1942 | 2301 |
1943SQLRETURN SQL_API SQLDrivers( 1944 SQLHENV henv, 1945 SQLUSMALLINT fDirection, 1946 SQLCHAR *szDriverDesc, 1947 SQLSMALLINT cbDriverDescMax, 1948 SQLSMALLINT *pcbDriverDesc, 1949 SQLCHAR *szDriverAttributes, 1950 SQLSMALLINT cbDrvrAttrMax, 1951 SQLSMALLINT *pcbDrvrAttr); | |
1952 | 2302 |
1953SQLRETURN SQL_API SQLBindParameter( 1954 SQLHSTMT hstmt, 1955 SQLUSMALLINT ipar, 1956 SQLSMALLINT fParamType, 1957 SQLSMALLINT fCType, 1958 SQLSMALLINT fSqlType, 1959 SQLULEN cbColDef, 1960 SQLSMALLINT ibScale, 1961 SQLPOINTER rgbValue, 1962 SQLLEN cbValueMax, 1963 SQLLEN *pcbValue); | 2303/* 2304 * SQLStatistics - fAccuracy 2305 */ 2306#define SQL_QUICK 0 2307#define SQL_ENSURE 1 |
1964 | 2308 |
1965/*---------------------------------------------------------*/ 1966/* SQLAllocHandleStd is implemented to make SQLAllocHandle */ 1967/* compatible with X/Open standard. an application should */ 1968/* not call SQLAllocHandleStd directly */ 1969/*---------------------------------------------------------*/ 1970#ifdef ODBC_STD 1971#define SQLAllocHandle SQLAllocHandleStd 1972#define SQLAllocEnv(phenv) SQLAllocHandleStd(SQL_HANDLE_ENV, SQL_NULL_HANDLE, phenv) | |
1973 | 2309 |
1974/* Internal type subcodes */ 1975#define SQL_YEAR SQL_CODE_YEAR 1976#define SQL_MONTH SQL_CODE_MONTH 1977#define SQL_DAY SQL_CODE_DAY 1978#define SQL_HOUR SQL_CODE_HOUR 1979#define SQL_MINUTE SQL_CODE_MINUTE 1980#define SQL_SECOND SQL_CODE_SECOND 1981#define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MONTH 1982#define SQL_DAY_TO_HOUR SQL_CODE_DAY_TO_HOUR 1983#define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINUTE 1984#define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECOND 1985#define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MINUTE 1986#define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SECOND 1987#define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND 1988#endif /* ODBC_STD */ | 2310/* 2311 * SQLStatistics - TYPE 2312 */ 2313#define SQL_TABLE_STAT 0 |
1989 | 2314 |
2315 2316/* 2317 * SQLTables 2318 */ |
|
1990#if (ODBCVER >= 0x0300) | 2319#if (ODBCVER >= 0x0300) |
1991SQLRETURN SQL_API SQLAllocHandleStd( 1992 SQLSMALLINT fHandleType, 1993 SQLHANDLE hInput, 1994 SQLHANDLE *phOutput); 1995#endif | 2320#define SQL_ALL_CATALOGS "%" 2321#define SQL_ALL_SCHEMAS "%" 2322#define SQL_ALL_TABLE_TYPES "%" 2323#endif /* ODBCVER >= 0x0300 */ |
1996 | 2324 |
1997/* Deprecated defines from prior versions of ODBC */ 1998#define SQL_DATABASE_NAME 16 /* Use SQLGetConnectOption/SQL_CURRENT_QUALIFIER */ 1999#define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR 2000#define SQL_FETCH_PREV SQL_FETCH_PRIOR 2001#define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER 2002#define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER 2003#define SQL_CC_DELETE SQL_CB_DELETE 2004#define SQL_CR_DELETE SQL_CB_DELETE 2005#define SQL_CC_CLOSE SQL_CB_CLOSE 2006#define SQL_CR_CLOSE SQL_CB_CLOSE 2007#define SQL_CC_PRESERVE SQL_CB_PRESERVE 2008#define SQL_CR_PRESERVE SQL_CB_PRESERVE 2009/* SQL_FETCH_RESUME is not supported by 2.0+ drivers 2010#define SQL_FETCH_RESUME 7 2011*/ 2012#define SQL_SCROLL_FORWARD_ONLY 0L /*-SQL_CURSOR_FORWARD_ONLY */ 2013#define SQL_SCROLL_KEYSET_DRIVEN (-1L) /*-SQL_CURSOR_KEYSET_DRIVEN */ 2014#define SQL_SCROLL_DYNAMIC (-2L) /*-SQL_CURSOR_DYNAMIC */ 2015#define SQL_SCROLL_STATIC (-3L) /*-SQL_CURSOR_STATIC */ | 2325/* 2326 * SQLSpecialColumns - PSEUDO_COLUMN 2327 */ 2328#define SQL_PC_NOT_PSEUDO 1 |
2016 | 2329 |
2017/* Deprecated functions from prior versions of ODBC */ 2018SQLRETURN SQL_API SQLSetScrollOptions( /* Use SQLSetStmtOptions */ 2019 SQLHSTMT hstmt, 2020 SQLUSMALLINT fConcurrency, 2021 SQLLEN crowKeyset, 2022 SQLUSMALLINT crowRowset); | |
2023 | 2330 |
2024/*! 2025 * \defgroup Tracing. 2026 * 2027 * unixODBC implements a slight variation of the tracing mechanism used 2028 * on MS platforms. The unixODBC method loses the ability to produce trace 2029 * output for invalid handles but gains the following; 2030 * 2031 * - better concurrency 2032 * - allows tracing to be turned on/off and configured at finer granularity 2033 * - hopefully; better performance 2034 * 2035 * unixODBC provides a cross-platform helper library called 'trace' and an 2036 * example/default trace plugin called 'odbctrac'. Those writing an ODBC 2037 * driver can use the 'trace' helper library (a static library). Those wanting 2038 * to create custom trace output can implement a different version of the 2039 * 'odbctrac' plugin. 2040 * 2041 * The text file driver (odbctxt) included with unixODBC is an example of a 2042 * driver using the 'trace' helper library. 2043 * 2044 * The 'trace' library and the example plugin 'odbctrac' are designed to be 2045 * portable on all platforms where unixODBC is available and on MS platforms. 2046 * This will allow drivers using 'trace' and 'odbctrac' plugin to equilly 2047 * portable. On MS platforms - this compliments traditional tracing (mostly 2048 * just used by the Driver Manager). 2049 * 2050 * \sa trace 2051 * odbctxt 2052 * odbctrac | 2331/* 2332 * Deprecated defines from prior versions of ODBC |
2053 */ | 2333 */ |
2054/*@{*/ 2055#define TRACE_VERSION 1000 /*!< Version of trace API */ 2056#ifdef UNICODE 2057RETCODE TraceOpenLogFile(SQLPOINTER,LPWSTR,LPWSTR,DWORD); /*!< open a trace log file */ 2058#else 2059RETCODE TraceOpenLogFile(SQLPOINTER,LPSTR,LPSTR,DWORD); /*!< open a trace log file */ | 2334#define SQL_DATABASE_NAME 16 2335#define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR 2336#define SQL_FETCH_PREV SQL_FETCH_PRIOR 2337#define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER 2338#define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER 2339#define SQL_CC_DELETE SQL_CB_DELETE 2340#define SQL_CR_DELETE SQL_CB_DELETE 2341#define SQL_CC_CLOSE SQL_CB_CLOSE 2342#define SQL_CR_CLOSE SQL_CB_CLOSE 2343#define SQL_CC_PRESERVE SQL_CB_PRESERVE 2344#define SQL_CR_PRESERVE SQL_CB_PRESERVE 2345#if (ODBCVER < 0x0200) 2346#define SQL_FETCH_RESUME 7 |
2060#endif | 2347#endif |
2061RETCODE TraceCloseLogFile(SQLPOINTER); /*!< Request to close a trace log */ 2062SQLRETURN TraceReturn(SQLPOINTER,SQLRETURN); /*!< Call to produce trace output upon function return. */ 2063#ifdef __cplusplus 2064DWORD TraceVersion(); /*!< Returns trace API version */ 2065#else 2066DWORD TraceVersion(VOID); /*!< Returns trace API version */ 2067#endif | 2348#define SQL_SCROLL_FORWARD_ONLY 0L 2349#define SQL_SCROLL_KEYSET_DRIVEN (-1L) 2350#define SQL_SCROLL_DYNAMIC (-2L) 2351#define SQL_SCROLL_STATIC (-3L) |
2068 | 2352 |
2069/* Functions for Visual Studio Analyzer*/ 2070/* to turn on/off tracing or VS events, call TraceVSControl by setting or clearing the following bits */ 2071#define TRACE_ON 0x00000001L 2072#define TRACE_VS_EVENT_ON 0x00000002L | |
2073 | 2353 |
2074RETCODE TraceVSControl(DWORD); | 2354/* 2355 * Level 1 function prototypes 2356 */ 2357SQLRETURN SQL_API SQLDriverConnect ( 2358 SQLHDBC hdbc, 2359 SQLHWND hwnd, 2360 SQLCHAR * szConnStrIn, 2361 SQLSMALLINT cbConnStrIn, 2362 SQLCHAR * szConnStrOut, 2363 SQLSMALLINT cbConnStrOutMax, 2364 SQLSMALLINT * pcbConnStrOut, 2365 SQLUSMALLINT fDriverCompletion); |
2075 | 2366 |
2076/* the flags in ODBC_VS_ARGS */ 2077#define ODBC_VS_FLAG_UNICODE_ARG 0x00000001L /* the argument is unicode */ 2078#define ODBC_VS_FLAG_UNICODE_COR 0x00000002L /* the correlation is unicode */ 2079#define ODBC_VS_FLAG_RETCODE 0x00000004L /* RetCode field is set */ 2080#define ODBC_VS_FLAG_STOP 0x00000008L /* Stop firing visual studio analyzer events */ | 2367/* 2368 * Level 2 function prototypes 2369 */ |
2081 | 2370 |
2082typedef struct tagODBC_VS_ARGS { 2083#ifdef GUID_DEFINED 2084 const GUID *pguidEvent; /* the GUID for event */ 2085#else 2086 const void *pguidEvent; /* the GUID for event */ 2087#endif 2088 DWORD dwFlags; /* flags for the call */ 2089 union { 2090 WCHAR *wszArg; 2091 CHAR *szArg; 2092 }u1; 2093 union { 2094 WCHAR *wszCorrelation; 2095 CHAR *szCorrelation; 2096 }u2; 2097 RETCODE RetCode; 2098} ODBC_VS_ARGS, *PODBC_VS_ARGS; | 2371SQLRETURN SQL_API SQLBrowseConnect ( 2372 SQLHDBC hdbc, 2373 SQLCHAR * szConnStrIn, 2374 SQLSMALLINT cbConnStrIn, 2375 SQLCHAR * szConnStrOut, 2376 SQLSMALLINT cbConnStrOutMax, 2377 SQLSMALLINT * pcbConnStrOut); |
2099 | 2378 |
2100VOID FireVSDebugEvent(PODBC_VS_ARGS); 2101/*@}*/ | 2379#if (ODBCVER >= 0x0300) 2380SQLRETURN SQL_API SQLBulkOperations ( 2381 SQLHSTMT StatementHandle, 2382 SQLSMALLINT Operation); 2383#endif /* ODBCVER >= 0x0300 */ |
2102 | 2384 |
2103#ifdef __cplusplus 2104} 2105#endif | 2385SQLRETURN SQL_API SQLColAttributes ( 2386 SQLHSTMT hstmt, 2387 SQLUSMALLINT icol, 2388 SQLUSMALLINT fDescType, 2389 SQLPOINTER rgbDesc, 2390 SQLSMALLINT cbDescMax, 2391 SQLSMALLINT * pcbDesc, 2392 SQLLEN * pfDesc); |
2106 | 2393 |
2394SQLRETURN SQL_API SQLColumnPrivileges ( 2395 SQLHSTMT hstmt, 2396 SQLCHAR * szCatalogName, 2397 SQLSMALLINT cbCatalogName, 2398 SQLCHAR * szSchemaName, 2399 SQLSMALLINT cbSchemaName, 2400 SQLCHAR * szTableName, 2401 SQLSMALLINT cbTableName, 2402 SQLCHAR * szColumnName, 2403 SQLSMALLINT cbColumnName); 2404 2405SQLRETURN SQL_API SQLDescribeParam ( 2406 SQLHSTMT hstmt, 2407 SQLUSMALLINT ipar, 2408 SQLSMALLINT * pfSqlType, 2409 SQLULEN * pcbParamDef, 2410 SQLSMALLINT * pibScale, 2411 SQLSMALLINT * pfNullable); 2412 2413SQLRETURN SQL_API SQLExtendedFetch ( 2414 SQLHSTMT hstmt, 2415 SQLUSMALLINT fFetchType, 2416 SQLLEN irow, 2417 SQLULEN * pcrow, 2418 SQLUSMALLINT * rgfRowStatus); 2419 2420SQLRETURN SQL_API SQLForeignKeys ( 2421 SQLHSTMT hstmt, 2422 SQLCHAR * szPkCatalogName, 2423 SQLSMALLINT cbPkCatalogName, 2424 SQLCHAR * szPkSchemaName, 2425 SQLSMALLINT cbPkSchemaName, 2426 SQLCHAR * szPkTableName, 2427 SQLSMALLINT cbPkTableName, 2428 SQLCHAR * szFkCatalogName, 2429 SQLSMALLINT cbFkCatalogName, 2430 SQLCHAR * szFkSchemaName, 2431 SQLSMALLINT cbFkSchemaName, 2432 SQLCHAR * szFkTableName, 2433 SQLSMALLINT cbFkTableName); 2434 2435SQLRETURN SQL_API SQLMoreResults ( 2436 SQLHSTMT hstmt); 2437 2438SQLRETURN SQL_API SQLNativeSql ( 2439 SQLHDBC hdbc, 2440 SQLCHAR * szSqlStrIn, 2441 SQLINTEGER cbSqlStrIn, 2442 SQLCHAR * szSqlStr, 2443 SQLINTEGER cbSqlStrMax, 2444 SQLINTEGER * pcbSqlStr); 2445 2446SQLRETURN SQL_API SQLNumParams ( 2447 SQLHSTMT hstmt, 2448 SQLSMALLINT * pcpar); 2449 2450SQLRETURN SQL_API SQLParamOptions ( 2451 SQLHSTMT hstmt, 2452 SQLULEN crow, 2453 SQLULEN * pirow); 2454 2455SQLRETURN SQL_API SQLPrimaryKeys ( 2456 SQLHSTMT hstmt, 2457 SQLCHAR * szCatalogName, 2458 SQLSMALLINT cbCatalogName, 2459 SQLCHAR * szSchemaName, 2460 SQLSMALLINT cbSchemaName, 2461 SQLCHAR * szTableName, 2462 SQLSMALLINT cbTableName); 2463 2464SQLRETURN SQL_API SQLProcedureColumns ( 2465 SQLHSTMT hstmt, 2466 SQLCHAR * szCatalogName, 2467 SQLSMALLINT cbCatalogName, 2468 SQLCHAR * szSchemaName, 2469 SQLSMALLINT cbSchemaName, 2470 SQLCHAR * szProcName, 2471 SQLSMALLINT cbProcName, 2472 SQLCHAR * szColumnName, 2473 SQLSMALLINT cbColumnName); 2474 2475SQLRETURN SQL_API SQLProcedures ( 2476 SQLHSTMT hstmt, 2477 SQLCHAR * szCatalogName, 2478 SQLSMALLINT cbCatalogName, 2479 SQLCHAR * szSchemaName, 2480 SQLSMALLINT cbSchemaName, 2481 SQLCHAR * szProcName, 2482 SQLSMALLINT cbProcName); 2483 2484SQLRETURN SQL_API SQLSetPos ( 2485 SQLHSTMT hstmt, 2486 SQLSETPOSIROW irow, 2487 SQLUSMALLINT fOption, 2488 SQLUSMALLINT fLock); 2489 2490SQLRETURN SQL_API SQLTablePrivileges ( 2491 SQLHSTMT hstmt, 2492 SQLCHAR * szCatalogName, 2493 SQLSMALLINT cbCatalogName, 2494 SQLCHAR * szSchemaName, 2495 SQLSMALLINT cbSchemaName, 2496 SQLCHAR * szTableName, 2497 SQLSMALLINT cbTableName); 2498 2499SQLRETURN SQL_API SQLDrivers ( 2500 SQLHENV henv, 2501 SQLUSMALLINT fDirection, 2502 SQLCHAR * szDriverDesc, 2503 SQLSMALLINT cbDriverDescMax, 2504 SQLSMALLINT * pcbDriverDesc, 2505 SQLCHAR * szDriverAttributes, 2506 SQLSMALLINT cbDrvrAttrMax, 2507 SQLSMALLINT * pcbDrvrAttr); 2508 2509SQLRETURN SQL_API SQLBindParameter ( 2510 SQLHSTMT hstmt, 2511 SQLUSMALLINT ipar, 2512 SQLSMALLINT fParamType, 2513 SQLSMALLINT fCType, 2514 SQLSMALLINT fSqlType, 2515 SQLULEN cbColDef, 2516 SQLSMALLINT ibScale, 2517 SQLPOINTER rgbValue, 2518 SQLLEN cbValueMax, 2519 SQLLEN * pcbValue); 2520 |
|
2107/* | 2521/* |
2108 * connection pooling retry times | 2522 * Depreciated - use SQLSetStmtOptions |
2109 */ | 2523 */ |
2524SQLRETURN SQL_API SQLSetScrollOptions ( /* Use SQLSetStmtOptions */ 2525 SQLHSTMT hstmt, 2526 SQLUSMALLINT fConcurrency, 2527 SQLLEN crowKeyset, 2528 SQLUSMALLINT crowRowset); |
|
2110 | 2529 |
2111BOOL ODBCSetTryWaitValue ( DWORD dwValue ); 2112#ifdef __cplusplus 2113DWORD ODBCGetTryWaitValue ( ); 2114#else 2115DWORD ODBCGetTryWaitValue ( VOID ); 2116#endif | |
2117 | 2530 |
2118#ifndef __SQLUCODE_H 2119#include "odbc/sqlucode.h" | 2531/* 2532 * SQLAllocHandleStd - make SQLAllocHandle compatible with X/Open standard 2533 * 2534 * NOTE: An application should not call SQLAllocHandleStd directly 2535 */ 2536#ifdef ODBC_STD 2537#define SQLAllocHandle SQLAllocHandleStd 2538#define SQLAllocEnv(phenv) \ 2539 SQLAllocHandleStd(SQL_HANDLE_ENV, SQL_NULL_HANDLE, phenv) 2540 2541#if (ODBCVER >= 0x0300) 2542SQLRETURN SQL_API SQLAllocHandleStd ( 2543 SQLSMALLINT fHandleType, 2544 SQLHANDLE hInput, 2545 SQLHANDLE * phOutput); |
2120#endif 2121 | 2546#endif 2547 |
2548 2549/* Internal type subcodes */ 2550#define SQL_YEAR SQL_CODE_YEAR 2551#define SQL_MONTH SQL_CODE_MONTH 2552#define SQL_DAY SQL_CODE_DAY 2553#define SQL_HOUR SQL_CODE_HOUR 2554#define SQL_MINUTE SQL_CODE_MINUTE 2555#define SQL_SECOND SQL_CODE_SECOND 2556#define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MONTH 2557#define SQL_DAY_TO_HOUR SQL_CODE_DAY_TO_HOUR 2558#define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINUTE 2559#define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECOND 2560#define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MINUTE 2561#define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SECOND 2562#define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND 2563#endif /* ODBC_STD */ 2564 2565 2566#ifdef __cplusplus 2567} |
|
2122#endif | 2568#endif |
2569 2570#include <odbc/sqlucode.h> 2571 2572#endif /* _SQLEXT_H */ |
|