00001
00002
00003
00004
00005
00006
00007 #ifndef __SQL_H
00008 #define __SQL_H
00009
00010
00011
00012
00013
00014 #ifndef ODBCVER
00015 #define ODBCVER 0x0351
00016 #endif
00017
00018 #ifndef __SQLTYPES_H
00019 #include "sqltypes.h"
00020 #endif
00021
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025
00026
00027
00028
00029 #define SQL_NULL_DATA (-1)
00030 #define SQL_DATA_AT_EXEC (-2)
00031 #define SQL_SUCCESS 0
00032 #define SQL_SUCCESS_WITH_INFO 1
00033 #if (ODBCVER >= 0x0300)
00034 #define SQL_NO_DATA 100
00035 #endif
00036 #define SQL_ERROR (-1)
00037 #define SQL_INVALID_HANDLE (-2)
00038 #define SQL_STILL_EXECUTING 2
00039 #define SQL_NEED_DATA 99
00040 #define SQL_SUCCEEDED(rc) (((rc)&(~1))==0)
00041
00042
00043
00044
00045 #define SQL_NTS (-3)
00046 #define SQL_NTSL (-3L)
00047
00048
00049 #define SQL_MAX_MESSAGE_LENGTH 512
00050
00051
00052 #if (ODBCVER >= 0x0300)
00053 #define SQL_DATE_LEN 10
00054 #define SQL_TIME_LEN 8
00055 #define SQL_TIMESTAMP_LEN 19
00056 #endif
00057
00058
00059 #if (ODBCVER >= 0x0300)
00060 #define SQL_HANDLE_ENV 1
00061 #define SQL_HANDLE_DBC 2
00062 #define SQL_HANDLE_STMT 3
00063 #define SQL_HANDLE_DESC 4
00064 #endif
00065
00066
00067 #if (ODBCVER >= 0x0300)
00068 #define SQL_ATTR_OUTPUT_NTS 10001
00069 #endif
00070
00071
00072 #if (ODBCVER >= 0x0300)
00073 #define SQL_ATTR_AUTO_IPD 10001
00074 #define SQL_ATTR_METADATA_ID 10014
00075 #endif
00076
00077
00078 #if (ODBCVER >= 0x0300)
00079 #define SQL_ATTR_APP_ROW_DESC 10010
00080 #define SQL_ATTR_APP_PARAM_DESC 10011
00081 #define SQL_ATTR_IMP_ROW_DESC 10012
00082 #define SQL_ATTR_IMP_PARAM_DESC 10013
00083 #define SQL_ATTR_CURSOR_SCROLLABLE (-1)
00084 #define SQL_ATTR_CURSOR_SENSITIVITY (-2)
00085 #endif
00086
00087
00088 #if (ODBCVER >= 0x0300)
00089 #define SQL_NONSCROLLABLE 0
00090 #define SQL_SCROLLABLE 1
00091 #endif
00092
00093
00094 #if (ODBCVER >= 0x0300)
00095 #define SQL_DESC_COUNT 1001
00096 #define SQL_DESC_TYPE 1002
00097 #define SQL_DESC_LENGTH 1003
00098 #define SQL_DESC_OCTET_LENGTH_PTR 1004
00099 #define SQL_DESC_PRECISION 1005
00100 #define SQL_DESC_SCALE 1006
00101 #define SQL_DESC_DATETIME_INTERVAL_CODE 1007
00102 #define SQL_DESC_NULLABLE 1008
00103 #define SQL_DESC_INDICATOR_PTR 1009
00104 #define SQL_DESC_DATA_PTR 1010
00105 #define SQL_DESC_NAME 1011
00106 #define SQL_DESC_UNNAMED 1012
00107 #define SQL_DESC_OCTET_LENGTH 1013
00108 #define SQL_DESC_ALLOC_TYPE 1099
00109 #endif
00110
00111
00112 #if (ODBCVER >= 0x0300)
00113 #define SQL_DIAG_RETURNCODE 1
00114 #define SQL_DIAG_NUMBER 2
00115 #define SQL_DIAG_ROW_COUNT 3
00116 #define SQL_DIAG_SQLSTATE 4
00117 #define SQL_DIAG_NATIVE 5
00118 #define SQL_DIAG_MESSAGE_TEXT 6
00119 #define SQL_DIAG_DYNAMIC_FUNCTION 7
00120 #define SQL_DIAG_CLASS_ORIGIN 8
00121 #define SQL_DIAG_SUBCLASS_ORIGIN 9
00122 #define SQL_DIAG_CONNECTION_NAME 10
00123 #define SQL_DIAG_SERVER_NAME 11
00124 #define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12
00125 #endif
00126
00127
00128 #if (ODBCVER >= 0x0300)
00129 #define SQL_DIAG_ALTER_DOMAIN 3
00130 #define SQL_DIAG_ALTER_TABLE 4
00131 #define SQL_DIAG_CALL 7
00132 #define SQL_DIAG_CREATE_ASSERTION 6
00133 #define SQL_DIAG_CREATE_CHARACTER_SET 8
00134 #define SQL_DIAG_CREATE_COLLATION 10
00135 #define SQL_DIAG_CREATE_DOMAIN 23
00136 #define SQL_DIAG_CREATE_INDEX (-1)
00137 #define SQL_DIAG_CREATE_SCHEMA 64
00138 #define SQL_DIAG_CREATE_TABLE 77
00139 #define SQL_DIAG_CREATE_TRANSLATION 79
00140 #define SQL_DIAG_CREATE_VIEW 84
00141 #define SQL_DIAG_DELETE_WHERE 19
00142 #define SQL_DIAG_DROP_ASSERTION 24
00143 #define SQL_DIAG_DROP_CHARACTER_SET 25
00144 #define SQL_DIAG_DROP_COLLATION 26
00145 #define SQL_DIAG_DROP_DOMAIN 27
00146 #define SQL_DIAG_DROP_INDEX (-2)
00147 #define SQL_DIAG_DROP_SCHEMA 31
00148 #define SQL_DIAG_DROP_TABLE 32
00149 #define SQL_DIAG_DROP_TRANSLATION 33
00150 #define SQL_DIAG_DROP_VIEW 36
00151 #define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38
00152 #define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81
00153 #define SQL_DIAG_GRANT 48
00154 #define SQL_DIAG_INSERT 50
00155 #define SQL_DIAG_REVOKE 59
00156 #define SQL_DIAG_SELECT_CURSOR 85
00157 #define SQL_DIAG_UNKNOWN_STATEMENT 0
00158 #define SQL_DIAG_UPDATE_WHERE 82
00159 #endif
00160
00161
00162 #define SQL_UNKNOWN_TYPE 0
00163 #define SQL_CHAR 1
00164 #define SQL_NUMERIC 2
00165 #define SQL_DECIMAL 3
00166 #define SQL_INTEGER 4
00167 #define SQL_SMALLINT 5
00168 #define SQL_FLOAT 6
00169 #define SQL_REAL 7
00170 #define SQL_DOUBLE 8
00171 #if (ODBCVER >= 0x0300)
00172 #define SQL_DATETIME 9
00173 #endif
00174 #define SQL_VARCHAR 12
00175
00176
00177 #if (ODBCVER >= 0x0300)
00178 #define SQL_TYPE_DATE 91
00179 #define SQL_TYPE_TIME 92
00180 #define SQL_TYPE_TIMESTAMP 93
00181 #endif
00182
00183
00184 #if (ODBCVER >= 0x0300)
00185 #define SQL_UNSPECIFIED 0
00186 #define SQL_INSENSITIVE 1
00187 #define SQL_SENSITIVE 2
00188 #endif
00189
00190
00191 #define SQL_ALL_TYPES 0
00192
00193
00194 #if (ODBCVER >= 0x0300)
00195 #define SQL_DEFAULT 99
00196 #endif
00197
00198
00199
00200
00201 #if (ODBCVER >= 0x0300)
00202 #define SQL_ARD_TYPE (-99)
00203 #endif
00204
00205
00206 #if (ODBCVER >= 0x0300)
00207 #define SQL_CODE_DATE 1
00208 #define SQL_CODE_TIME 2
00209 #define SQL_CODE_TIMESTAMP 3
00210 #endif
00211
00212
00213 #if (ODBCVER >= 0x0300)
00214 #define SQL_FALSE 0
00215 #define SQL_TRUE 1
00216 #endif
00217
00218
00219 #define SQL_NO_NULLS 0
00220 #define SQL_NULLABLE 1
00221
00222
00223
00224
00225 #define SQL_NULLABLE_UNKNOWN 2
00226
00227
00228
00229
00230 #if (ODBCVER >= 0x0300)
00231 #define SQL_PRED_NONE 0
00232 #define SQL_PRED_CHAR 1
00233 #define SQL_PRED_BASIC 2
00234 #endif
00235
00236
00237 #if (ODBCVER >= 0x0300)
00238 #define SQL_NAMED 0
00239 #define SQL_UNNAMED 1
00240 #endif
00241
00242
00243 #if (ODBCVER >= 0x0300)
00244 #define SQL_DESC_ALLOC_AUTO 1
00245 #define SQL_DESC_ALLOC_USER 2
00246 #endif
00247
00248
00249 #define SQL_CLOSE 0
00250 #define SQL_DROP 1
00251 #define SQL_UNBIND 2
00252 #define SQL_RESET_PARAMS 3
00253
00254
00255
00256
00257 #define SQL_FETCH_NEXT 1
00258 #define SQL_FETCH_FIRST 2
00259
00260
00261 #define SQL_FETCH_LAST 3
00262 #define SQL_FETCH_PRIOR 4
00263 #define SQL_FETCH_ABSOLUTE 5
00264 #define SQL_FETCH_RELATIVE 6
00265
00266
00267 #define SQL_COMMIT 0
00268 #define SQL_ROLLBACK 1
00269
00270
00271 #define SQL_NULL_HENV 0
00272 #define SQL_NULL_HDBC 0
00273 #define SQL_NULL_HSTMT 0
00274 #if (ODBCVER >= 0x0300)
00275 #define SQL_NULL_HDESC 0
00276 #define SQL_NULL_DESC 0
00277 #endif
00278
00279
00280 #if (ODBCVER >= 0x0300)
00281 #define SQL_NULL_HANDLE 0L
00282 #endif
00283
00284
00285 #define SQL_SCOPE_CURROW 0
00286 #define SQL_SCOPE_TRANSACTION 1
00287 #define SQL_SCOPE_SESSION 2
00288
00289 #define SQL_PC_UNKNOWN 0
00290 #if (ODBCVER >= 0x0300)
00291 #define SQL_PC_NON_PSEUDO 1
00292 #endif
00293 #define SQL_PC_PSEUDO 2
00294
00295
00296 #if (ODBCVER >= 0x0300)
00297 #define SQL_ROW_IDENTIFIER 1
00298 #endif
00299
00300
00301 #define SQL_INDEX_UNIQUE 0
00302 #define SQL_INDEX_ALL 1
00303
00304
00305 #define SQL_INDEX_CLUSTERED 1
00306 #define SQL_INDEX_HASHED 2
00307 #define SQL_INDEX_OTHER 3
00308
00309
00310 #define SQL_API_SQLALLOCCONNECT 1
00311 #define SQL_API_SQLALLOCENV 2
00312 #if (ODBCVER >= 0x0300)
00313 #define SQL_API_SQLALLOCHANDLE 1001
00314 #endif
00315 #define SQL_API_SQLALLOCSTMT 3
00316 #define SQL_API_SQLBINDCOL 4
00317 #if (ODBCVER >= 0x0300)
00318 #define SQL_API_SQLBINDPARAM 1002
00319 #endif
00320 #define SQL_API_SQLCANCEL 5
00321 #if (ODBCVER >= 0x0300)
00322 #define SQL_API_SQLCLOSECURSOR 1003
00323 #define SQL_API_SQLCOLATTRIBUTE 6
00324 #endif
00325 #define SQL_API_SQLCOLUMNS 40
00326 #define SQL_API_SQLCONNECT 7
00327 #if (ODBCVER >= 0x0300)
00328 #define SQL_API_SQLCOPYDESC 1004
00329 #endif
00330 #define SQL_API_SQLDATASOURCES 57
00331 #define SQL_API_SQLDESCRIBECOL 8
00332 #define SQL_API_SQLDISCONNECT 9
00333 #if (ODBCVER >= 0x0300)
00334 #define SQL_API_SQLENDTRAN 1005
00335 #endif
00336 #define SQL_API_SQLERROR 10
00337 #define SQL_API_SQLEXECDIRECT 11
00338 #define SQL_API_SQLEXECUTE 12
00339 #define SQL_API_SQLFETCH 13
00340 #if (ODBCVER >= 0x0300)
00341 #define SQL_API_SQLFETCHSCROLL 1021
00342 #endif
00343 #define SQL_API_SQLFREECONNECT 14
00344 #define SQL_API_SQLFREEENV 15
00345 #if (ODBCVER >= 0x0300)
00346 #define SQL_API_SQLFREEHANDLE 1006
00347 #endif
00348 #define SQL_API_SQLFREESTMT 16
00349 #if (ODBCVER >= 0x0300)
00350 #define SQL_API_SQLGETCONNECTATTR 1007
00351 #endif
00352 #define SQL_API_SQLGETCONNECTOPTION 42
00353 #define SQL_API_SQLGETCURSORNAME 17
00354 #define SQL_API_SQLGETDATA 43
00355 #if (ODBCVER >= 0x0300)
00356 #define SQL_API_SQLGETDESCFIELD 1008
00357 #define SQL_API_SQLGETDESCREC 1009
00358 #define SQL_API_SQLGETDIAGFIELD 1010
00359 #define SQL_API_SQLGETDIAGREC 1011
00360 #define SQL_API_SQLGETENVATTR 1012
00361 #endif
00362 #define SQL_API_SQLGETFUNCTIONS 44
00363 #define SQL_API_SQLGETINFO 45
00364 #if (ODBCVER >= 0x0300)
00365 #define SQL_API_SQLGETSTMTATTR 1014
00366 #endif
00367 #define SQL_API_SQLGETSTMTOPTION 46
00368 #define SQL_API_SQLGETTYPEINFO 47
00369 #define SQL_API_SQLNUMRESULTCOLS 18
00370 #define SQL_API_SQLPARAMDATA 48
00371 #define SQL_API_SQLPREPARE 19
00372 #define SQL_API_SQLPUTDATA 49
00373 #define SQL_API_SQLROWCOUNT 20
00374 #if (ODBCVER >= 0x0300)
00375 #define SQL_API_SQLSETCONNECTATTR 1016
00376 #endif
00377 #define SQL_API_SQLSETCONNECTOPTION 50
00378 #define SQL_API_SQLSETCURSORNAME 21
00379 #if (ODBCVER >= 0x0300)
00380 #define SQL_API_SQLSETDESCFIELD 1017
00381 #define SQL_API_SQLSETDESCREC 1018
00382 #define SQL_API_SQLSETENVATTR 1019
00383 #endif
00384 #define SQL_API_SQLSETPARAM 22
00385 #if (ODBCVER >= 0x0300)
00386 #define SQL_API_SQLSETSTMTATTR 1020
00387 #endif
00388 #define SQL_API_SQLSETSTMTOPTION 51
00389 #define SQL_API_SQLSPECIALCOLUMNS 52
00390 #define SQL_API_SQLSTATISTICS 53
00391 #define SQL_API_SQLTABLES 54
00392 #define SQL_API_SQLTRANSACT 23
00393
00394
00395 #if (ODBCVER >= 0x0300)
00396 #define SQL_MAX_DRIVER_CONNECTIONS 0
00397 #define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS
00398 #define SQL_MAX_CONCURRENT_ACTIVITIES 1
00399 #define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIES
00400 #endif
00401 #define SQL_DATA_SOURCE_NAME 2
00402 #define SQL_FETCH_DIRECTION 8
00403 #define SQL_SERVER_NAME 13
00404 #define SQL_SEARCH_PATTERN_ESCAPE 14
00405 #define SQL_DBMS_NAME 17
00406 #define SQL_DBMS_VER 18
00407 #define SQL_ACCESSIBLE_TABLES 19
00408 #define SQL_ACCESSIBLE_PROCEDURES 20
00409 #define SQL_CURSOR_COMMIT_BEHAVIOR 23
00410 #define SQL_DATA_SOURCE_READ_ONLY 25
00411 #define SQL_DEFAULT_TXN_ISOLATION 26
00412 #define SQL_IDENTIFIER_CASE 28
00413 #define SQL_IDENTIFIER_QUOTE_CHAR 29
00414 #define SQL_MAX_COLUMN_NAME_LEN 30
00415 #define SQL_MAXIMUM_COLUMN_NAME_LENGTH SQL_MAX_COLUMN_NAME_LEN
00416 #define SQL_MAX_CURSOR_NAME_LEN 31
00417 #define SQL_MAXIMUM_CURSOR_NAME_LENGTH SQL_MAX_CURSOR_NAME_LEN
00418 #define SQL_MAX_SCHEMA_NAME_LEN 32
00419 #define SQL_MAXIMUM_SCHEMA_NAME_LENGTH SQL_MAX_SCHEMA_NAME_LEN
00420 #define SQL_MAX_CATALOG_NAME_LEN 34
00421 #define SQL_MAXIMUM_CATALOG_NAME_LENGTH SQL_MAX_CATALOG_NAME_LEN
00422 #define SQL_MAX_TABLE_NAME_LEN 35
00423 #define SQL_SCROLL_CONCURRENCY 43
00424 #define SQL_TXN_CAPABLE 46
00425 #define SQL_TRANSACTION_CAPABLE SQL_TXN_CAPABLE
00426 #define SQL_USER_NAME 47
00427 #define SQL_TXN_ISOLATION_OPTION 72
00428 #define SQL_TRANSACTION_ISOLATION_OPTION SQL_TXN_ISOLATION_OPTION
00429 #define SQL_INTEGRITY 73
00430 #define SQL_GETDATA_EXTENSIONS 81
00431 #define SQL_NULL_COLLATION 85
00432 #define SQL_ALTER_TABLE 86
00433 #define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
00434 #define SQL_SPECIAL_CHARACTERS 94
00435 #define SQL_MAX_COLUMNS_IN_GROUP_BY 97
00436 #define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY SQL_MAX_COLUMNS_IN_GROUP_BY
00437 #define SQL_MAX_COLUMNS_IN_INDEX 98
00438 #define SQL_MAXIMUM_COLUMNS_IN_INDEX SQL_MAX_COLUMNS_IN_INDEX
00439 #define SQL_MAX_COLUMNS_IN_ORDER_BY 99
00440 #define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY SQL_MAX_COLUMNS_IN_ORDER_BY
00441 #define SQL_MAX_COLUMNS_IN_SELECT 100
00442 #define SQL_MAXIMUM_COLUMNS_IN_SELECT SQL_MAX_COLUMNS_IN_SELECT
00443 #define SQL_MAX_COLUMNS_IN_TABLE 101
00444 #define SQL_MAX_INDEX_SIZE 102
00445 #define SQL_MAXIMUM_INDEX_SIZE SQL_MAX_INDEX_SIZE
00446 #define SQL_MAX_ROW_SIZE 104
00447 #define SQL_MAXIMUM_ROW_SIZE SQL_MAX_ROW_SIZE
00448 #define SQL_MAX_STATEMENT_LEN 105
00449 #define SQL_MAXIMUM_STATEMENT_LENGTH SQL_MAX_STATEMENT_LEN
00450 #define SQL_MAX_TABLES_IN_SELECT 106
00451 #define SQL_MAXIMUM_TABLES_IN_SELECT SQL_MAX_TABLES_IN_SELECT
00452 #define SQL_MAX_USER_NAME_LEN 107
00453 #define SQL_MAXIMUM_USER_NAME_LENGTH SQL_MAX_USER_NAME_LEN
00454 #if (ODBCVER >= 0x0300)
00455 #define SQL_OJ_CAPABILITIES 115
00456 #define SQL_OUTER_JOIN_CAPABILITIES SQL_OJ_CAPABILITIES
00457 #endif
00458
00459 #if (ODBCVER >= 0x0300)
00460 #define SQL_XOPEN_CLI_YEAR 10000
00461 #define SQL_CURSOR_SENSITIVITY 10001
00462 #define SQL_DESCRIBE_PARAMETER 10002
00463 #define SQL_CATALOG_NAME 10003
00464 #define SQL_COLLATION_SEQ 10004
00465 #define SQL_MAX_IDENTIFIER_LEN 10005
00466 #define SQL_MAXIMUM_IDENTIFIER_LENGTH SQL_MAX_IDENTIFIER_LEN
00467 #endif
00468
00469
00470 #if (ODBCVER >= 0x0200)
00471 #define SQL_AT_ADD_COLUMN 0x00000001L
00472 #define SQL_AT_DROP_COLUMN 0x00000002L
00473 #endif
00474
00475 #if (ODBCVER >= 0x0300)
00476 #define SQL_AT_ADD_CONSTRAINT 0x00000008L
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495 #endif
00496
00497
00498
00499 #if (ODBCVER >= 0x0300)
00500 #define SQL_AM_NONE 0
00501 #define SQL_AM_CONNECTION 1
00502 #define SQL_AM_STATEMENT 2
00503 #endif
00504
00505
00506 #define SQL_CB_DELETE 0
00507 #define SQL_CB_CLOSE 1
00508 #define SQL_CB_PRESERVE 2
00509
00510
00511 #define SQL_FD_FETCH_NEXT 0x00000001L
00512 #define SQL_FD_FETCH_FIRST 0x00000002L
00513 #define SQL_FD_FETCH_LAST 0x00000004L
00514 #define SQL_FD_FETCH_PRIOR 0x00000008L
00515 #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
00516 #define SQL_FD_FETCH_RELATIVE 0x00000020L
00517
00518
00519 #define SQL_GD_ANY_COLUMN 0x00000001L
00520 #define SQL_GD_ANY_ORDER 0x00000002L
00521
00522
00523 #define SQL_IC_UPPER 1
00524 #define SQL_IC_LOWER 2
00525 #define SQL_IC_SENSITIVE 3
00526 #define SQL_IC_MIXED 4
00527
00528
00529
00530
00531
00532 #if (ODBCVER >= 0x0201)
00533 #define SQL_OJ_LEFT 0x00000001L
00534 #define SQL_OJ_RIGHT 0x00000002L
00535 #define SQL_OJ_FULL 0x00000004L
00536 #define SQL_OJ_NESTED 0x00000008L
00537 #define SQL_OJ_NOT_ORDERED 0x00000010L
00538 #define SQL_OJ_INNER 0x00000020L
00539 #define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L
00540 #endif
00541
00542
00543 #define SQL_SCCO_READ_ONLY 0x00000001L
00544 #define SQL_SCCO_LOCK 0x00000002L
00545 #define SQL_SCCO_OPT_ROWVER 0x00000004L
00546 #define SQL_SCCO_OPT_VALUES 0x00000008L
00547
00548
00549 #define SQL_TC_NONE 0
00550 #define SQL_TC_DML 1
00551 #define SQL_TC_ALL 2
00552 #define SQL_TC_DDL_COMMIT 3
00553 #define SQL_TC_DDL_IGNORE 4
00554
00555
00556 #define SQL_TXN_READ_UNCOMMITTED 0x00000001L
00557 #define SQL_TRANSACTION_READ_UNCOMMITTED SQL_TXN_READ_UNCOMMITTED
00558 #define SQL_TXN_READ_COMMITTED 0x00000002L
00559 #define SQL_TRANSACTION_READ_COMMITTED SQL_TXN_READ_COMMITTED
00560 #define SQL_TXN_REPEATABLE_READ 0x00000004L
00561 #define SQL_TRANSACTION_REPEATABLE_READ SQL_TXN_REPEATABLE_READ
00562 #define SQL_TXN_SERIALIZABLE 0x00000008L
00563 #define SQL_TRANSACTION_SERIALIZABLE SQL_TXN_SERIALIZABLE
00564
00565
00566 #define SQL_NC_HIGH 0
00567 #define SQL_NC_LOW 1
00568
00569 SQLRETURN SQL_API SQLAllocConnect(SQLHENV EnvironmentHandle,
00570 SQLHDBC *ConnectionHandle);
00571
00572 SQLRETURN SQL_API SQLAllocEnv(SQLHENV *EnvironmentHandle);
00573
00574 #if (ODBCVER >= 0x0300)
00575 SQLRETURN SQL_API SQLAllocHandle(SQLSMALLINT HandleType,
00576 SQLHANDLE InputHandle, SQLHANDLE *OutputHandle);
00577 #endif
00578
00579 SQLRETURN SQL_API SQLAllocStmt(SQLHDBC ConnectionHandle,
00580 SQLHSTMT *StatementHandle);
00581
00582 SQLRETURN SQL_API SQLBindCol(SQLHSTMT StatementHandle,
00583 SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
00584 SQLPOINTER TargetValue, SQLLEN BufferLength,
00585 SQLLEN *StrLen_or_Ind);
00586
00587 #if (ODBCVER >= 0x0300)
00588 SQLRETURN SQL_API SQLBindParam(SQLHSTMT StatementHandle,
00589 SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
00590 SQLSMALLINT ParameterType, SQLULEN LengthPrecision,
00591 SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
00592 SQLLEN *StrLen_or_Ind);
00593 #endif
00594
00595 SQLRETURN SQL_API SQLCancel(SQLHSTMT StatementHandle);
00596
00597 #if (ODBCVER >= 0x0300)
00598 SQLRETURN SQL_API SQLCloseCursor(SQLHSTMT StatementHandle);
00599
00600 SQLRETURN SQL_API SQLColAttribute (SQLHSTMT StatementHandle,
00601 SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier,
00602 SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength,
00603 SQLSMALLINT *StringLength, SQLLEN *NumericAttribute
00604 );
00605
00606
00607 #endif
00608
00609
00610 SQLRETURN SQL_API SQLColumns(SQLHSTMT StatementHandle,
00611 SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
00612 SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
00613 SQLCHAR *TableName, SQLSMALLINT NameLength3,
00614 SQLCHAR *ColumnName, SQLSMALLINT NameLength4);
00615
00616
00617 SQLRETURN SQL_API SQLConnect(SQLHDBC ConnectionHandle,
00618 SQLCHAR *ServerName, SQLSMALLINT NameLength1,
00619 SQLCHAR *UserName, SQLSMALLINT NameLength2,
00620 SQLCHAR *Authentication, SQLSMALLINT NameLength3);
00621
00622 #if (ODBCVER >= 0x0300)
00623 SQLRETURN SQL_API SQLCopyDesc(SQLHDESC SourceDescHandle,
00624 SQLHDESC TargetDescHandle);
00625 #endif
00626
00627 SQLRETURN SQL_API SQLDataSources(SQLHENV EnvironmentHandle,
00628 SQLUSMALLINT Direction, SQLCHAR *ServerName,
00629 SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1,
00630 SQLCHAR *Description, SQLSMALLINT BufferLength2,
00631 SQLSMALLINT *NameLength2);
00632
00633 SQLRETURN SQL_API SQLDescribeCol(SQLHSTMT StatementHandle,
00634 SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName,
00635 SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
00636 SQLSMALLINT *DataType, SQLULEN *ColumnSize,
00637 SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable);
00638
00639 SQLRETURN SQL_API SQLDisconnect(SQLHDBC ConnectionHandle);
00640
00641 #if (ODBCVER >= 0x0300)
00642 SQLRETURN SQL_API SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle,
00643 SQLSMALLINT CompletionType);
00644 #endif
00645
00646 SQLRETURN SQL_API SQLError(SQLHENV EnvironmentHandle,
00647 SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle,
00648 SQLCHAR *Sqlstate, SQLINTEGER *NativeError,
00649 SQLCHAR *MessageText, SQLSMALLINT BufferLength,
00650 SQLSMALLINT *TextLength);
00651
00652 SQLRETURN SQL_API SQLExecDirect(SQLHSTMT StatementHandle,
00653 SQLCHAR *StatementText, SQLINTEGER TextLength);
00654
00655 SQLRETURN SQL_API SQLExecute(SQLHSTMT StatementHandle);
00656
00657 SQLRETURN SQL_API SQLFetch(SQLHSTMT StatementHandle);
00658
00659 #if (ODBCVER >= 0x0300)
00660 SQLRETURN SQL_API SQLFetchScroll(SQLHSTMT StatementHandle,
00661 SQLSMALLINT FetchOrientation, SQLROWOFFSET FetchOffset);
00662 #endif
00663
00664 SQLRETURN SQL_API SQLFreeConnect(SQLHDBC ConnectionHandle);
00665
00666 SQLRETURN SQL_API SQLFreeEnv(SQLHENV EnvironmentHandle);
00667
00668 #if (ODBCVER >= 0x0300)
00669 SQLRETURN SQL_API SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle);
00670 #endif
00671
00672 SQLRETURN SQL_API SQLFreeStmt(SQLHSTMT StatementHandle,
00673 SQLUSMALLINT Option);
00674
00675 #if (ODBCVER >= 0x0300)
00676 SQLRETURN SQL_API SQLGetConnectAttr(SQLHDBC ConnectionHandle,
00677 SQLINTEGER Attribute, SQLPOINTER Value,
00678 SQLINTEGER BufferLength, SQLINTEGER *StringLength);
00679 #endif
00680
00681 SQLRETURN SQL_API SQLGetConnectOption(SQLHDBC ConnectionHandle,
00682 SQLUSMALLINT Option, SQLPOINTER Value);
00683
00684 SQLRETURN SQL_API SQLGetCursorName(SQLHSTMT StatementHandle,
00685 SQLCHAR *CursorName, SQLSMALLINT BufferLength,
00686 SQLSMALLINT *NameLength);
00687
00688 SQLRETURN SQL_API SQLGetData(SQLHSTMT StatementHandle,
00689 SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
00690 SQLPOINTER TargetValue, SQLLEN BufferLength,
00691 SQLLEN *StrLen_or_Ind);
00692
00693 #if (ODBCVER >= 0x0300)
00694 SQLRETURN SQLGetDescField(SQLHDESC DescriptorHandle,
00695 SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
00696 SQLPOINTER Value, SQLINTEGER BufferLength,
00697 SQLINTEGER *StringLength);
00698
00699 SQLRETURN SQL_API SQLGetDescRec(SQLHDESC DescriptorHandle,
00700 SQLSMALLINT RecNumber, SQLCHAR *Name,
00701 SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
00702 SQLSMALLINT *Type, SQLSMALLINT *SubType,
00703 SQLLEN *Length, SQLSMALLINT *Precision,
00704 SQLSMALLINT *Scale, SQLSMALLINT *Nullable);
00705
00706 SQLRETURN SQL_API SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle,
00707 SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier,
00708 SQLPOINTER DiagInfo, SQLSMALLINT BufferLength,
00709 SQLSMALLINT *StringLength);
00710
00711 SQLRETURN SQL_API SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
00712 SQLSMALLINT RecNumber, SQLCHAR *Sqlstate,
00713 SQLINTEGER *NativeError, SQLCHAR *MessageText,
00714 SQLSMALLINT BufferLength, SQLSMALLINT *TextLength);
00715
00716 SQLRETURN SQL_API SQLGetEnvAttr(SQLHENV EnvironmentHandle,
00717 SQLINTEGER Attribute, SQLPOINTER Value,
00718 SQLINTEGER BufferLength, SQLINTEGER *StringLength);
00719 #endif
00720
00721 SQLRETURN SQL_API SQLGetFunctions(SQLHDBC ConnectionHandle,
00722 SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported);
00723
00724 SQLRETURN SQL_API SQLGetInfo(SQLHDBC ConnectionHandle,
00725 SQLUSMALLINT InfoType, SQLPOINTER InfoValue,
00726 SQLSMALLINT BufferLength, SQLSMALLINT *StringLength);
00727
00728 #if (ODBCVER >= 0x0300)
00729 SQLRETURN SQL_API SQLGetStmtAttr(SQLHSTMT StatementHandle,
00730 SQLINTEGER Attribute, SQLPOINTER Value,
00731 SQLINTEGER BufferLength, SQLINTEGER *StringLength);
00732 #endif
00733
00734 SQLRETURN SQL_API SQLGetStmtOption(SQLHSTMT StatementHandle,
00735 SQLUSMALLINT Option, SQLPOINTER Value);
00736
00737 SQLRETURN SQL_API SQLGetTypeInfo(SQLHSTMT StatementHandle,
00738 SQLSMALLINT DataType);
00739
00740 SQLRETURN SQL_API SQLNumResultCols(SQLHSTMT StatementHandle,
00741 SQLSMALLINT *ColumnCount);
00742
00743 SQLRETURN SQL_API SQLParamData(SQLHSTMT StatementHandle,
00744 SQLPOINTER *Value);
00745
00746 SQLRETURN SQL_API SQLPrepare(SQLHSTMT StatementHandle,
00747 SQLCHAR *StatementText, SQLINTEGER TextLength);
00748
00749 SQLRETURN SQL_API SQLPutData(SQLHSTMT StatementHandle,
00750 SQLPOINTER Data, SQLLEN StrLen_or_Ind);
00751
00752 SQLRETURN SQL_API SQLRowCount(SQLHSTMT StatementHandle,
00753 SQLLEN *RowCount);
00754
00755 #if (ODBCVER >= 0x0300)
00756 SQLRETURN SQL_API SQLSetConnectAttr(SQLHDBC ConnectionHandle,
00757 SQLINTEGER Attribute, SQLPOINTER Value,
00758 SQLINTEGER StringLength);
00759 #endif
00760
00761 SQLRETURN SQL_API SQLSetConnectOption(SQLHDBC ConnectionHandle,
00762 SQLUSMALLINT Option, SQLULEN Value);
00763
00764 SQLRETURN SQL_API SQLSetCursorName(SQLHSTMT StatementHandle,
00765 SQLCHAR *CursorName, SQLSMALLINT NameLength);
00766
00767 #if (ODBCVER >= 0x0300)
00768 SQLRETURN SQL_API SQLSetDescField(SQLHDESC DescriptorHandle,
00769 SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
00770 SQLPOINTER Value, SQLINTEGER BufferLength);
00771
00772 SQLRETURN SQL_API SQLSetDescRec(SQLHDESC DescriptorHandle,
00773 SQLSMALLINT RecNumber, SQLSMALLINT Type,
00774 SQLSMALLINT SubType, SQLLEN Length,
00775 SQLSMALLINT Precision, SQLSMALLINT Scale,
00776 SQLPOINTER Data, SQLLEN *StringLength,
00777 SQLLEN *Indicator);
00778
00779 SQLRETURN SQL_API SQLSetEnvAttr(SQLHENV EnvironmentHandle,
00780 SQLINTEGER Attribute, SQLPOINTER Value,
00781 SQLINTEGER StringLength);
00782 #endif
00783
00784 SQLRETURN SQL_API SQLSetParam(SQLHSTMT StatementHandle,
00785 SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
00786 SQLSMALLINT ParameterType, SQLULEN LengthPrecision,
00787 SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
00788 SQLLEN *StrLen_or_Ind);
00789
00790 #if (ODBCVER >= 0x0300)
00791 SQLRETURN SQL_API SQLSetStmtAttr(SQLHSTMT StatementHandle,
00792 SQLINTEGER Attribute, SQLPOINTER Value,
00793 SQLINTEGER StringLength);
00794 #endif
00795
00796 SQLRETURN SQL_API SQLSetStmtOption(SQLHSTMT StatementHandle,
00797 SQLUSMALLINT Option, SQLROWCOUNT Value);
00798
00799 SQLRETURN SQL_API SQLSpecialColumns(SQLHSTMT StatementHandle,
00800 SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName,
00801 SQLSMALLINT NameLength1, SQLCHAR *SchemaName,
00802 SQLSMALLINT NameLength2, SQLCHAR *TableName,
00803 SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
00804 SQLUSMALLINT Nullable);
00805
00806 SQLRETURN SQL_API SQLStatistics(SQLHSTMT StatementHandle,
00807 SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
00808 SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
00809 SQLCHAR *TableName, SQLSMALLINT NameLength3,
00810 SQLUSMALLINT Unique, SQLUSMALLINT Reserved);
00811
00812 SQLRETURN SQL_API SQLTables(SQLHSTMT StatementHandle,
00813 SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
00814 SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
00815 SQLCHAR *TableName, SQLSMALLINT NameLength3,
00816 SQLCHAR *TableType, SQLSMALLINT NameLength4);
00817
00818 SQLRETURN SQL_API SQLTransact(SQLHENV EnvironmentHandle,
00819 SQLHDBC ConnectionHandle, SQLUSMALLINT CompletionType);
00820
00821 #ifdef __cplusplus
00822 }
00823 #endif
00824 #endif