1 /* 2 * sqlext.h 3 * 4 * $Id: sqlext.h,v 1.10 2006/01/20 15:58:34 source Exp $ 5 * 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 */ 77 78 #ifndef _SQLEXT_H 79 #define _SQLEXT_H 80 81 #ifndef _SQL_H 82 #include <odbc/sql.h> 83 #endif 84 85 #ifdef __cplusplus 86 extern "C" { 87 #endif 88 89 90 /* 91 * Useful Constants 92 */ 93 #define SQL_SPEC_MAJOR 3 94 #define SQL_SPEC_MINOR 52 95 #define SQL_SPEC_STRING "03.52" 96 97 #define SQL_SQLSTATE_SIZE 5 98 #define SQL_MAX_DSN_LENGTH 32 99 #define SQL_MAX_OPTION_STRING_LENGTH 256 100 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 */ 113 #if (ODBCVER < 0x0300) 114 #define SQL_NO_DATA_FOUND 100 115 #else 116 #define SQL_NO_DATA_FOUND SQL_NO_DATA 117 #endif /* ODBCVER < 0x0300 */ 118 119 120 /* 121 * Special length values for attributes 122 */ 123 #if (ODBCVER >= 0x0300) 124 #define SQL_IS_POINTER (-4) 125 #define SQL_IS_UINTEGER (-5) 126 #define SQL_IS_INTEGER (-6) 127 #define SQL_IS_USMALLINT (-7) 128 #define SQL_IS_SMALLINT (-8) 129 #endif /* ODBCVER >= 0x0300 */ 130 131 132 /* 133 * SQL extended datatypes 134 */ 135 #define SQL_DATE 9 136 #if (ODBCVER >= 0x0300) 137 #define SQL_INTERVAL 10 138 #endif /* ODBCVER >= 0x0300 */ 139 #define SQL_TIME 10 140 #define SQL_TIMESTAMP 11 141 #define SQL_LONGVARCHAR (-1) 142 #define SQL_BINARY (-2) 143 #define SQL_VARBINARY (-3) 144 #define SQL_LONGVARBINARY (-4) 145 #define SQL_BIGINT (-5) 146 #define SQL_TINYINT (-6) 147 #define SQL_BIT (-7) 148 #if (ODBCVER >= 0x0350) 149 #define SQL_GUID (-11) 150 #endif /* ODBCVER >= 0x0350 */ 151 152 153 /* 154 * SQL Interval datatypes 155 */ 156 #if (ODBCVER >= 0x0300) 157 #define SQL_CODE_YEAR 1 158 #define SQL_CODE_MONTH 2 159 #define SQL_CODE_DAY 3 160 #define SQL_CODE_HOUR 4 161 #define SQL_CODE_MINUTE 5 162 #define SQL_CODE_SECOND 6 163 #define SQL_CODE_YEAR_TO_MONTH 7 164 #define SQL_CODE_DAY_TO_HOUR 8 165 #define SQL_CODE_DAY_TO_MINUTE 9 166 #define SQL_CODE_DAY_TO_SECOND 10 167 #define SQL_CODE_HOUR_TO_MINUTE 11 168 #define SQL_CODE_HOUR_TO_SECOND 12 169 #define SQL_CODE_MINUTE_TO_SECOND 13 170 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 */ 199 200 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 */ 216 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 236 #if (ODBCVER >= 0x0300) 237 #define SQL_C_NUMERIC SQL_NUMERIC 238 #endif /* ODBCVER >= 0x0300 */ 239 #define SQL_C_DEFAULT 99 240 241 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) 254 255 #if defined(_WIN64) 256 #define SQL_C_BOOKMARK SQL_C_UBIGINT 257 #else 258 #define SQL_C_BOOKMARK SQL_C_ULONG 259 #endif 260 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 289 #if (ODBCVER < 0x0300) 290 #define SQL_TYPE_MIN SQL_BIT 291 #define SQL_TYPE_MAX SQL_VARCHAR 292 #endif /* ODBCVER < 0x0300 */ 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 343 #if (ODBCVER < 0x0300) 344 #define SQL_COLUMN_DRIVER_START 1000 345 #endif /* ODBCVER < 0x0300 */ 346 347 #define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT 348 349 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 356 357 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 366 367 368 /* 369 * SQLDataSources - additional fetch directions 370 */ 371 #if (ODBCVER >= 0x0300) 372 #define SQL_FETCH_FIRST_USER 31 373 #define SQL_FETCH_FIRST_SYSTEM 32 374 #endif /* ODBCVER >= 0x0300 */ 375 376 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 384 385 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 401 402 403 /* 404 * SQLGetConnectAttr - ODBC 3.0 attributes 405 */ 406 #if (ODBCVER >= 0x0300) 407 #define SQL_ATTR_ACCESS_MODE SQL_ACCESS_MODE 408 #define SQL_ATTR_AUTOCOMMIT SQL_AUTOCOMMIT 409 #define SQL_ATTR_CONNECTION_TIMEOUT 113 410 #define SQL_ATTR_CURRENT_CATALOG SQL_CURRENT_QUALIFIER 411 #define SQL_ATTR_DISCONNECT_BEHAVIOR 114 412 #define SQL_ATTR_ENLIST_IN_DTC 1207 413 #define SQL_ATTR_ENLIST_IN_XA 1208 414 #define SQL_ATTR_LOGIN_TIMEOUT SQL_LOGIN_TIMEOUT 415 #define SQL_ATTR_ODBC_CURSORS SQL_ODBC_CURSORS 416 #define SQL_ATTR_PACKET_SIZE SQL_PACKET_SIZE 417 #define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE 418 #define SQL_ATTR_TRACE SQL_OPT_TRACE 419 #define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE 420 #define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL 421 #define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION 422 #define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION 423 #endif /* ODBCVER >= 0x0300 */ 424 425 #define SQL_ATTR_CONNECTION_DEAD 1209 /* GetConnectAttr only */ 426 427 428 /* 429 * These options have no meaning for a 3.0 driver 430 */ 431 #if (ODBCVER < 0x0300) 432 #define SQL_CONN_OPT_MIN SQL_ACCESS_MODE 433 #define SQL_CONN_OPT_MAX SQL_PACKET_SIZE 434 #define SQL_CONNECT_OPT_DRVR_START 1000 435 #endif /* ODBCVER < 0x0300 */ 436 437 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 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 452 453 454 /* 455 * SQLGetConnectAttr - SQL_LOGIN_TIMEOUT 456 */ 457 #define SQL_LOGIN_TIMEOUT_DEFAULT 15UL 458 459 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 467 468 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 482 483 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 491 492 493 /* 494 * SQLGetConnectAttr - SQL_ATTR_CONNECTION_DEAD 495 */ 496 #define SQL_CD_TRUE 1L /* closed/dead */ 497 #define SQL_CD_FALSE 0L /* open/available */ 498 499 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 */ 508 509 510 /* 511 * SQLGetConnectAttr - SQL_ATTR_ENLIST_IN_DTC 512 */ 513 #if (ODBCVER >= 0x0300) 514 #define SQL_DTC_DONE 0L 515 #endif /* ODBCVER >= 0x0300 */ 516 517 518 /* 519 * SQLGetConnectAttr - Unicode drivers 520 */ 521 #if (ODBCVER >= 0x0351) 522 #define SQL_ATTR_ANSI_APP 115 523 #endif 524 525 526 /* 527 * SQLGetData 528 */ 529 #define SQL_NO_TOTAL (-4) 530 531 532 /* 533 * SQLGetDescField - extended descriptor field 534 */ 535 #if (ODBCVER >= 0x0300) 536 #define SQL_DESC_ARRAY_SIZE 20 537 #define SQL_DESC_ARRAY_STATUS_PTR 21 538 #define SQL_DESC_AUTO_UNIQUE_VALUE SQL_COLUMN_AUTO_INCREMENT 539 #define SQL_DESC_BASE_COLUMN_NAME 22 540 #define SQL_DESC_BASE_TABLE_NAME 23 541 #define SQL_DESC_BIND_OFFSET_PTR 24 542 #define SQL_DESC_BIND_TYPE 25 543 #define SQL_DESC_CASE_SENSITIVE SQL_COLUMN_CASE_SENSITIVE 544 #define SQL_DESC_CATALOG_NAME SQL_COLUMN_QUALIFIER_NAME 545 #define SQL_DESC_CONCISE_TYPE SQL_COLUMN_TYPE 546 #define SQL_DESC_DATETIME_INTERVAL_PRECISION 26 547 #define SQL_DESC_DISPLAY_SIZE SQL_COLUMN_DISPLAY_SIZE 548 #define SQL_DESC_FIXED_PREC_SCALE SQL_COLUMN_MONEY 549 #define SQL_DESC_LABEL SQL_COLUMN_LABEL 550 #define SQL_DESC_LITERAL_PREFIX 27 551 #define SQL_DESC_LITERAL_SUFFIX 28 552 #define SQL_DESC_LOCAL_TYPE_NAME 29 553 #define SQL_DESC_MAXIMUM_SCALE 30 554 #define SQL_DESC_MINIMUM_SCALE 31 555 #define SQL_DESC_NUM_PREC_RADIX 32 556 #define SQL_DESC_PARAMETER_TYPE 33 557 #define SQL_DESC_ROWS_PROCESSED_PTR 34 558 #if (ODBCVER >= 0x0350) 559 #define SQL_DESC_ROWVER 35 560 #endif /* ODBCVER >= 0x0350 */ 561 #define SQL_DESC_SCHEMA_NAME SQL_COLUMN_OWNER_NAME 562 #define SQL_DESC_SEARCHABLE SQL_COLUMN_SEARCHABLE 563 #define SQL_DESC_TYPE_NAME SQL_COLUMN_TYPE_NAME 564 #define SQL_DESC_TABLE_NAME SQL_COLUMN_TABLE_NAME 565 #define SQL_DESC_UNSIGNED SQL_COLUMN_UNSIGNED 566 #define SQL_DESC_UPDATABLE SQL_COLUMN_UPDATABLE 567 #endif /* ODBCVER >= 0x0300 */ 568 569 570 /* 571 * SQLGetDiagField - defines for diagnostics fields 572 */ 573 #if (ODBCVER >= 0x0300) 574 #define SQL_DIAG_CURSOR_ROW_COUNT (-1249) 575 #define SQL_DIAG_ROW_NUMBER (-1248) 576 #define SQL_DIAG_COLUMN_NUMBER (-1247) 577 #endif /* ODBCVER >= 0x0300 */ 578 579 580 /* 581 * SQLGetDiagField - SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER 582 */ 583 #if (ODBCVER >= 0x0300) 584 #define SQL_NO_ROW_NUMBER (-1) 585 #define SQL_NO_COLUMN_NUMBER (-1) 586 #define SQL_ROW_NUMBER_UNKNOWN (-2) 587 #define SQL_COLUMN_NUMBER_UNKNOWN (-2) 588 #endif 589 590 591 #if (ODBCVER >= 0x0300) 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 598 599 600 /* 601 * SQLGetEnvAttr - SQL_ATTR_ODBC_VERSION 602 */ 603 #define SQL_OV_ODBC2 2UL 604 #define SQL_OV_ODBC3 3UL 605 606 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 614 615 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 */ 623 624 625 /* 626 * SQLGetFunctions - extensions to the X/Open specification 627 */ 628 #if (ODBCVER >= 0x0300) 629 #define SQL_API_SQLALLOCHANDLESTD 73 630 #define SQL_API_SQLBULKOPERATIONS 24 631 #endif /* ODBCVER >= 0x0300 */ 632 #define SQL_API_SQLBINDPARAMETER 72 633 #define SQL_API_SQLBROWSECONNECT 55 634 #define SQL_API_SQLCOLATTRIBUTES 6 635 #define SQL_API_SQLCOLUMNPRIVILEGES 56 636 #define SQL_API_SQLDESCRIBEPARAM 58 637 #define SQL_API_SQLDRIVERCONNECT 41 638 #define SQL_API_SQLDRIVERS 71 639 #define SQL_API_SQLEXTENDEDFETCH 59 640 #define SQL_API_SQLFOREIGNKEYS 60 641 #define SQL_API_SQLMORERESULTS 61 642 #define SQL_API_SQLNATIVESQL 62 643 #define SQL_API_SQLNUMPARAMS 63 644 #define SQL_API_SQLPARAMOPTIONS 64 645 #define SQL_API_SQLPRIMARYKEYS 65 646 #define SQL_API_SQLPROCEDURECOLUMNS 66 647 #define SQL_API_SQLPROCEDURES 67 648 #define SQL_API_SQLSETPOS 68 649 #define SQL_API_SQLSETSCROLLOPTIONS 69 650 #define SQL_API_SQLTABLEPRIVILEGES 70 651 652 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 */ 680 #if (ODBCVER >= 0x0300) 681 #define SQL_API_ODBC3_ALL_FUNCTIONS 999 682 #define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250 683 684 #define SQL_FUNC_EXISTS(pfExists, uwAPI) \ 685 ((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) & (1 << ((uwAPI) & 0x000F))) \ 686 ? SQL_TRUE : SQL_FALSE) 687 #endif /* ODBCVER >= 0x0300 */ 688 689 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 */ 783 #if (ODBCVER < 0x0300) 784 #define SQL_INFO_LAST SQL_QUALIFIER_LOCATION 785 #define SQL_INFO_DRIVER_START 1000 786 #endif /* ODBCVER < 0x0300 */ 787 788 789 /* 790 * SQLGetInfo - ODBC 3.x extensions to the X/Open standard 791 */ 792 #if (ODBCVER >= 0x0300) 793 #define SQL_ACTIVE_ENVIRONMENTS 116 794 #define SQL_ALTER_DOMAIN 117 795 796 #define SQL_SQL_CONFORMANCE 118 797 #define SQL_DATETIME_LITERALS 119 798 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 856 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 862 863 #endif /* ODBCVER >= 0x0300 */ 864 865 #define SQL_DTC_TRANSITION_COST 1750 866 867 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 */ 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 */ 895 896 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 */ 924 925 926 /* 927 * SQLGetInfo - SQL_ASYNC_MODE 928 */ 929 #if (ODBCVER >= 0x0300) 930 #define SQL_AM_NONE 0 931 #define SQL_AM_CONNECTION 1 932 #define SQL_AM_STATEMENT 2 933 #endif /* ODBCVER >= 0x0300 */ 934 935 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 */ 944 945 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 */ 955 956 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 967 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 */ 976 977 978 /* 979 * SQLGetInfo - SQL_CATALOG_USAGE 980 */ 981 #if (ODBCVER >= 0x0300) 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 */ 988 989 990 /* 991 * SQLGetInfo - SQL_CONCAT_NULL_BEHAVIOR 992 */ 993 #define SQL_CB_NULL 0x0000 994 #define SQL_CB_NON_NULL 0x0001 995 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 */ 1026 1027 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 */ 1035 1036 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 1043 1044 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 */ 1055 1056 1057 /* 1058 * SQLGetInfo - SQL_CREATE_CHARACTER_SET 1059 */ 1060 #if (ODBCVER >= 0x0300) 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 */ 1065 1066 1067 /* 1068 * SQLGetInfo - SQL_CREATE_COLLATION 1069 */ 1070 #if (ODBCVER >= 0x0300) 1071 #define SQL_CCOL_CREATE_COLLATION 0x00000001L 1072 #endif /* ODBCVER >= 0x0300 */ 1073 1074 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 */ 1089 1090 1091 /* 1092 * SQLGetInfo - SQL_CREATE_SCHEMA 1093 */ 1094 #if (ODBCVER >= 0x0300) 1095 #define SQL_CS_CREATE_SCHEMA 0x00000001L 1096 #define SQL_CS_AUTHORIZATION 0x00000002L 1097 #define SQL_CS_DEFAULT_CHARACTER_SET 0x00000004L 1098 #endif /* ODBCVER >= 0x0300 */ 1099 1100 1101 /* 1102 * SQLGetInfo - SQL_CREATE_TABLE 1103 */ 1104 #if (ODBCVER >= 0x0300) 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 */ 1120 1121 1122 /* 1123 * SQLGetInfo - SQL_CREATE_TRANSLATION 1124 */ 1125 #if (ODBCVER >= 0x0300) 1126 #define SQL_CTR_CREATE_TRANSLATION 0x00000001L 1127 #endif /* ODBCVER >= 0x0300 */ 1128 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 */ 1142 #if (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 */ 1160 1161 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 */ 1169 1170 1171 /* 1172 * SQLGetInfo - SQL_DROP_ASSERTION 1173 */ 1174 #if (ODBCVER >= 0x0300) 1175 #define SQL_DA_DROP_ASSERTION 0x00000001L 1176 #endif /* ODBCVER >= 0x0300 */ 1177 1178 1179 /* 1180 * SQLGetInfo - SQL_DROP_CHARACTER_SET 1181 */ 1182 #if (ODBCVER >= 0x0300) 1183 #define SQL_DCS_DROP_CHARACTER_SET 0x00000001L 1184 #endif /* ODBCVER >= 0x0300 */ 1185 1186 1187 /* 1188 * SQLGetInfo - SQL_DROP_COLLATION 1189 */ 1190 #if (ODBCVER >= 0x0300) 1191 #define SQL_DC_DROP_COLLATION 0x00000001L 1192 #endif /* ODBCVER >= 0x0300 */ 1193 1194 1195 /* 1196 * SQLGetInfo - SQL_DROP_DOMAIN 1197 */ 1198 #if (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 */ 1203 1204 1205 /* 1206 * SQLGetInfo - SQL_DROP_SCHEMA 1207 */ 1208 #if (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 */ 1213 1214 1215 /* 1216 * SQLGetInfo - SQL_DROP_TABLE 1217 */ 1218 #if (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 */ 1223 1224 1225 /* 1226 * SQLGetInfo - SQL_DROP_TRANSLATION 1227 */ 1228 #if (ODBCVER >= 0x0300) 1229 #define SQL_DTR_DROP_TRANSLATION 0x00000001L 1230 #endif /* ODBCVER >= 0x0300 */ 1231 1232 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 */ 1241 1242 1243 /* 1244 * SQLGetInfo - SQL_DTC_TRANSITION_COST 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 */ 1259 #if (ODBCVER >= 0x0300) 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 */ 1265 1266 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 */ 1275 1276 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 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 1306 #endif /* ODBCVER >= 0x0300 */ 1307 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 1314 */ 1315 /* 1316 * SQL_ATTR_SCROLL_CONCURRENCY 1317 */ 1318 #if (ODBCVER >= 0x0300) 1319 #define SQL_CA2_READ_ONLY_CONCURRENCY 0x00000001L 1320 #define SQL_CA2_LOCK_CONCURRENCY 0x00000002L 1321 #define SQL_CA2_OPT_ROWVER_CONCURRENCY 0x00000004L 1322 #define SQL_CA2_OPT_VALUES_CONCURRENCY 0x00000008L 1323 #endif /* ODBCVER >= 0x0300 */ 1324 1325 1326 /* 1327 * sensitivity of the cursor to its own inserts, deletes, and updates 1328 */ 1329 #if (ODBCVER >= 0x0300) 1330 #define SQL_CA2_SENSITIVITY_ADDITIONS 0x00000010L 1331 #define SQL_CA2_SENSITIVITY_DELETIONS 0x00000020L 1332 #define SQL_CA2_SENSITIVITY_UPDATES 0x00000040L 1333 #endif /* ODBCVER >= 0x0300 */ 1334 1335 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 */ 1351 1352 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 */ 1360 1361 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 */ 1370 1371 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 1379 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 1388 1389 1390 /* 1391 * SQLGetInfo - SQL_GETDATA_EXTENSIONS 1392 */ 1393 #define SQL_GD_BLOCK 0x00000004L 1394 #define SQL_GD_BOUND 0x00000008L 1395 1396 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 */ 1407 1408 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 */ 1418 1419 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 */ 1448 1449 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 */ 1458 1459 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 1466 1467 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 1476 1477 1478 /* 1479 * SQLGetInfo - SQL_NON_NULLABLE_COLUMNS 1480 */ 1481 #define SQL_NNC_NULL 0x0000 1482 #define SQL_NNC_NON_NULL 0x0001 1483 1484 1485 /* 1486 * SQLGetInfo - SQL_NULL_COLLATION 1487 */ 1488 #define SQL_NC_START 0x0002 1489 #define SQL_NC_END 0x0004 1490 1491 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 1519 1520 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 */ 1532 #if (ODBCVER >= 0x0300) 1533 #define SQL_OIC_CORE 1UL 1534 #define SQL_OIC_LEVEL1 2UL 1535 #define SQL_OIC_LEVEL2 3UL 1536 #endif /* ODBCVER >= 0x0300 */ 1537 1538 1539 /* 1540 * SQLGetInfo - SQL_ODBC_SAG_CLI_CONFORMANCE 1541 */ 1542 #define SQL_OSCC_NOT_COMPLIANT 0x0000 1543 #define SQL_OSCC_COMPLIANT 0x0001 1544 1545 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 */ 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) 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 1617 #endif /* ODBCVER >= 0x0300 */ 1618 1619 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 1628 1629 1630 /* 1631 * SQLGetInfo - SQL_SQL_CONFORMANCE 1632 */ 1633 #if (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 */ 1639 1640 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 */ 1649 1650 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 */ 1660 1661 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 */ 1671 1672 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 */ 1691 1692 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 */ 1704 1705 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 */ 1725 1726 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 */ 1742 1743 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 */ 1764 1765 1766 /* 1767 * SQLGetInfo - SQL_SQL92_ROW_VALUE_CONSTRUCTOR 1768 */ 1769 #if (ODBCVER >= 0x0300) 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 */ 1775 1776 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 */ 1790 1791 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 */ 1801 1802 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 */ 1810 1811 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 1818 1819 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 1828 1829 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 1836 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 */ 1867 1868 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 1882 1883 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 */ 1910 1911 1912 /* 1913 * SQLGetInfo - SQL_TXN_ISOLATION_OPTION 1914 */ 1915 #if (ODBCVER < 0x0300) 1916 #define SQL_TXN_VERSIONING 0x00000010L 1917 #endif /* ODBCVER < 0x0300 */ 1918 1919 1920 /* 1921 * SQLGetInfo - SQL_UNION 1922 */ 1923 #define SQL_U_UNION 0x00000001L 1924 #define SQL_U_UNION_ALL 0x00000002L 1925 1926 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 */ 1934 1935 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 1954 1955 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 */ 1987 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 */ 1992 1993 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 2000 2001 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 */ 2009 2010 2011 /* 2012 * SQLGetStmtAttr - SQL_BIND_TYPE 2013 */ 2014 #define SQL_BIND_BY_COLUMN 0UL 2015 #define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN 2016 2017 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 2026 2027 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 2036 2037 2038 /* 2039 * SQLGetStmtAttr - SQL_KEYSET_SIZE 2040 */ 2041 #define SQL_KEYSET_SIZE_DEFAULT 0UL 2042 2043 2044 /* 2045 * SQLGetStmtAttr - SQL_MAX_LENGTH 2046 */ 2047 #define SQL_MAX_LENGTH_DEFAULT 0UL 2048 2049 2050 /* 2051 * SQLGetStmtAttr - SQL_MAX_ROWS 2052 */ 2053 #define SQL_MAX_ROWS_DEFAULT 0UL 2054 2055 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 2062 2063 2064 /* 2065 * SQLGetStmtAttr - SQL_QUERY_TIMEOUT 2066 */ 2067 #define SQL_QUERY_TIMEOUT_DEFAULT 0UL 2068 2069 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 2076 2077 2078 /* 2079 * SQLGetStmtAttr - SQL_ROWSET_SIZE 2080 */ 2081 #define SQL_ROWSET_SIZE_DEFAULT 1UL 2082 2083 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 2090 2091 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 */ 2102 2103 2104 /* 2105 * SQLGetTypeInfo - SEARCHABLE 2106 */ 2107 #if (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 */ 2111 2112 2113 /* 2114 * SQLSetPos 2115 */ 2116 #define SQL_ENTIRE_ROWSET 0 2117 2118 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 2126 2127 2128 /* 2129 * SQLBulkOperations - Operation 2130 */ 2131 #define SQL_ADD 4 2132 #define SQL_SETPOS_MAX_OPTION_VALUE SQL_ADD 2133 #if (ODBCVER >= 0x0300) 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 */ 2138 2139 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 2147 2148 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) 2164 2165 2166 /* 2167 * SQLSpecialColumns - Column types and scopes 2168 */ 2169 #define SQL_BEST_ROWID 1 2170 #define SQL_ROWVER 2 2171 2172 2173 /* 2174 * All the ODBC keywords 2175 */ 2176 #define SQL_ODBC_KEYWORDS \ 2177 "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,"\ 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,"\ 2186 "DISTINCT,DOMAIN,DOUBLE,DROP,"\ 2187 "ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,"\ 2188 "EXISTS,EXTERNAL,EXTRACT,"\ 2189 "FALSE,FETCH,FIRST,FLOAT,FOR,FOREIGN,FORTRAN,FOUND,FROM,FULL,"\ 2190 "GET,GLOBAL,GO,GOTO,GRANT,GROUP,HAVING,HOUR,"\ 2191 "IDENTITY,IMMEDIATE,IN,INCLUDE,INDEX,INDICATOR,INITIALLY,INNER,"\ 2192 "INPUT,INSENSITIVE,INSERT,INT,INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,"\ 2193 "JOIN,KEY,LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,"\ 2194 "MATCH,MAX,MIN,MINUTE,MODULE,MONTH,"\ 2195 "NAMES,NATIONAL,NATURAL,NCHAR,NEXT,NO,NONE,NOT,NULL,NULLIF,NUMERIC,"\ 2196 "OCTET_LENGTH,OF,ON,ONLY,OPEN,OPTION,OR,ORDER,OUTER,OUTPUT,OVERLAPS,"\ 2197 "PAD,PARTIAL,PASCAL,PLI,POSITION,PRECISION,PREPARE,PRESERVE,"\ 2198 "PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,"\ 2199 "READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS"\ 2200 "SCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,SIZE,"\ 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 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 2231 #if (ODBCVER >= 0x0300) 2232 #define SQL_ROW_SUCCESS_WITH_INFO 6 2233 #define SQL_ROW_PROCEED 0 2234 #define SQL_ROW_IGNORE 1 2235 #endif 2236 2237 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 2247 2248 #define SQL_PARAM_PROCEED 0 2249 #define SQL_PARAM_IGNORE 1 2250 #endif /* ODBCVER >= 0x0300 */ 2251 2252 2253 /* 2254 * SQLForeignKeys - UPDATE_RULE/DELETE_RULE 2255 */ 2256 #define SQL_CASCADE 0 2257 #define SQL_RESTRICT 1 2258 #define SQL_SET_NULL 2 2259 2260 #if (ODBCVER >= 0x0250) 2261 #define SQL_NO_ACTION 3 2262 #define SQL_SET_DEFAULT 4 2263 #endif /* ODBCVER >= 0x0250 */ 2264 2265 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 */ 2274 2275 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 2286 2287 2288 /* 2289 * SQLProcedures - PROCEDURE_TYPE 2290 */ 2291 #define SQL_PT_UNKNOWN 0 2292 #define SQL_PT_PROCEDURE 1 2293 #define SQL_PT_FUNCTION 2 2294 2295 2296 /* 2297 * SQLSetParam to SQLBindParameter conversion 2298 */ 2299 #define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT 2300 #define SQL_SETPARAM_VALUE_MAX (-1L) 2301 2302 2303 /* 2304 * SQLStatistics - fAccuracy 2305 */ 2306 #define SQL_QUICK 0 2307 #define SQL_ENSURE 1 2308 2309 2310 /* 2311 * SQLStatistics - TYPE 2312 */ 2313 #define SQL_TABLE_STAT 0 2314 2315 2316 /* 2317 * SQLTables 2318 */ 2319 #if (ODBCVER >= 0x0300) 2320 #define SQL_ALL_CATALOGS "%" 2321 #define SQL_ALL_SCHEMAS "%" 2322 #define SQL_ALL_TABLE_TYPES "%" 2323 #endif /* ODBCVER >= 0x0300 */ 2324 2325 /* 2326 * SQLSpecialColumns - PSEUDO_COLUMN 2327 */ 2328 #define SQL_PC_NOT_PSEUDO 1 2329 2330 2331 /* 2332 * Deprecated defines from prior versions of ODBC 2333 */ 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 2347 #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) 2352 2353 2354 /* 2355 * Level 1 function prototypes 2356 */ 2357 SQLRETURN 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); 2366 2367 /* 2368 * Level 2 function prototypes 2369 */ 2370 2371 SQLRETURN SQL_API SQLBrowseConnect ( 2372 SQLHDBC hdbc, 2373 SQLCHAR * szConnStrIn, 2374 SQLSMALLINT cbConnStrIn, 2375 SQLCHAR * szConnStrOut, 2376 SQLSMALLINT cbConnStrOutMax, 2377 SQLSMALLINT * pcbConnStrOut); 2378 2379 #if (ODBCVER >= 0x0300) 2380 SQLRETURN SQL_API SQLBulkOperations ( 2381 SQLHSTMT StatementHandle, 2382 SQLSMALLINT Operation); 2383 #endif /* ODBCVER >= 0x0300 */ 2384 2385 SQLRETURN SQL_API SQLColAttributes ( 2386 SQLHSTMT hstmt, 2387 SQLUSMALLINT icol, 2388 SQLUSMALLINT fDescType, 2389 SQLPOINTER rgbDesc, 2390 SQLSMALLINT cbDescMax, 2391 SQLSMALLINT * pcbDesc, 2392 SQLLEN * pfDesc); 2393 2394 SQLRETURN 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 2405 SQLRETURN SQL_API SQLDescribeParam ( 2406 SQLHSTMT hstmt, 2407 SQLUSMALLINT ipar, 2408 SQLSMALLINT * pfSqlType, 2409 SQLULEN * pcbParamDef, 2410 SQLSMALLINT * pibScale, 2411 SQLSMALLINT * pfNullable); 2412 2413 SQLRETURN SQL_API SQLExtendedFetch ( 2414 SQLHSTMT hstmt, 2415 SQLUSMALLINT fFetchType, 2416 SQLLEN irow, 2417 SQLULEN * pcrow, 2418 SQLUSMALLINT * rgfRowStatus); 2419 2420 SQLRETURN 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 2435 SQLRETURN SQL_API SQLMoreResults ( 2436 SQLHSTMT hstmt); 2437 2438 SQLRETURN SQL_API SQLNativeSql ( 2439 SQLHDBC hdbc, 2440 SQLCHAR * szSqlStrIn, 2441 SQLINTEGER cbSqlStrIn, 2442 SQLCHAR * szSqlStr, 2443 SQLINTEGER cbSqlStrMax, 2444 SQLINTEGER * pcbSqlStr); 2445 2446 SQLRETURN SQL_API SQLNumParams ( 2447 SQLHSTMT hstmt, 2448 SQLSMALLINT * pcpar); 2449 2450 SQLRETURN SQL_API SQLParamOptions ( 2451 SQLHSTMT hstmt, 2452 SQLULEN crow, 2453 SQLULEN * pirow); 2454 2455 SQLRETURN 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 2464 SQLRETURN 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 2475 SQLRETURN 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 2484 SQLRETURN SQL_API SQLSetPos ( 2485 SQLHSTMT hstmt, 2486 SQLSETPOSIROW irow, 2487 SQLUSMALLINT fOption, 2488 SQLUSMALLINT fLock); 2489 2490 SQLRETURN 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 2499 SQLRETURN 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 2509 SQLRETURN 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 2521 /* 2522 * Depreciated - use SQLSetStmtOptions 2523 */ 2524 SQLRETURN SQL_API SQLSetScrollOptions ( /* Use SQLSetStmtOptions */ 2525 SQLHSTMT hstmt, 2526 SQLUSMALLINT fConcurrency, 2527 SQLLEN crowKeyset, 2528 SQLUSMALLINT crowRowset); 2529 2530 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) 2542 SQLRETURN SQL_API SQLAllocHandleStd ( 2543 SQLSMALLINT fHandleType, 2544 SQLHANDLE hInput, 2545 SQLHANDLE * phOutput); 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 } 2568 #endif 2569 2570 #include <odbc/sqlucode.h> 2571 2572 #endif /* _SQLEXT_H */ 2573