include/sqlext.h

Go to the documentation of this file.
00001 
00002 
00003 /*****************************************************
00004  * sqlext.h
00005  *
00006  * These should be consistent with the MS version.
00007  *
00008  *****************************************************/
00009 #ifndef __SQLEXT_H
00010 #define __SQLEXT_H
00011 
00012 
00013 /* BEGIN - unixODBC ONLY (programs like ODBCConfig and DataManager use these) */
00014 
00015 /* COLUMNS IN SQLTables() RESULT SET */
00016 #define SQLTables_TABLE_CATALOG 1
00017 #define SQLTables_TABLE_SCHEM 2
00018 #define SQLTables_TABLE_NAME 3
00019 #define SQLTables_TABLE_TYPE 4
00020 #define SQLTables_REMARKS 5
00021 
00022 /* COLUMNS IN SQLColumns() RESULT SET */                     
00023 #define SQLColumns_TABLE_CAT 1
00024 #define SQLColumns_TABLE_SCHEM 2
00025 #define SQLColumns_TABLE_NAME 3
00026 #define SQLColumns_COLUMN_NAME 4
00027 #define SQLColumns_DATA_TYPE 5
00028 #define SQLColumns_TYPE_NAME 6
00029 #define SQLColumns_COLUMN_SIZE 7
00030 #define SQLColumns_BUFFER_LENGTH 8
00031 #define SQLColumns_DECIMAL_DIGITS 9
00032 #define SQLColumns_NUM_PREC_RADIX 10
00033 #define SQLColumns_NULLABLE 11
00034 #define SQLColumns_REMARKS 12
00035 #define SQLColumns_COLUMN_DEF 13
00036 #define SQLColumns_SQL_DATA_TYPE 14
00037 #define SQLColumns_SQL_DATETIME_SUB 15
00038 #define SQLColumns_CHAR_OCTET_LENGTH 16
00039 #define SQLColumns_ORDINAL_POSITION 17
00040 #define SQLColumns_IS_NULLABLE 18
00041 
00042 /* END - unixODBC ONLY */
00043 
00044 #ifndef __SQL_H
00045 #include "sql.h"
00046 #endif
00047 
00048 #ifdef __cplusplus
00049 extern "C" {                         /* Assume C declarations for C++ */
00050 #endif
00051 
00052 /* generally useful constants */
00053 #define SQL_SPEC_MAJOR     3            /* Major version of specification  */
00054 #define SQL_SPEC_MINOR     52           /* Minor version of specification  */
00055 #define SQL_SPEC_STRING   "03.52"       /* String constant for version */
00056 
00057 #define SQL_SQLSTATE_SIZE       5       /* size of SQLSTATE */
00058 #define SQL_MAX_DSN_LENGTH      32      /* maximum data source name size */
00059 
00060 #define SQL_MAX_OPTION_STRING_LENGTH    256
00061 
00062 /* return code SQL_NO_DATA_FOUND is the same as SQL_NO_DATA */
00063 #if (ODBCVER < 0x0300)
00064 #define SQL_NO_DATA_FOUND       100
00065 #else
00066 #define SQL_NO_DATA_FOUND       SQL_NO_DATA
00067 #endif
00068 
00069 /* an end handle type */
00070 #if (ODBCVER >= 0x0300)
00071 #define SQL_HANDLE_SENV         5
00072 #endif  /* ODBCVER >= 0x0300 */
00073 
00074 /* env attribute */
00075 #if (ODBCVER >= 0x0300)
00076 #define SQL_ATTR_ODBC_VERSION                           200
00077 #define SQL_ATTR_CONNECTION_POOLING                     201
00078 #define SQL_ATTR_CP_MATCH                                       202
00079 
00080 /* unixODBC additions */
00081 #define SQL_ATTR_UNIXODBC_SYSPATH           65001
00082 #define SQL_ATTR_UNIXODBC_VERSION           65002
00083 #define SQL_ATTR_UNIXODBC_ENVATTR           65003
00084 #endif  /* ODBCVER >= 0x0300 */
00085 
00086 #if (ODBCVER >= 0x0300)
00087 /* values for SQL_ATTR_CONNECTION_POOLING */
00088 #define SQL_CP_OFF                                                      0UL
00089 #define SQL_CP_ONE_PER_DRIVER                           1UL
00090 #define SQL_CP_ONE_PER_HENV                                     2UL
00091 #define SQL_CP_DEFAULT                                          SQL_CP_OFF
00092 
00093 /* values for SQL_ATTR_CP_MATCH */
00094 #define SQL_CP_STRICT_MATCH                                     0UL
00095 #define SQL_CP_RELAXED_MATCH                            1UL
00096 #define SQL_CP_MATCH_DEFAULT                            SQL_CP_STRICT_MATCH             
00097 
00098 /* values for SQL_ATTR_ODBC_VERSION */
00099 #define SQL_OV_ODBC2                                            2UL
00100 #define SQL_OV_ODBC3                                            3UL
00101 #endif  /* ODBCVER >= 0x0300 */
00102 
00103 /* connection attributes */
00104 #define SQL_ACCESS_MODE                 101
00105 #define SQL_AUTOCOMMIT                  102
00106 #define SQL_LOGIN_TIMEOUT               103
00107 #define SQL_OPT_TRACE                   104
00108 #define SQL_OPT_TRACEFILE               105
00109 #define SQL_TRANSLATE_DLL               106
00110 #define SQL_TRANSLATE_OPTION            107
00111 #define SQL_TXN_ISOLATION               108
00112 #define SQL_CURRENT_QUALIFIER           109
00113 #define SQL_ODBC_CURSORS                110
00114 #define SQL_QUIET_MODE                  111
00115 #define SQL_PACKET_SIZE                 112
00116 
00117 /* connection attributes with new names */
00118 #if (ODBCVER >= 0x0300)
00119 #define SQL_ATTR_ACCESS_MODE            SQL_ACCESS_MODE
00120 #define SQL_ATTR_AUTOCOMMIT                     SQL_AUTOCOMMIT
00121 #define SQL_ATTR_CONNECTION_TIMEOUT     113
00122 #define SQL_ATTR_CURRENT_CATALOG        SQL_CURRENT_QUALIFIER
00123 #define SQL_ATTR_DISCONNECT_BEHAVIOR    114
00124 #define SQL_ATTR_ENLIST_IN_DTC          1207
00125 #define SQL_ATTR_ENLIST_IN_XA           1208
00126 #define SQL_ATTR_LOGIN_TIMEOUT          SQL_LOGIN_TIMEOUT
00127 #define SQL_ATTR_ODBC_CURSORS           SQL_ODBC_CURSORS
00128 #define SQL_ATTR_PACKET_SIZE            SQL_PACKET_SIZE
00129 #define SQL_ATTR_QUIET_MODE                     SQL_QUIET_MODE
00130 #define SQL_ATTR_TRACE                          SQL_OPT_TRACE
00131 #define SQL_ATTR_TRACEFILE                      SQL_OPT_TRACEFILE
00132 #define SQL_ATTR_TRANSLATE_LIB          SQL_TRANSLATE_DLL
00133 #define SQL_ATTR_TRANSLATE_OPTION       SQL_TRANSLATE_OPTION
00134 #define SQL_ATTR_TXN_ISOLATION          SQL_TXN_ISOLATION
00135 #endif  /* ODBCVER >= 0x0300 */
00136 
00137 #define SQL_ATTR_CONNECTION_DEAD        1209    /* GetConnectAttr only */
00138 
00139 #define SQL_ATTR_DRIVER_THREADING       1028    /* Driver threading level */
00140 
00141 #if (ODBCVER >= 0x0351)
00142 /*      ODBC Driver Manager sets this connection attribute to a unicode driver
00143         (which supports SQLConnectW) when the application is an ANSI application
00144         (which calls SQLConnect, SQLDriverConnect, or SQLBrowseConnect).
00145         This is SetConnectAttr only and application does not set this attribute
00146         This attribute was introduced because some unicode driver's some APIs may
00147         need to behave differently on ANSI or Unicode applications. A unicode
00148         driver, which  has same behavior for both ANSI or Unicode applications,
00149         should return SQL_ERROR when the driver manager sets this connection
00150         attribute. When a unicode driver returns SQL_SUCCESS on this attribute,
00151         the driver manager treates ANSI and Unicode connections differently in
00152         connection pooling.
00153 */
00154 #define SQL_ATTR_ANSI_APP                       115
00155 #endif
00156 
00157 /* SQL_CONNECT_OPT_DRVR_START is not meaningful for 3.0 driver */
00158 #if (ODBCVER < 0x0300)
00159 #define SQL_CONNECT_OPT_DRVR_START      1000
00160 #endif  /* ODBCVER < 0x0300 */
00161 
00162 #if (ODBCVER < 0x0300)
00163 #define SQL_CONN_OPT_MAX                SQL_PACKET_SIZE
00164 #define SQL_CONN_OPT_MIN                SQL_ACCESS_MODE
00165 #endif /* ODBCVER < 0x0300 */
00166 
00167 /* SQL_ACCESS_MODE options */
00168 #define SQL_MODE_READ_WRITE             0UL
00169 #define SQL_MODE_READ_ONLY              1UL
00170 #define SQL_MODE_DEFAULT                SQL_MODE_READ_WRITE
00171 
00172 /* SQL_AUTOCOMMIT options */
00173 #define SQL_AUTOCOMMIT_OFF              0UL
00174 #define SQL_AUTOCOMMIT_ON               1UL
00175 #define SQL_AUTOCOMMIT_DEFAULT          SQL_AUTOCOMMIT_ON
00176 
00177 /* SQL_LOGIN_TIMEOUT options */
00178 #define SQL_LOGIN_TIMEOUT_DEFAULT       15UL
00179 
00180 /* SQL_OPT_TRACE options */
00181 #define SQL_OPT_TRACE_OFF               0UL
00182 #define SQL_OPT_TRACE_ON                1UL
00183 #define SQL_OPT_TRACE_DEFAULT           SQL_OPT_TRACE_OFF
00184 #define SQL_OPT_TRACE_FILE_DEFAULT      "\\SQL.LOG"
00185 
00186 /* SQL_ODBC_CURSORS options */
00187 #define SQL_CUR_USE_IF_NEEDED           0UL
00188 #define SQL_CUR_USE_ODBC                1UL
00189 #define SQL_CUR_USE_DRIVER              2UL
00190 #define SQL_CUR_DEFAULT                 SQL_CUR_USE_DRIVER
00191 
00192 #if (ODBCVER >= 0x0300)
00193 /* values for SQL_ATTR_DISCONNECT_BEHAVIOR */
00194 #define SQL_DB_RETURN_TO_POOL                   0UL
00195 #define SQL_DB_DISCONNECT                               1UL
00196 #define SQL_DB_DEFAULT                                  SQL_DB_RETURN_TO_POOL
00197 
00198 /* values for SQL_ATTR_ENLIST_IN_DTC */
00199 #define SQL_DTC_DONE                                    0L
00200 #endif  /* ODBCVER >= 0x0300 */
00201 
00202 /* values for SQL_ATTR_CONNECTION_DEAD */
00203 #define SQL_CD_TRUE                                     1L              /* Connection is closed/dead */
00204 #define SQL_CD_FALSE                            0L              /* Connection is open/available */
00205 
00206 /* values for SQL_ATTR_ANSI_APP */
00207 #if (ODBCVER >= 0x0351)
00208 #define SQL_AA_TRUE                                     1L      /* the application is an ANSI app */
00209 #define SQL_AA_FALSE                                    0L      /* the application is a Unicode app */
00210 #endif
00211 
00212 /* statement attributes */
00213 #define SQL_QUERY_TIMEOUT               0
00214 #define SQL_MAX_ROWS                    1
00215 #define SQL_NOSCAN                              2
00216 #define SQL_MAX_LENGTH                  3
00217 #define SQL_ASYNC_ENABLE                4       /* same as SQL_ATTR_ASYNC_ENABLE */     
00218 #define SQL_BIND_TYPE                   5
00219 #define SQL_CURSOR_TYPE                 6
00220 #define SQL_CONCURRENCY                 7
00221 #define SQL_KEYSET_SIZE                 8
00222 #define SQL_ROWSET_SIZE                 9
00223 #define SQL_SIMULATE_CURSOR             10
00224 #define SQL_RETRIEVE_DATA               11
00225 #define SQL_USE_BOOKMARKS               12
00226 #define SQL_GET_BOOKMARK                13      /*      GetStmtOption Only */
00227 #define SQL_ROW_NUMBER                  14      /*      GetStmtOption Only */
00228 
00229 /* statement attributes for ODBC 3.0 */
00230 #if (ODBCVER >= 0x0300)
00231 #define SQL_ATTR_ASYNC_ENABLE                           4
00232 #define SQL_ATTR_CONCURRENCY                            SQL_CONCURRENCY
00233 #define SQL_ATTR_CURSOR_TYPE                            SQL_CURSOR_TYPE
00234 #define SQL_ATTR_ENABLE_AUTO_IPD                        15
00235 #define SQL_ATTR_FETCH_BOOKMARK_PTR                     16
00236 #define SQL_ATTR_KEYSET_SIZE                            SQL_KEYSET_SIZE
00237 #define SQL_ATTR_MAX_LENGTH                                     SQL_MAX_LENGTH
00238 #define SQL_ATTR_MAX_ROWS                                       SQL_MAX_ROWS
00239 #define SQL_ATTR_NOSCAN                                         SQL_NOSCAN
00240 #define SQL_ATTR_PARAM_BIND_OFFSET_PTR          17
00241 #define SQL_ATTR_PARAM_BIND_TYPE                        18
00242 #define SQL_ATTR_PARAM_OPERATION_PTR            19
00243 #define SQL_ATTR_PARAM_STATUS_PTR                       20
00244 #define SQL_ATTR_PARAMS_PROCESSED_PTR           21
00245 #define SQL_ATTR_PARAMSET_SIZE                          22
00246 #define SQL_ATTR_QUERY_TIMEOUT                          SQL_QUERY_TIMEOUT
00247 #define SQL_ATTR_RETRIEVE_DATA                          SQL_RETRIEVE_DATA
00248 #define SQL_ATTR_ROW_BIND_OFFSET_PTR            23
00249 #define SQL_ATTR_ROW_BIND_TYPE                          SQL_BIND_TYPE
00250 #define SQL_ATTR_ROW_NUMBER                                     SQL_ROW_NUMBER          /*GetStmtAttr*/
00251 #define SQL_ATTR_ROW_OPERATION_PTR                      24
00252 #define SQL_ATTR_ROW_STATUS_PTR                         25
00253 #define SQL_ATTR_ROWS_FETCHED_PTR                       26
00254 #define SQL_ATTR_ROW_ARRAY_SIZE                         27      
00255 #define SQL_ATTR_SIMULATE_CURSOR                        SQL_SIMULATE_CURSOR
00256 #define SQL_ATTR_USE_BOOKMARKS                          SQL_USE_BOOKMARKS       
00257 
00258 #endif  /* ODBCVER >= 0x0300 */
00259 
00260 #if (ODBCVER < 0x0300)
00261 #define SQL_STMT_OPT_MAX                SQL_ROW_NUMBER
00262 #define SQL_STMT_OPT_MIN        SQL_QUERY_TIMEOUT
00263 #endif          /* ODBCVER < 0x0300 */
00264 
00265 /* New defines for SEARCHABLE column in SQLGetTypeInfo */
00266 
00267 #if (ODBCVER >= 0x0300)
00268 #define SQL_COL_PRED_CHAR               SQL_LIKE_ONLY
00269 #define SQL_COL_PRED_BASIC              SQL_ALL_EXCEPT_LIKE
00270 #endif /* ODBCVER >= 0x0300 */
00271 
00272 
00273 
00274 /* whether an attribute is a pointer or not */
00275 #if (ODBCVER >= 0x0300)
00276 #define SQL_IS_POINTER                                                  (-4)
00277 #define SQL_IS_UINTEGER                                                 (-5)
00278 #define SQL_IS_INTEGER                                                  (-6)
00279 #define SQL_IS_USMALLINT                                                (-7)
00280 #define SQL_IS_SMALLINT                                                 (-8)
00281 #endif  /* ODBCVER >= 0x0300 */
00282 
00283 /* the value of SQL_ATTR_PARAM_BIND_TYPE */
00284 #if (ODBCVER >= 0x0300)
00285 #define SQL_PARAM_BIND_BY_COLUMN                        0UL
00286 #define SQL_PARAM_BIND_TYPE_DEFAULT                     SQL_PARAM_BIND_BY_COLUMN
00287 #endif  /* ODBCVER >= 0x0300 */
00288 
00289 /* SQL_QUERY_TIMEOUT options */
00290 #define SQL_QUERY_TIMEOUT_DEFAULT       0UL
00291 
00292 /* SQL_MAX_ROWS options */
00293 #define SQL_MAX_ROWS_DEFAULT            0UL
00294 
00295 /* SQL_NOSCAN options */
00296 #define SQL_NOSCAN_OFF                  0UL     /*      1.0 FALSE */
00297 #define SQL_NOSCAN_ON                   1UL     /*      1.0 TRUE */
00298 #define SQL_NOSCAN_DEFAULT              SQL_NOSCAN_OFF
00299 
00300 /* SQL_MAX_LENGTH options */
00301 #define SQL_MAX_LENGTH_DEFAULT          0UL
00302 
00303 /* values for SQL_ATTR_ASYNC_ENABLE */
00304 #define SQL_ASYNC_ENABLE_OFF                    0UL
00305 #define SQL_ASYNC_ENABLE_ON                             1UL
00306 #define SQL_ASYNC_ENABLE_DEFAULT        SQL_ASYNC_ENABLE_OFF
00307 
00308 /* SQL_BIND_TYPE options */
00309 #define SQL_BIND_BY_COLUMN              0UL
00310 #define SQL_BIND_TYPE_DEFAULT           SQL_BIND_BY_COLUMN  /* Default value */
00311 
00312 /* SQL_CONCURRENCY options */
00313 #define SQL_CONCUR_READ_ONLY            1
00314 #define SQL_CONCUR_LOCK                 2
00315 #define SQL_CONCUR_ROWVER               3
00316 #define SQL_CONCUR_VALUES               4
00317 #define SQL_CONCUR_DEFAULT              SQL_CONCUR_READ_ONLY /* Default value */
00318 
00319 /* SQL_CURSOR_TYPE options */
00320 #define SQL_CURSOR_FORWARD_ONLY         0UL
00321 #define SQL_CURSOR_KEYSET_DRIVEN        1UL
00322 #define SQL_CURSOR_DYNAMIC              2UL
00323 #define SQL_CURSOR_STATIC               3UL
00324 #define SQL_CURSOR_TYPE_DEFAULT         SQL_CURSOR_FORWARD_ONLY /* Default value */
00325 
00326 /* SQL_ROWSET_SIZE options */
00327 #define SQL_ROWSET_SIZE_DEFAULT         1UL
00328 
00329 /* SQL_KEYSET_SIZE options */
00330 #define SQL_KEYSET_SIZE_DEFAULT         0UL
00331 
00332 /* SQL_SIMULATE_CURSOR options */
00333 #define SQL_SC_NON_UNIQUE               0UL
00334 #define SQL_SC_TRY_UNIQUE               1UL
00335 #define SQL_SC_UNIQUE                   2UL
00336 
00337 /* SQL_RETRIEVE_DATA options */
00338 #define SQL_RD_OFF                      0UL
00339 #define SQL_RD_ON                       1UL
00340 #define SQL_RD_DEFAULT                  SQL_RD_ON
00341 
00342 /* SQL_USE_BOOKMARKS options */
00343 #define SQL_UB_OFF                      0UL
00344 #define SQL_UB_ON                                               01UL
00345 #define SQL_UB_DEFAULT                  SQL_UB_OFF
00346 
00347 /* New values for SQL_USE_BOOKMARKS attribute */
00348 #if (ODBCVER >= 0x0300)
00349 #define SQL_UB_FIXED                                    SQL_UB_ON
00350 #define SQL_UB_VARIABLE                                 2UL
00351 #endif  /* ODBCVER >= 0x0300 */
00352 
00353 /* extended descriptor field */
00354 #if (ODBCVER >= 0x0300)
00355 #define SQL_DESC_ARRAY_SIZE                                             20
00356 #define SQL_DESC_ARRAY_STATUS_PTR                               21
00357 #define SQL_DESC_AUTO_UNIQUE_VALUE                              SQL_COLUMN_AUTO_INCREMENT
00358 #define SQL_DESC_BASE_COLUMN_NAME                               22
00359 #define SQL_DESC_BASE_TABLE_NAME                                23
00360 #define SQL_DESC_BIND_OFFSET_PTR                                24
00361 #define SQL_DESC_BIND_TYPE                                              25
00362 #define SQL_DESC_CASE_SENSITIVE                                 SQL_COLUMN_CASE_SENSITIVE
00363 #define SQL_DESC_CATALOG_NAME                                   SQL_COLUMN_QUALIFIER_NAME
00364 #define SQL_DESC_CONCISE_TYPE                                   SQL_COLUMN_TYPE
00365 #define SQL_DESC_DATETIME_INTERVAL_PRECISION    26
00366 #define SQL_DESC_DISPLAY_SIZE                                   SQL_COLUMN_DISPLAY_SIZE
00367 #define SQL_DESC_FIXED_PREC_SCALE                               SQL_COLUMN_MONEY
00368 #define SQL_DESC_LABEL                                                  SQL_COLUMN_LABEL
00369 #define SQL_DESC_LITERAL_PREFIX                                 27
00370 #define SQL_DESC_LITERAL_SUFFIX                                 28
00371 #define SQL_DESC_LOCAL_TYPE_NAME                                29
00372 #define SQL_DESC_MAXIMUM_SCALE                                  30
00373 #define SQL_DESC_MINIMUM_SCALE                                  31
00374 #define SQL_DESC_NUM_PREC_RADIX                                 32
00375 #define SQL_DESC_PARAMETER_TYPE                                 33
00376 #define SQL_DESC_ROWS_PROCESSED_PTR                             34
00377 #if (ODBCVER >= 0x0350)
00378 #define SQL_DESC_ROWVER                                                 35
00379 #endif /* ODBCVER >= 0x0350 */
00380 #define SQL_DESC_SCHEMA_NAME                                    SQL_COLUMN_OWNER_NAME
00381 #define SQL_DESC_SEARCHABLE                                             SQL_COLUMN_SEARCHABLE
00382 #define SQL_DESC_TYPE_NAME                                              SQL_COLUMN_TYPE_NAME
00383 #define SQL_DESC_TABLE_NAME                                             SQL_COLUMN_TABLE_NAME
00384 #define SQL_DESC_UNSIGNED                                               SQL_COLUMN_UNSIGNED
00385 #define SQL_DESC_UPDATABLE                                              SQL_COLUMN_UPDATABLE
00386 #endif /* ODBCVER >= 0x0300 */
00387 
00388 
00389 /* defines for diagnostics fields */
00390 #if (ODBCVER >= 0x0300)
00391 #define SQL_DIAG_CURSOR_ROW_COUNT                       (-1249)
00392 #define SQL_DIAG_ROW_NUMBER                                     (-1248)
00393 #define SQL_DIAG_COLUMN_NUMBER                          (-1247) 
00394 #endif /* ODBCVER >= 0x0300 */
00395 
00396 /* SQL extended datatypes */
00397 #define SQL_DATE                                9
00398 #if (ODBCVER >= 0x0300)
00399 #define SQL_INTERVAL                                                    10
00400 #endif  /* ODBCVER >= 0x0300 */
00401 #define SQL_TIME                                10
00402 #define SQL_TIMESTAMP                           11
00403 #define SQL_LONGVARCHAR                         (-1)
00404 #define SQL_BINARY                              (-2)
00405 #define SQL_VARBINARY                           (-3)
00406 #define SQL_LONGVARBINARY                       (-4)
00407 #define SQL_BIGINT                              (-5)
00408 #define SQL_TINYINT                             (-6)
00409 #define SQL_BIT                                 (-7)
00410 #if (ODBCVER >= 0x0350)
00411 #define SQL_GUID                                (-11)
00412 #endif  /* ODBCVER >= 0x0350 */
00413 
00414 #if (ODBCVER >= 0x0300)
00415 /* interval code */
00416 #define SQL_CODE_YEAR                           1
00417 #define SQL_CODE_MONTH                          2
00418 #define SQL_CODE_DAY                            3
00419 #define SQL_CODE_HOUR                           4
00420 #define SQL_CODE_MINUTE                         5
00421 #define SQL_CODE_SECOND                         6
00422 #define SQL_CODE_YEAR_TO_MONTH                  7
00423 #define SQL_CODE_DAY_TO_HOUR                    8
00424 #define SQL_CODE_DAY_TO_MINUTE                  9
00425 #define SQL_CODE_DAY_TO_SECOND                  10
00426 #define SQL_CODE_HOUR_TO_MINUTE                 11
00427 #define SQL_CODE_HOUR_TO_SECOND                 12
00428 #define SQL_CODE_MINUTE_TO_SECOND               13
00429 
00430 #define SQL_INTERVAL_YEAR                                       (100 + SQL_CODE_YEAR)
00431 #define SQL_INTERVAL_MONTH                                      (100 + SQL_CODE_MONTH)
00432 #define SQL_INTERVAL_DAY                                        (100 + SQL_CODE_DAY)
00433 #define SQL_INTERVAL_HOUR                                       (100 + SQL_CODE_HOUR)
00434 #define SQL_INTERVAL_MINUTE                                     (100 + SQL_CODE_MINUTE)
00435 #define SQL_INTERVAL_SECOND                     (100 + SQL_CODE_SECOND)
00436 #define SQL_INTERVAL_YEAR_TO_MONTH                      (100 + SQL_CODE_YEAR_TO_MONTH)
00437 #define SQL_INTERVAL_DAY_TO_HOUR                        (100 + SQL_CODE_DAY_TO_HOUR)
00438 #define SQL_INTERVAL_DAY_TO_MINUTE                      (100 + SQL_CODE_DAY_TO_MINUTE)
00439 #define SQL_INTERVAL_DAY_TO_SECOND                      (100 + SQL_CODE_DAY_TO_SECOND)
00440 #define SQL_INTERVAL_HOUR_TO_MINUTE                     (100 + SQL_CODE_HOUR_TO_MINUTE)
00441 #define SQL_INTERVAL_HOUR_TO_SECOND                     (100 + SQL_CODE_HOUR_TO_SECOND)
00442 #define SQL_INTERVAL_MINUTE_TO_SECOND           (100 + SQL_CODE_MINUTE_TO_SECOND)
00443 
00444 #else
00445 #define SQL_INTERVAL_YEAR                       (-80)
00446 #define SQL_INTERVAL_MONTH                      (-81)
00447 #define SQL_INTERVAL_YEAR_TO_MONTH              (-82)
00448 #define SQL_INTERVAL_DAY                        (-83)
00449 #define SQL_INTERVAL_HOUR                       (-84)
00450 #define SQL_INTERVAL_MINUTE                     (-85)
00451 #define SQL_INTERVAL_SECOND                     (-86)
00452 #define SQL_INTERVAL_DAY_TO_HOUR                (-87)
00453 #define SQL_INTERVAL_DAY_TO_MINUTE              (-88)
00454 #define SQL_INTERVAL_DAY_TO_SECOND              (-89)
00455 #define SQL_INTERVAL_HOUR_TO_MINUTE             (-90)
00456 #define SQL_INTERVAL_HOUR_TO_SECOND             (-91)
00457 #define SQL_INTERVAL_MINUTE_TO_SECOND           (-92)
00458 #endif  /* ODBCVER >= 0x0300 */
00459 
00460 
00461 #if (ODBCVER <= 0x0300)
00462 #define SQL_UNICODE                             (-95)
00463 #define SQL_UNICODE_VARCHAR                     (-96)
00464 #define SQL_UNICODE_LONGVARCHAR                 (-97)
00465 #define SQL_UNICODE_CHAR                        SQL_UNICODE
00466 #else
00467 /* The previous definitions for SQL_UNICODE_ are historical and obsolete */
00468 
00469 #define SQL_UNICODE                             SQL_WCHAR
00470 #define SQL_UNICODE_VARCHAR             SQL_WVARCHAR
00471 #define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR
00472 #define SQL_UNICODE_CHAR                SQL_WCHAR
00473 #endif
00474 
00475 #if (ODBCVER < 0x0300)
00476 #define SQL_TYPE_DRIVER_START                   SQL_INTERVAL_YEAR
00477 #define SQL_TYPE_DRIVER_END                     SQL_UNICODE_LONGVARCHAR
00478 #endif  /* ODBCVER < 0x0300 */
00479 
00480 /* C datatype to SQL datatype mapping      SQL types
00481                                            ------------------- */
00482 #define SQL_C_CHAR    SQL_CHAR             /* CHAR, VARCHAR, DECIMAL, NUMERIC */
00483 #define SQL_C_LONG    SQL_INTEGER          /* INTEGER                      */
00484 #define SQL_C_SHORT   SQL_SMALLINT         /* SMALLINT                     */
00485 #define SQL_C_FLOAT   SQL_REAL             /* REAL                         */
00486 #define SQL_C_DOUBLE  SQL_DOUBLE           /* FLOAT, DOUBLE                */
00487 #if (ODBCVER >= 0x0300)
00488 #define SQL_C_NUMERIC           SQL_NUMERIC
00489 #endif  /* ODBCVER >= 0x0300 */
00490 #define SQL_C_DEFAULT 99
00491 
00492 #define SQL_SIGNED_OFFSET       (-20)
00493 #define SQL_UNSIGNED_OFFSET     (-22)
00494 
00495 /* C datatype to SQL datatype mapping */
00496 #define SQL_C_DATE       SQL_DATE
00497 #define SQL_C_TIME       SQL_TIME
00498 #define SQL_C_TIMESTAMP  SQL_TIMESTAMP
00499 #if (ODBCVER >= 0x0300)
00500 #define SQL_C_TYPE_DATE                                 SQL_TYPE_DATE
00501 #define SQL_C_TYPE_TIME                                 SQL_TYPE_TIME
00502 #define SQL_C_TYPE_TIMESTAMP                    SQL_TYPE_TIMESTAMP
00503 #define SQL_C_INTERVAL_YEAR                             SQL_INTERVAL_YEAR
00504 #define SQL_C_INTERVAL_MONTH                    SQL_INTERVAL_MONTH
00505 #define SQL_C_INTERVAL_DAY                              SQL_INTERVAL_DAY
00506 #define SQL_C_INTERVAL_HOUR                             SQL_INTERVAL_HOUR
00507 #define SQL_C_INTERVAL_MINUTE                   SQL_INTERVAL_MINUTE
00508 #define SQL_C_INTERVAL_SECOND                   SQL_INTERVAL_SECOND
00509 #define SQL_C_INTERVAL_YEAR_TO_MONTH    SQL_INTERVAL_YEAR_TO_MONTH
00510 #define SQL_C_INTERVAL_DAY_TO_HOUR              SQL_INTERVAL_DAY_TO_HOUR
00511 #define SQL_C_INTERVAL_DAY_TO_MINUTE    SQL_INTERVAL_DAY_TO_MINUTE
00512 #define SQL_C_INTERVAL_DAY_TO_SECOND    SQL_INTERVAL_DAY_TO_SECOND
00513 #define SQL_C_INTERVAL_HOUR_TO_MINUTE   SQL_INTERVAL_HOUR_TO_MINUTE
00514 #define SQL_C_INTERVAL_HOUR_TO_SECOND   SQL_INTERVAL_HOUR_TO_SECOND
00515 #define SQL_C_INTERVAL_MINUTE_TO_SECOND SQL_INTERVAL_MINUTE_TO_SECOND
00516 #endif  /* ODBCVER >= 0x0300 */
00517 #define SQL_C_BINARY     SQL_BINARY
00518 #define SQL_C_BIT        SQL_BIT
00519 #if (ODBCVER >= 0x0300)
00520 #define SQL_C_SBIGINT   (SQL_BIGINT+SQL_SIGNED_OFFSET)     /* SIGNED BIGINT */
00521 #define SQL_C_UBIGINT   (SQL_BIGINT+SQL_UNSIGNED_OFFSET)   /* UNSIGNED BIGINT */
00522 #endif  /* ODBCVER >= 0x0300 */
00523 #define SQL_C_TINYINT    SQL_TINYINT
00524 #define SQL_C_SLONG      (SQL_C_LONG+SQL_SIGNED_OFFSET)    /* SIGNED INTEGER  */
00525 #define SQL_C_SSHORT     (SQL_C_SHORT+SQL_SIGNED_OFFSET)   /* SIGNED SMALLINT */
00526 #define SQL_C_STINYINT   (SQL_TINYINT+SQL_SIGNED_OFFSET)   /* SIGNED TINYINT  */
00527 #define SQL_C_ULONG      (SQL_C_LONG+SQL_UNSIGNED_OFFSET)  /* UNSIGNED INTEGER*/
00528 #define SQL_C_USHORT     (SQL_C_SHORT+SQL_UNSIGNED_OFFSET) /* UNSIGNED SMALLINT*/
00529 #define SQL_C_UTINYINT   (SQL_TINYINT+SQL_UNSIGNED_OFFSET) /* UNSIGNED TINYINT*/
00530 
00531 #if (ODBCVER >= 0x0300) && (SIZEOF_LONG_INT == 8) && !defined(BUILD_LEGACY_64_BIT_MODE)
00532 #define SQL_C_BOOKMARK   SQL_C_UBIGINT                     /* BOOKMARK        */
00533 #else
00534 #define SQL_C_BOOKMARK   SQL_C_ULONG                       /* BOOKMARK        */
00535 #endif
00536 
00537 #if (ODBCVER >= 0x0350)
00538 #define SQL_C_GUID      SQL_GUID
00539 #endif  /* ODBCVER >= 0x0350 */
00540 
00541 #define SQL_TYPE_NULL                   0
00542 #if (ODBCVER < 0x0300)
00543 #define SQL_TYPE_MIN                    SQL_BIT
00544 #define SQL_TYPE_MAX                    SQL_VARCHAR
00545 #endif
00546 
00547 #if (ODBCVER >= 0x0300)
00548 #define SQL_C_VARBOOKMARK               SQL_C_BINARY
00549 #endif  /* ODBCVER >= 0x0300 */
00550 
00551 /* define for SQL_DIAG_ROW_NUMBER and SQL_DIAG_COLUMN_NUMBER */
00552 #if (ODBCVER >= 0x0300)
00553 #define SQL_NO_ROW_NUMBER                                               (-1)
00554 #define SQL_NO_COLUMN_NUMBER                                    (-1)
00555 #define SQL_ROW_NUMBER_UNKNOWN                                  (-2)
00556 #define SQL_COLUMN_NUMBER_UNKNOWN                               (-2)
00557 #endif
00558 
00559 /* SQLBindParameter extensions */
00560 #define SQL_DEFAULT_PARAM            (-5)
00561 #define SQL_IGNORE                   (-6)
00562 #if (ODBCVER >= 0x0300)
00563 #define SQL_COLUMN_IGNORE                       SQL_IGNORE
00564 #endif  /* ODBCVER >= 0x0300 */
00565 #define SQL_LEN_DATA_AT_EXEC_OFFSET  (-100)
00566 #define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET)
00567 
00568 /* binary length for driver specific attributes */
00569 #define SQL_LEN_BINARY_ATTR_OFFSET       (-100)
00570 #define SQL_LEN_BINARY_ATTR(length)      (-(length)+SQL_LEN_BINARY_ATTR_OFFSET)
00571 
00572 /* Defines used by Driver Manager when mapping SQLSetParam to SQLBindParameter
00573 */
00574 #define SQL_PARAM_TYPE_DEFAULT           SQL_PARAM_INPUT_OUTPUT
00575 #define SQL_SETPARAM_VALUE_MAX           (-1L)
00576 
00577 /* SQLColAttributes defines */
00578 #define SQL_COLUMN_COUNT                0
00579 #define SQL_COLUMN_NAME                 1
00580 #define SQL_COLUMN_TYPE                 2
00581 #define SQL_COLUMN_LENGTH               3
00582 #define SQL_COLUMN_PRECISION            4
00583 #define SQL_COLUMN_SCALE                5
00584 #define SQL_COLUMN_DISPLAY_SIZE         6
00585 #define SQL_COLUMN_NULLABLE             7
00586 #define SQL_COLUMN_UNSIGNED             8
00587 #define SQL_COLUMN_MONEY                9
00588 #define SQL_COLUMN_UPDATABLE            10
00589 #define SQL_COLUMN_AUTO_INCREMENT       11
00590 #define SQL_COLUMN_CASE_SENSITIVE       12
00591 #define SQL_COLUMN_SEARCHABLE           13
00592 #define SQL_COLUMN_TYPE_NAME            14
00593 #define SQL_COLUMN_TABLE_NAME           15
00594 #define SQL_COLUMN_OWNER_NAME           16
00595 #define SQL_COLUMN_QUALIFIER_NAME       17
00596 #define SQL_COLUMN_LABEL                18
00597 #define SQL_COLATT_OPT_MAX              SQL_COLUMN_LABEL
00598 #if (ODBCVER < 0x0300)
00599 #define SQL_COLUMN_DRIVER_START         1000
00600 #endif  /* ODBCVER < 0x0300 */
00601 
00602 #define SQL_COLATT_OPT_MIN              SQL_COLUMN_COUNT
00603 
00604 /* SQLColAttributes subdefines for SQL_COLUMN_UPDATABLE */
00605 #define SQL_ATTR_READONLY               0
00606 #define SQL_ATTR_WRITE                  1
00607 #define SQL_ATTR_READWRITE_UNKNOWN      2
00608 
00609 /* SQLColAttributes subdefines for SQL_COLUMN_SEARCHABLE */
00610 /* These are also used by SQLGetInfo                     */
00611 #define SQL_UNSEARCHABLE                0
00612 #define SQL_LIKE_ONLY                   1
00613 #define SQL_ALL_EXCEPT_LIKE             2
00614 #define SQL_SEARCHABLE                  3
00615 #define SQL_PRED_SEARCHABLE                             SQL_SEARCHABLE
00616 
00617 
00618 /* Special return values for SQLGetData */
00619 #define SQL_NO_TOTAL                    (-4)
00620 
00621 /********************************************/
00622 /* SQLGetFunctions: additional values for   */
00623 /* fFunction to represent functions that    */
00624 /* are not in the X/Open spec.                          */
00625 /********************************************/
00626 
00627 #if (ODBCVER >= 0x0300)
00628 #define SQL_API_SQLALLOCHANDLESTD       73
00629 #define SQL_API_SQLBULKOPERATIONS       24
00630 #endif /* ODBCVER >= 0x0300 */
00631 #define SQL_API_SQLBINDPARAMETER    72
00632 #define SQL_API_SQLBROWSECONNECT    55
00633 #define SQL_API_SQLCOLATTRIBUTES    6
00634 #define SQL_API_SQLCOLUMNPRIVILEGES 56
00635 #define SQL_API_SQLDESCRIBEPARAM    58
00636 #define SQL_API_SQLDRIVERCONNECT        41
00637 #define SQL_API_SQLDRIVERS          71
00638 #define SQL_API_SQLEXTENDEDFETCH    59
00639 #define SQL_API_SQLFOREIGNKEYS      60
00640 #define SQL_API_SQLMORERESULTS      61
00641 #define SQL_API_SQLNATIVESQL        62
00642 #define SQL_API_SQLNUMPARAMS        63
00643 #define SQL_API_SQLPARAMOPTIONS     64
00644 #define SQL_API_SQLPRIMARYKEYS      65
00645 #define SQL_API_SQLPROCEDURECOLUMNS 66
00646 #define SQL_API_SQLPROCEDURES       67
00647 #define SQL_API_SQLSETPOS           68
00648 #define SQL_API_SQLSETSCROLLOPTIONS 69
00649 #define SQL_API_SQLTABLEPRIVILEGES  70
00650 
00651 /*-------------------------------------------*/
00652 /* SQL_EXT_API_LAST is not useful with ODBC  */
00653 /* version 3.0 because some of the values    */
00654 /* from X/Open are in the 10000 range.       */
00655 /*-------------------------------------------*/
00656 
00657 #if (ODBCVER < 0x0300)
00658 #define SQL_EXT_API_LAST            SQL_API_SQLBINDPARAMETER
00659 #define SQL_NUM_FUNCTIONS           23
00660 #define SQL_EXT_API_START           40
00661 #define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1)
00662 #endif
00663 
00664 /*--------------------------------------------*/
00665 /* SQL_API_ALL_FUNCTIONS returns an array     */
00666 /* of 'booleans' representing whether a       */
00667 /* function is implemented by the driver.     */
00668 /*                                            */
00669 /* CAUTION: Only functions defined in ODBC    */
00670 /* version 2.0 and earlier are returned, the  */
00671 /* new high-range function numbers defined by */
00672 /* X/Open break this scheme.   See the new    */
00673 /* method -- SQL_API_ODBC3_ALL_FUNCTIONS      */
00674 /*--------------------------------------------*/
00675 
00676 #define SQL_API_ALL_FUNCTIONS       0           /* See CAUTION above */
00677 
00678 /*----------------------------------------------*/
00679 /* 2.X drivers export a dummy function with     */
00680 /* ordinal number SQL_API_LOADBYORDINAL to speed*/
00681 /* loading under the windows operating system.  */
00682 /*                                              */
00683 /* CAUTION: Loading by ordinal is not supported */
00684 /* for 3.0 and above drivers.                   */
00685 /*----------------------------------------------*/
00686 
00687 #define SQL_API_LOADBYORDINAL       199         /* See CAUTION above */ 
00688 
00689 /*----------------------------------------------*/
00690 /* SQL_API_ODBC3_ALL_FUNCTIONS                  */
00691 /* This returns a bitmap, which allows us to    */
00692 /* handle the higher-valued function numbers.   */
00693 /* Use  SQL_FUNC_EXISTS(bitmap,function_number) */
00694 /* to determine if the function exists.         */
00695 /*----------------------------------------------*/
00696 
00697 
00698 #if (ODBCVER >= 0x0300)
00699 #define SQL_API_ODBC3_ALL_FUNCTIONS     999
00700 #define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE        250             /* array of 250 words */
00701 
00702 
00703 #define SQL_FUNC_EXISTS(pfExists, uwAPI) ((*(((UWORD*) (pfExists)) + ((uwAPI) >> 4)) & (1 << ((uwAPI) & 0x000F)) ) ? SQL_TRUE : SQL_FALSE )
00704 
00705 #endif  /* ODBCVER >= 0x0300 */
00706 
00707 
00708 /************************************************/
00709 /* Extended definitions for SQLGetInfo                  */
00710 /************************************************/
00711 
00712 /*---------------------------------*/
00713 /* Values in ODBC 2.0 that are not */
00714 /* in the X/Open spec              */
00715 /*---------------------------------*/
00716 
00717 #define SQL_INFO_FIRST                       0          
00718 #define SQL_ACTIVE_CONNECTIONS               0  /* MAX_DRIVER_CONNECTIONS */
00719 #define SQL_ACTIVE_STATEMENTS                1  /* MAX_CONCURRENT_ACTIVITIES */
00720 #define SQL_DRIVER_HDBC                      3
00721 #define SQL_DRIVER_HENV                      4
00722 #define SQL_DRIVER_HSTMT                     5
00723 #define SQL_DRIVER_NAME                      6
00724 #define SQL_DRIVER_VER                       7
00725 #define SQL_ODBC_API_CONFORMANCE             9
00726 #define SQL_ODBC_VER                        10
00727 #define SQL_ROW_UPDATES                     11
00728 #define SQL_ODBC_SAG_CLI_CONFORMANCE        12
00729 #define SQL_ODBC_SQL_CONFORMANCE            15
00730 #define SQL_PROCEDURES                      21
00731 #define SQL_CONCAT_NULL_BEHAVIOR            22
00732 #define SQL_CURSOR_ROLLBACK_BEHAVIOR        24
00733 #define SQL_EXPRESSIONS_IN_ORDERBY          27
00734 #define SQL_MAX_OWNER_NAME_LEN              32  /* MAX_SCHEMA_NAME_LEN */
00735 #define SQL_MAX_PROCEDURE_NAME_LEN          33
00736 #define SQL_MAX_QUALIFIER_NAME_LEN          34  /* MAX_CATALOG_NAME_LEN */
00737 #define SQL_MULT_RESULT_SETS                36
00738 #define SQL_MULTIPLE_ACTIVE_TXN             37
00739 #define SQL_OUTER_JOINS                     38
00740 #define SQL_OWNER_TERM                      39
00741 #define SQL_PROCEDURE_TERM                  40
00742 #define SQL_QUALIFIER_NAME_SEPARATOR        41
00743 #define SQL_QUALIFIER_TERM                  42
00744 #define SQL_SCROLL_OPTIONS                  44
00745 #define SQL_TABLE_TERM                      45
00746 #define SQL_CONVERT_FUNCTIONS               48
00747 #define SQL_NUMERIC_FUNCTIONS               49
00748 #define SQL_STRING_FUNCTIONS                50
00749 #define SQL_SYSTEM_FUNCTIONS                51
00750 #define SQL_TIMEDATE_FUNCTIONS              52
00751 #define SQL_CONVERT_BIGINT                  53
00752 #define SQL_CONVERT_BINARY                  54
00753 #define SQL_CONVERT_BIT                     55
00754 #define SQL_CONVERT_CHAR                    56
00755 #define SQL_CONVERT_DATE                    57
00756 #define SQL_CONVERT_DECIMAL                 58
00757 #define SQL_CONVERT_DOUBLE                  59
00758 #define SQL_CONVERT_FLOAT                   60
00759 #define SQL_CONVERT_INTEGER                 61
00760 #define SQL_CONVERT_LONGVARCHAR             62
00761 #define SQL_CONVERT_NUMERIC                 63
00762 #define SQL_CONVERT_REAL                    64
00763 #define SQL_CONVERT_SMALLINT                65
00764 #define SQL_CONVERT_TIME                    66
00765 #define SQL_CONVERT_TIMESTAMP               67
00766 #define SQL_CONVERT_TINYINT                 68
00767 #define SQL_CONVERT_VARBINARY               69
00768 #define SQL_CONVERT_VARCHAR                 70
00769 #define SQL_CONVERT_LONGVARBINARY           71
00770 #define SQL_ODBC_SQL_OPT_IEF                73          /* SQL_INTEGRITY */
00771 #define SQL_CORRELATION_NAME                74
00772 #define SQL_NON_NULLABLE_COLUMNS            75
00773 #define SQL_DRIVER_HLIB                     76
00774 #define SQL_DRIVER_ODBC_VER                 77
00775 #define SQL_LOCK_TYPES                      78
00776 #define SQL_POS_OPERATIONS                  79
00777 #define SQL_POSITIONED_STATEMENTS           80
00778 #define SQL_BOOKMARK_PERSISTENCE            82
00779 #define SQL_STATIC_SENSITIVITY              83
00780 #define SQL_FILE_USAGE                      84
00781 #define SQL_COLUMN_ALIAS                    87
00782 #define SQL_GROUP_BY                        88
00783 #define SQL_KEYWORDS                        89
00784 #define SQL_OWNER_USAGE                     91
00785 #define SQL_QUALIFIER_USAGE                 92
00786 #define SQL_QUOTED_IDENTIFIER_CASE          93
00787 #define SQL_SUBQUERIES                      95
00788 #define SQL_UNION                           96
00789 #define SQL_MAX_ROW_SIZE_INCLUDES_LONG      103
00790 #define SQL_MAX_CHAR_LITERAL_LEN            108
00791 #define SQL_TIMEDATE_ADD_INTERVALS          109
00792 #define SQL_TIMEDATE_DIFF_INTERVALS         110
00793 #define SQL_NEED_LONG_DATA_LEN              111
00794 #define SQL_MAX_BINARY_LITERAL_LEN          112
00795 #define SQL_LIKE_ESCAPE_CLAUSE              113
00796 #define SQL_QUALIFIER_LOCATION              114
00797 
00798 #if (ODBCVER >= 0x0201 && ODBCVER < 0x0300)
00799 #ifndef SQL_OJ_CAPABILITIES
00800 #define SQL_OJ_CAPABILITIES         65003  /* Temp value until ODBC 3.0 */
00801 #endif
00802 #endif  /* ODBCVER >= 0x0201 && ODBCVER < 0x0300 */
00803 
00804 /*----------------------------------------------*/
00805 /* SQL_INFO_LAST and SQL_INFO_DRIVER_START are  */
00806 /* not useful anymore, because  X/Open has      */
00807 /* values in the 10000 range.   You                     */
00808 /* must contact X/Open directly to get a range  */
00809 /* of numbers for driver-specific values.           */
00810 /*----------------------------------------------*/
00811 
00812 #if (ODBCVER < 0x0300)
00813 #define SQL_INFO_LAST                                           SQL_QUALIFIER_LOCATION
00814 #define SQL_INFO_DRIVER_START                           1000
00815 #endif /* ODBCVER < 0x0300 */
00816 
00817 /*-----------------------------------------------*/
00818 /* ODBC 3.0 SQLGetInfo values that are not part  */
00819 /* of the X/Open standard at this time.   X/Open */
00820 /* standard values are in sql.h.                                 */
00821 /*-----------------------------------------------*/
00822 
00823 #if (ODBCVER >= 0x0300)
00824 #define SQL_ACTIVE_ENVIRONMENTS                                 116
00825 #define SQL_ALTER_DOMAIN                                                117
00826 
00827 #define SQL_SQL_CONFORMANCE                                             118
00828 #define SQL_DATETIME_LITERALS                                   119
00829 
00830 #define SQL_ASYNC_MODE                                                  10021   /* new X/Open spec */
00831 #define SQL_BATCH_ROW_COUNT                                             120
00832 #define SQL_BATCH_SUPPORT                                               121
00833 #define SQL_CATALOG_LOCATION                                    SQL_QUALIFIER_LOCATION
00834 #define SQL_CATALOG_NAME_SEPARATOR                              SQL_QUALIFIER_NAME_SEPARATOR
00835 #define SQL_CATALOG_TERM                                                SQL_QUALIFIER_TERM
00836 #define SQL_CATALOG_USAGE                                               SQL_QUALIFIER_USAGE
00837 #define SQL_CONVERT_WCHAR                                               122
00838 #define SQL_CONVERT_INTERVAL_DAY_TIME                   123
00839 #define SQL_CONVERT_INTERVAL_YEAR_MONTH                 124
00840 #define SQL_CONVERT_WLONGVARCHAR                                125
00841 #define SQL_CONVERT_WVARCHAR                                    126
00842 #define SQL_CREATE_ASSERTION                                    127
00843 #define SQL_CREATE_CHARACTER_SET                                128
00844 #define SQL_CREATE_COLLATION                                    129
00845 #define SQL_CREATE_DOMAIN                                               130
00846 #define SQL_CREATE_SCHEMA                                               131
00847 #define SQL_CREATE_TABLE                                                132
00848 #define SQL_CREATE_TRANSLATION                                  133
00849 #define SQL_CREATE_VIEW                                                 134
00850 #define SQL_DRIVER_HDESC                                                135
00851 #define SQL_DROP_ASSERTION                                              136
00852 #define SQL_DROP_CHARACTER_SET                                  137
00853 #define SQL_DROP_COLLATION                                              138
00854 #define SQL_DROP_DOMAIN                                                 139
00855 #define SQL_DROP_SCHEMA                                                 140
00856 #define SQL_DROP_TABLE                                                  141
00857 #define SQL_DROP_TRANSLATION                                    142
00858 #define SQL_DROP_VIEW                                                   143
00859 #define SQL_DYNAMIC_CURSOR_ATTRIBUTES1                  144
00860 #define SQL_DYNAMIC_CURSOR_ATTRIBUTES2                  145
00861 #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1             146             
00862 #define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2             147
00863 #define SQL_INDEX_KEYWORDS                                              148
00864 #define SQL_INFO_SCHEMA_VIEWS                                   149
00865 #define SQL_KEYSET_CURSOR_ATTRIBUTES1                   150
00866 #define SQL_KEYSET_CURSOR_ATTRIBUTES2                   151
00867 #define SQL_MAX_ASYNC_CONCURRENT_STATEMENTS             10022   /* new X/Open spec */
00868 #define SQL_ODBC_INTERFACE_CONFORMANCE                  152
00869 #define SQL_PARAM_ARRAY_ROW_COUNTS                      153
00870 #define SQL_PARAM_ARRAY_SELECTS                         154
00871 #define SQL_SCHEMA_TERM                                                 SQL_OWNER_TERM
00872 #define SQL_SCHEMA_USAGE                                                SQL_OWNER_USAGE
00873 #define SQL_SQL92_DATETIME_FUNCTIONS                    155
00874 #define SQL_SQL92_FOREIGN_KEY_DELETE_RULE               156             
00875 #define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE               157             
00876 #define SQL_SQL92_GRANT                                                 158
00877 #define SQL_SQL92_NUMERIC_VALUE_FUNCTIONS               159
00878 #define SQL_SQL92_PREDICATES                                    160
00879 #define SQL_SQL92_RELATIONAL_JOIN_OPERATORS             161
00880 #define SQL_SQL92_REVOKE                                                162
00881 #define SQL_SQL92_ROW_VALUE_CONSTRUCTOR                 163
00882 #define SQL_SQL92_STRING_FUNCTIONS                              164
00883 #define SQL_SQL92_VALUE_EXPRESSIONS                             165
00884 #define SQL_STANDARD_CLI_CONFORMANCE                    166
00885 #define SQL_STATIC_CURSOR_ATTRIBUTES1                   167     
00886 #define SQL_STATIC_CURSOR_ATTRIBUTES2                   168
00887 
00888 #define SQL_AGGREGATE_FUNCTIONS                                 169
00889 #define SQL_DDL_INDEX                                                   170
00890 #define SQL_DM_VER                                                              171
00891 #define SQL_INSERT_STATEMENT                                    172
00892 #define SQL_UNION_STATEMENT                                             SQL_UNION
00893 #endif  /* ODBCVER >= 0x0300 */
00894 
00895 #define SQL_DTC_TRANSITION_COST                                 1750
00896 
00897 /* SQL_ALTER_TABLE bitmasks */
00898 #if (ODBCVER >= 0x0300)
00899 /* the following 5 bitmasks are defined in sql.h
00900 *#define SQL_AT_ADD_COLUMN                      0x00000001L
00901 *#define SQL_AT_DROP_COLUMN                     0x00000002L
00902 *#define SQL_AT_ADD_CONSTRAINT                  0x00000008L
00903 */
00904 #define SQL_AT_ADD_COLUMN_SINGLE                                0x00000020L     
00905 #define SQL_AT_ADD_COLUMN_DEFAULT                               0x00000040L
00906 #define SQL_AT_ADD_COLUMN_COLLATION                             0x00000080L
00907 #define SQL_AT_SET_COLUMN_DEFAULT                               0x00000100L
00908 #define SQL_AT_DROP_COLUMN_DEFAULT                              0x00000200L
00909 #define SQL_AT_DROP_COLUMN_CASCADE                              0x00000400L
00910 #define SQL_AT_DROP_COLUMN_RESTRICT                             0x00000800L
00911 #define SQL_AT_ADD_TABLE_CONSTRAINT                             0x00001000L             
00912 #define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE    0x00002000L             
00913 #define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT   0x00004000L             
00914 #define SQL_AT_CONSTRAINT_NAME_DEFINITION               0x00008000L
00915 #define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED    0x00010000L
00916 #define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE   0x00020000L
00917 #define SQL_AT_CONSTRAINT_DEFERRABLE                    0x00040000L
00918 #define SQL_AT_CONSTRAINT_NON_DEFERRABLE                0x00080000L
00919 #endif  /* ODBCVER >= 0x0300 */
00920 
00921 /* SQL_CONVERT_*  return value bitmasks */
00922 
00923 #define SQL_CVT_CHAR                        0x00000001L
00924 #define SQL_CVT_NUMERIC                     0x00000002L
00925 #define SQL_CVT_DECIMAL                     0x00000004L
00926 #define SQL_CVT_INTEGER                     0x00000008L
00927 #define SQL_CVT_SMALLINT                    0x00000010L
00928 #define SQL_CVT_FLOAT                       0x00000020L
00929 #define SQL_CVT_REAL                        0x00000040L
00930 #define SQL_CVT_DOUBLE                      0x00000080L
00931 #define SQL_CVT_VARCHAR                     0x00000100L
00932 #define SQL_CVT_LONGVARCHAR                 0x00000200L
00933 #define SQL_CVT_BINARY                      0x00000400L
00934 #define SQL_CVT_VARBINARY                   0x00000800L
00935 #define SQL_CVT_BIT                         0x00001000L
00936 #define SQL_CVT_TINYINT                     0x00002000L
00937 #define SQL_CVT_BIGINT                      0x00004000L
00938 #define SQL_CVT_DATE                        0x00008000L
00939 #define SQL_CVT_TIME                        0x00010000L
00940 #define SQL_CVT_TIMESTAMP                   0x00020000L
00941 #define SQL_CVT_LONGVARBINARY               0x00040000L
00942 #if (ODBCVER >= 0x0300)
00943 #define SQL_CVT_INTERVAL_YEAR_MONTH             0x00080000L
00944 #define SQL_CVT_INTERVAL_DAY_TIME               0x00100000L
00945 #define SQL_CVT_WCHAR                                           0x00200000L
00946 #define SQL_CVT_WLONGVARCHAR                            0x00400000L
00947 #define SQL_CVT_WVARCHAR                                        0x00800000L
00948 
00949 #endif  /* ODBCVER >= 0x0300 */
00950 
00951 
00952 /* SQL_CONVERT_FUNCTIONS functions */
00953 #define SQL_FN_CVT_CONVERT                  0x00000001L
00954 #if (ODBCVER >= 0x0300)
00955 #define SQL_FN_CVT_CAST                                         0x00000002L
00956 #endif  /* ODBCVER >= 0x0300 */
00957 
00958 
00959 /* SQL_STRING_FUNCTIONS functions */
00960 
00961 #define SQL_FN_STR_CONCAT                   0x00000001L
00962 #define SQL_FN_STR_INSERT                   0x00000002L
00963 #define SQL_FN_STR_LEFT                     0x00000004L
00964 #define SQL_FN_STR_LTRIM                    0x00000008L
00965 #define SQL_FN_STR_LENGTH                   0x00000010L
00966 #define SQL_FN_STR_LOCATE                   0x00000020L
00967 #define SQL_FN_STR_LCASE                    0x00000040L
00968 #define SQL_FN_STR_REPEAT                   0x00000080L
00969 #define SQL_FN_STR_REPLACE                  0x00000100L
00970 #define SQL_FN_STR_RIGHT                    0x00000200L
00971 #define SQL_FN_STR_RTRIM                    0x00000400L
00972 #define SQL_FN_STR_SUBSTRING                0x00000800L
00973 #define SQL_FN_STR_UCASE                    0x00001000L
00974 #define SQL_FN_STR_ASCII                    0x00002000L
00975 #define SQL_FN_STR_CHAR                     0x00004000L
00976 #define SQL_FN_STR_DIFFERENCE               0x00008000L
00977 #define SQL_FN_STR_LOCATE_2                 0x00010000L
00978 #define SQL_FN_STR_SOUNDEX                  0x00020000L
00979 #define SQL_FN_STR_SPACE                    0x00040000L
00980 #if (ODBCVER >= 0x0300)
00981 #define SQL_FN_STR_BIT_LENGTH                           0x00080000L
00982 #define SQL_FN_STR_CHAR_LENGTH                          0x00100000L
00983 #define SQL_FN_STR_CHARACTER_LENGTH                     0x00200000L
00984 #define SQL_FN_STR_OCTET_LENGTH                         0x00400000L
00985 #define SQL_FN_STR_POSITION                                     0x00800000L
00986 #endif  /* ODBCVER >= 0x0300 */
00987 
00988 /* SQL_SQL92_STRING_FUNCTIONS */
00989 #if (ODBCVER >= 0x0300)
00990 #define SQL_SSF_CONVERT                                         0x00000001L     
00991 #define SQL_SSF_LOWER                                           0x00000002L
00992 #define SQL_SSF_UPPER                                           0x00000004L
00993 #define SQL_SSF_SUBSTRING                                       0x00000008L
00994 #define SQL_SSF_TRANSLATE                                       0x00000010L
00995 #define SQL_SSF_TRIM_BOTH                                       0x00000020L
00996 #define SQL_SSF_TRIM_LEADING                            0x00000040L
00997 #define SQL_SSF_TRIM_TRAILING                           0x00000080L
00998 #endif /* ODBCVER >= 0x0300 */
00999 
01000 /* SQL_NUMERIC_FUNCTIONS functions */
01001 
01002 #define SQL_FN_NUM_ABS                      0x00000001L
01003 #define SQL_FN_NUM_ACOS                     0x00000002L
01004 #define SQL_FN_NUM_ASIN                     0x00000004L
01005 #define SQL_FN_NUM_ATAN                     0x00000008L
01006 #define SQL_FN_NUM_ATAN2                    0x00000010L
01007 #define SQL_FN_NUM_CEILING                  0x00000020L
01008 #define SQL_FN_NUM_COS                      0x00000040L
01009 #define SQL_FN_NUM_COT                      0x00000080L
01010 #define SQL_FN_NUM_EXP                      0x00000100L
01011 #define SQL_FN_NUM_FLOOR                    0x00000200L
01012 #define SQL_FN_NUM_LOG                      0x00000400L
01013 #define SQL_FN_NUM_MOD                      0x00000800L
01014 #define SQL_FN_NUM_SIGN                     0x00001000L
01015 #define SQL_FN_NUM_SIN                      0x00002000L
01016 #define SQL_FN_NUM_SQRT                     0x00004000L
01017 #define SQL_FN_NUM_TAN                      0x00008000L
01018 #define SQL_FN_NUM_PI                       0x00010000L
01019 #define SQL_FN_NUM_RAND                     0x00020000L
01020 #define SQL_FN_NUM_DEGREES                  0x00040000L
01021 #define SQL_FN_NUM_LOG10                    0x00080000L
01022 #define SQL_FN_NUM_POWER                    0x00100000L
01023 #define SQL_FN_NUM_RADIANS                  0x00200000L
01024 #define SQL_FN_NUM_ROUND                    0x00400000L
01025 #define SQL_FN_NUM_TRUNCATE                 0x00800000L
01026 
01027 /* SQL_SQL92_NUMERIC_VALUE_FUNCTIONS */
01028 #if (ODBCVER >= 0x0300)
01029 #define SQL_SNVF_BIT_LENGTH                                     0x00000001L
01030 #define SQL_SNVF_CHAR_LENGTH                            0x00000002L
01031 #define SQL_SNVF_CHARACTER_LENGTH                       0x00000004L
01032 #define SQL_SNVF_EXTRACT                                        0x00000008L
01033 #define SQL_SNVF_OCTET_LENGTH                           0x00000010L
01034 #define SQL_SNVF_POSITION                                       0x00000020L
01035 #endif  /* ODBCVER >= 0x0300 */
01036 
01037 /* SQL_TIMEDATE_FUNCTIONS functions */
01038 
01039 #define SQL_FN_TD_NOW                       0x00000001L
01040 #define SQL_FN_TD_CURDATE                   0x00000002L
01041 #define SQL_FN_TD_DAYOFMONTH                0x00000004L
01042 #define SQL_FN_TD_DAYOFWEEK                 0x00000008L
01043 #define SQL_FN_TD_DAYOFYEAR                 0x00000010L
01044 #define SQL_FN_TD_MONTH                     0x00000020L
01045 #define SQL_FN_TD_QUARTER                   0x00000040L
01046 #define SQL_FN_TD_WEEK                      0x00000080L
01047 #define SQL_FN_TD_YEAR                      0x00000100L
01048 #define SQL_FN_TD_CURTIME                   0x00000200L
01049 #define SQL_FN_TD_HOUR                      0x00000400L
01050 #define SQL_FN_TD_MINUTE                    0x00000800L
01051 #define SQL_FN_TD_SECOND                    0x00001000L
01052 #define SQL_FN_TD_TIMESTAMPADD              0x00002000L
01053 #define SQL_FN_TD_TIMESTAMPDIFF             0x00004000L
01054 #define SQL_FN_TD_DAYNAME                   0x00008000L
01055 #define SQL_FN_TD_MONTHNAME                 0x00010000L
01056 #if (ODBCVER >= 0x0300)
01057 #define SQL_FN_TD_CURRENT_DATE                          0x00020000L
01058 #define SQL_FN_TD_CURRENT_TIME                          0x00040000L
01059 #define SQL_FN_TD_CURRENT_TIMESTAMP                     0x00080000L
01060 #define SQL_FN_TD_EXTRACT                                       0x00100000L
01061 #endif  /* ODBCVER >= 0x0300 */
01062 
01063 /* SQL_SQL92_DATETIME_FUNCTIONS */
01064 #if (ODBCVER >= 0x0300)
01065 #define SQL_SDF_CURRENT_DATE                            0x00000001L
01066 #define SQL_SDF_CURRENT_TIME                            0x00000002L
01067 #define SQL_SDF_CURRENT_TIMESTAMP                       0x00000004L
01068 #endif /* ODBCVER >= 0x0300 */
01069 
01070 /* SQL_SYSTEM_FUNCTIONS functions */
01071 
01072 #define SQL_FN_SYS_USERNAME                 0x00000001L
01073 #define SQL_FN_SYS_DBNAME                   0x00000002L
01074 #define SQL_FN_SYS_IFNULL                   0x00000004L
01075 
01076 /* SQL_TIMEDATE_ADD_INTERVALS and SQL_TIMEDATE_DIFF_INTERVALS functions */
01077 
01078 #define SQL_FN_TSI_FRAC_SECOND              0x00000001L
01079 #define SQL_FN_TSI_SECOND                   0x00000002L
01080 #define SQL_FN_TSI_MINUTE                   0x00000004L
01081 #define SQL_FN_TSI_HOUR                     0x00000008L
01082 #define SQL_FN_TSI_DAY                      0x00000010L
01083 #define SQL_FN_TSI_WEEK                     0x00000020L
01084 #define SQL_FN_TSI_MONTH                    0x00000040L
01085 #define SQL_FN_TSI_QUARTER                  0x00000080L
01086 #define SQL_FN_TSI_YEAR                     0x00000100L
01087 
01088 /* bitmasks for SQL_DYNAMIC_CURSOR_ATTRIBUTES1,
01089  * SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1,
01090  * SQL_KEYSET_CURSOR_ATTRIBUTES1, and SQL_STATIC_CURSOR_ATTRIBUTES1
01091  */
01092 #if (ODBCVER >= 0x0300)
01093 /* supported SQLFetchScroll FetchOrientation's */
01094 #define SQL_CA1_NEXT                                            0x00000001L
01095 #define SQL_CA1_ABSOLUTE                                        0x00000002L
01096 #define SQL_CA1_RELATIVE                                        0x00000004L
01097 #define SQL_CA1_BOOKMARK                                        0x00000008L
01098 
01099 /* supported SQLSetPos LockType's */
01100 #define SQL_CA1_LOCK_NO_CHANGE                          0x00000040L
01101 #define SQL_CA1_LOCK_EXCLUSIVE                          0x00000080L
01102 #define SQL_CA1_LOCK_UNLOCK                                     0x00000100L
01103 
01104 /* supported SQLSetPos Operations */
01105 #define SQL_CA1_POS_POSITION                            0x00000200L
01106 #define SQL_CA1_POS_UPDATE                                      0x00000400L
01107 #define SQL_CA1_POS_DELETE                                      0x00000800L
01108 #define SQL_CA1_POS_REFRESH                                     0x00001000L
01109 
01110 /* positioned updates and deletes */
01111 #define SQL_CA1_POSITIONED_UPDATE                       0x00002000L
01112 #define SQL_CA1_POSITIONED_DELETE                       0x00004000L
01113 #define SQL_CA1_SELECT_FOR_UPDATE                       0x00008000L
01114 
01115 /* supported SQLBulkOperations operations */
01116 #define SQL_CA1_BULK_ADD                                        0x00010000L
01117 #define SQL_CA1_BULK_UPDATE_BY_BOOKMARK         0x00020000L
01118 #define SQL_CA1_BULK_DELETE_BY_BOOKMARK         0x00040000L
01119 #define SQL_CA1_BULK_FETCH_BY_BOOKMARK          0x00080000L
01120 #endif  /* ODBCVER >= 0x0300 */
01121 
01122 /* bitmasks for SQL_DYNAMIC_CURSOR_ATTRIBUTES2,
01123  * SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2,
01124  * SQL_KEYSET_CURSOR_ATTRIBUTES2, and SQL_STATIC_CURSOR_ATTRIBUTES2
01125  */
01126 #if (ODBCVER >= 0x0300)
01127 /* supported values for SQL_ATTR_SCROLL_CONCURRENCY */
01128 #define SQL_CA2_READ_ONLY_CONCURRENCY           0x00000001L
01129 #define SQL_CA2_LOCK_CONCURRENCY                        0x00000002L
01130 #define SQL_CA2_OPT_ROWVER_CONCURRENCY          0x00000004L
01131 #define SQL_CA2_OPT_VALUES_CONCURRENCY          0x00000008L
01132 
01133 /* sensitivity of the cursor to its own inserts, deletes, and updates */
01134 #define SQL_CA2_SENSITIVITY_ADDITIONS           0x00000010L
01135 #define SQL_CA2_SENSITIVITY_DELETIONS           0x00000020L
01136 #define SQL_CA2_SENSITIVITY_UPDATES                     0x00000040L
01137 
01138 /* semantics of SQL_ATTR_MAX_ROWS */
01139 #define SQL_CA2_MAX_ROWS_SELECT                         0x00000080L
01140 #define SQL_CA2_MAX_ROWS_INSERT                         0x00000100L
01141 #define SQL_CA2_MAX_ROWS_DELETE                         0x00000200L
01142 #define SQL_CA2_MAX_ROWS_UPDATE                         0x00000400L
01143 #define SQL_CA2_MAX_ROWS_CATALOG                        0x00000800L
01144 #define SQL_CA2_MAX_ROWS_AFFECTS_ALL            (SQL_CA2_MAX_ROWS_SELECT | SQL_CA2_MAX_ROWS_INSERT | SQL_CA2_MAX_ROWS_DELETE | SQL_CA2_MAX_ROWS_UPDATE | SQL_CA2_MAX_ROWS_CATALOG)
01145 
01146 /* semantics of SQL_DIAG_CURSOR_ROW_COUNT */
01147 #define SQL_CA2_CRC_EXACT                                       0x00001000L
01148 #define SQL_CA2_CRC_APPROXIMATE                         0x00002000L
01149 
01150 /* the kinds of positioned statements that can be simulated */
01151 #define SQL_CA2_SIMULATE_NON_UNIQUE                     0x00004000L
01152 #define SQL_CA2_SIMULATE_TRY_UNIQUE                     0x00008000L
01153 #define SQL_CA2_SIMULATE_UNIQUE                         0x00010000L
01154 #endif  /* ODBCVER >= 0x0300 */
01155 
01156 /* SQL_ODBC_API_CONFORMANCE values */
01157 
01158 #define SQL_OAC_NONE                        0x0000
01159 #define SQL_OAC_LEVEL1                      0x0001
01160 #define SQL_OAC_LEVEL2                      0x0002
01161 
01162 /* SQL_ODBC_SAG_CLI_CONFORMANCE values */
01163 
01164 #define SQL_OSCC_NOT_COMPLIANT              0x0000
01165 #define SQL_OSCC_COMPLIANT                  0x0001
01166 
01167 /* SQL_ODBC_SQL_CONFORMANCE values */
01168 
01169 #define SQL_OSC_MINIMUM                     0x0000
01170 #define SQL_OSC_CORE                        0x0001
01171 #define SQL_OSC_EXTENDED                    0x0002
01172 
01173 
01174 /* SQL_CONCAT_NULL_BEHAVIOR values */
01175 
01176 #define SQL_CB_NULL                         0x0000
01177 #define SQL_CB_NON_NULL                     0x0001
01178 
01179 /* SQL_SCROLL_OPTIONS masks */
01180 
01181 #define SQL_SO_FORWARD_ONLY                 0x00000001L
01182 #define SQL_SO_KEYSET_DRIVEN                0x00000002L
01183 #define SQL_SO_DYNAMIC                      0x00000004L
01184 #define SQL_SO_MIXED                        0x00000008L
01185 #define SQL_SO_STATIC                       0x00000010L
01186 
01187 /* SQL_FETCH_DIRECTION masks */
01188 
01189 /* SQL_FETCH_RESUME is no longer supported
01190 #define SQL_FD_FETCH_RESUME                 0x00000040L
01191 */
01192 #define SQL_FD_FETCH_BOOKMARK               0x00000080L
01193 
01194 /* SQL_TXN_ISOLATION_OPTION masks */
01195 /* SQL_TXN_VERSIONING is no longer supported
01196 #define SQL_TXN_VERSIONING                  0x00000010L
01197 */
01198 
01199 /* SQL_CORRELATION_NAME values */
01200 
01201 #define SQL_CN_NONE                         0x0000
01202 #define SQL_CN_DIFFERENT                    0x0001
01203 #define SQL_CN_ANY                          0x0002
01204 
01205 /* SQL_NON_NULLABLE_COLUMNS values */
01206 
01207 #define SQL_NNC_NULL                        0x0000
01208 #define SQL_NNC_NON_NULL                    0x0001
01209 
01210 /* SQL_NULL_COLLATION values */
01211 
01212 #define SQL_NC_START                        0x0002
01213 #define SQL_NC_END                          0x0004
01214 
01215 /* SQL_FILE_USAGE values */
01216 
01217 #define SQL_FILE_NOT_SUPPORTED              0x0000
01218 #define SQL_FILE_TABLE                      0x0001
01219 #define SQL_FILE_QUALIFIER                  0x0002
01220 #define SQL_FILE_CATALOG                                        SQL_FILE_QUALIFIER      /* ODBC 3.0 */
01221 
01222 
01223 /* SQL_GETDATA_EXTENSIONS values */
01224 
01225 #define SQL_GD_BLOCK                        0x00000004L
01226 #define SQL_GD_BOUND                        0x00000008L
01227 
01228 /* SQL_POSITIONED_STATEMENTS masks */
01229 
01230 #define SQL_PS_POSITIONED_DELETE            0x00000001L
01231 #define SQL_PS_POSITIONED_UPDATE            0x00000002L
01232 #define SQL_PS_SELECT_FOR_UPDATE            0x00000004L
01233 
01234 /* SQL_GROUP_BY values */
01235 
01236 #define SQL_GB_NOT_SUPPORTED                0x0000
01237 #define SQL_GB_GROUP_BY_EQUALS_SELECT       0x0001
01238 #define SQL_GB_GROUP_BY_CONTAINS_SELECT     0x0002
01239 #define SQL_GB_NO_RELATION                  0x0003
01240 #if (ODBCVER >= 0x0300)
01241 #define SQL_GB_COLLATE                                          0x0004
01242 
01243 #endif  /* ODBCVER >= 0x0300 */
01244 
01245 /* SQL_OWNER_USAGE masks */
01246 
01247 #define SQL_OU_DML_STATEMENTS               0x00000001L
01248 #define SQL_OU_PROCEDURE_INVOCATION         0x00000002L
01249 #define SQL_OU_TABLE_DEFINITION             0x00000004L
01250 #define SQL_OU_INDEX_DEFINITION             0x00000008L
01251 #define SQL_OU_PRIVILEGE_DEFINITION         0x00000010L
01252 
01253 /* SQL_SCHEMA_USAGE masks */
01254 #if (ODBCVER >= 0x0300)
01255 #define SQL_SU_DML_STATEMENTS                   SQL_OU_DML_STATEMENTS
01256 #define SQL_SU_PROCEDURE_INVOCATION             SQL_OU_PROCEDURE_INVOCATION
01257 #define SQL_SU_TABLE_DEFINITION                 SQL_OU_TABLE_DEFINITION
01258 #define SQL_SU_INDEX_DEFINITION                 SQL_OU_INDEX_DEFINITION
01259 #define SQL_SU_PRIVILEGE_DEFINITION             SQL_OU_PRIVILEGE_DEFINITION
01260 #endif  /* ODBCVER >= 0x0300 */
01261 
01262 /* SQL_QUALIFIER_USAGE masks */
01263 
01264 #define SQL_QU_DML_STATEMENTS               0x00000001L
01265 #define SQL_QU_PROCEDURE_INVOCATION         0x00000002L
01266 #define SQL_QU_TABLE_DEFINITION             0x00000004L
01267 #define SQL_QU_INDEX_DEFINITION             0x00000008L
01268 #define SQL_QU_PRIVILEGE_DEFINITION         0x00000010L
01269 
01270 #if (ODBCVER >= 0x0300)
01271 /* SQL_CATALOG_USAGE masks */
01272 #define SQL_CU_DML_STATEMENTS                   SQL_QU_DML_STATEMENTS
01273 #define SQL_CU_PROCEDURE_INVOCATION             SQL_QU_PROCEDURE_INVOCATION
01274 #define SQL_CU_TABLE_DEFINITION                 SQL_QU_TABLE_DEFINITION
01275 #define SQL_CU_INDEX_DEFINITION                 SQL_QU_INDEX_DEFINITION
01276 #define SQL_CU_PRIVILEGE_DEFINITION             SQL_QU_PRIVILEGE_DEFINITION
01277 #endif  /* ODBCVER >= 0x0300 */
01278 
01279 /* SQL_SUBQUERIES masks */
01280 
01281 #define SQL_SQ_COMPARISON                   0x00000001L
01282 #define SQL_SQ_EXISTS                       0x00000002L
01283 #define SQL_SQ_IN                           0x00000004L
01284 #define SQL_SQ_QUANTIFIED                   0x00000008L
01285 #define SQL_SQ_CORRELATED_SUBQUERIES        0x00000010L
01286 
01287 /* SQL_UNION masks */
01288 
01289 #define SQL_U_UNION                         0x00000001L
01290 #define SQL_U_UNION_ALL                     0x00000002L
01291 
01292 /* SQL_BOOKMARK_PERSISTENCE values */
01293 
01294 #define SQL_BP_CLOSE                        0x00000001L
01295 #define SQL_BP_DELETE                       0x00000002L
01296 #define SQL_BP_DROP                         0x00000004L
01297 #define SQL_BP_TRANSACTION                  0x00000008L
01298 #define SQL_BP_UPDATE                       0x00000010L
01299 #define SQL_BP_OTHER_HSTMT                  0x00000020L
01300 #define SQL_BP_SCROLL                       0x00000040L
01301 
01302 /* SQL_STATIC_SENSITIVITY values */
01303 
01304 #define SQL_SS_ADDITIONS                    0x00000001L
01305 #define SQL_SS_DELETIONS                    0x00000002L
01306 #define SQL_SS_UPDATES                      0x00000004L
01307 
01308 /* SQL_VIEW values */
01309 #define SQL_CV_CREATE_VIEW                                      0x00000001L
01310 #define SQL_CV_CHECK_OPTION                                     0x00000002L
01311 #define SQL_CV_CASCADED                                         0x00000004L
01312 #define SQL_CV_LOCAL                                            0x00000008L
01313 
01314 /* SQL_LOCK_TYPES masks */
01315 
01316 #define SQL_LCK_NO_CHANGE                   0x00000001L
01317 #define SQL_LCK_EXCLUSIVE                   0x00000002L
01318 #define SQL_LCK_UNLOCK                      0x00000004L
01319 
01320 /* SQL_POS_OPERATIONS masks */
01321 
01322 #define SQL_POS_POSITION                    0x00000001L
01323 #define SQL_POS_REFRESH                     0x00000002L
01324 #define SQL_POS_UPDATE                      0x00000004L
01325 #define SQL_POS_DELETE                      0x00000008L
01326 #define SQL_POS_ADD                         0x00000010L
01327 
01328 /* SQL_QUALIFIER_LOCATION values */
01329 
01330 #define SQL_QL_START                        0x0001
01331 #define SQL_QL_END                          0x0002
01332 
01333 /* Here start return values for ODBC 3.0 SQLGetInfo */
01334 
01335 #if (ODBCVER >= 0x0300)
01336 /* SQL_AGGREGATE_FUNCTIONS bitmasks */
01337 #define SQL_AF_AVG                                              0x00000001L
01338 #define SQL_AF_COUNT                                    0x00000002L
01339 #define SQL_AF_MAX                                              0x00000004L
01340 #define SQL_AF_MIN                                              0x00000008L
01341 #define SQL_AF_SUM                                              0x00000010L
01342 #define SQL_AF_DISTINCT                                 0x00000020L
01343 #define SQL_AF_ALL                                              0x00000040L
01344 
01345 /* SQL_SQL_CONFORMANCE bit masks */
01346 #define SQL_SC_SQL92_ENTRY                              0x00000001L
01347 #define SQL_SC_FIPS127_2_TRANSITIONAL   0x00000002L
01348 #define SQL_SC_SQL92_INTERMEDIATE               0x00000004L
01349 #define SQL_SC_SQL92_FULL                               0x00000008L
01350 
01351 /* SQL_DATETIME_LITERALS masks */
01352 #define SQL_DL_SQL92_DATE                                               0x00000001L
01353 #define SQL_DL_SQL92_TIME                                               0x00000002L
01354 #define SQL_DL_SQL92_TIMESTAMP                                  0x00000004L
01355 #define SQL_DL_SQL92_INTERVAL_YEAR                              0x00000008L
01356 #define SQL_DL_SQL92_INTERVAL_MONTH                             0x00000010L
01357 #define SQL_DL_SQL92_INTERVAL_DAY                               0x00000020L
01358 #define SQL_DL_SQL92_INTERVAL_HOUR                              0x00000040L
01359 #define SQL_DL_SQL92_INTERVAL_MINUTE                    0x00000080L
01360 #define SQL_DL_SQL92_INTERVAL_SECOND                    0x00000100L
01361 #define SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH             0x00000200L
01362 #define SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR               0x00000400L
01363 #define SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE             0x00000800L
01364 #define SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND             0x00001000L
01365 #define SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE    0x00002000L
01366 #define SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND    0x00004000L
01367 #define SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND  0x00008000L
01368 
01369 /* SQL_CATALOG_LOCATION values */
01370 #define SQL_CL_START                                            SQL_QL_START
01371 #define SQL_CL_END                                                      SQL_QL_END
01372 
01373 /* values for SQL_BATCH_ROW_COUNT */
01374 #define SQL_BRC_PROCEDURES                      0x0000001
01375 #define SQL_BRC_EXPLICIT                        0x0000002
01376 #define SQL_BRC_ROLLED_UP                       0x0000004
01377 
01378 /* bitmasks for SQL_BATCH_SUPPORT */
01379 #define SQL_BS_SELECT_EXPLICIT                          0x00000001L
01380 #define SQL_BS_ROW_COUNT_EXPLICIT                       0x00000002L
01381 #define SQL_BS_SELECT_PROC                                      0x00000004L
01382 #define SQL_BS_ROW_COUNT_PROC                           0x00000008L
01383 
01384 /* Values for SQL_PARAM_ARRAY_ROW_COUNTS getinfo */
01385 #define SQL_PARC_BATCH          1
01386 #define SQL_PARC_NO_BATCH       2
01387 
01388 /* values for SQL_PARAM_ARRAY_SELECTS */
01389 #define SQL_PAS_BATCH                           1
01390 #define SQL_PAS_NO_BATCH                        2               
01391 #define SQL_PAS_NO_SELECT                       3
01392 
01393 /* Bitmasks for SQL_INDEX_KEYWORDS */
01394 #define SQL_IK_NONE                                                     0x00000000L
01395 #define SQL_IK_ASC                                                      0x00000001L
01396 #define SQL_IK_DESC                                                     0x00000002L
01397 #define SQL_IK_ALL                                                      (SQL_IK_ASC | SQL_IK_DESC)
01398 
01399 /* Bitmasks for SQL_INFO_SCHEMA_VIEWS */
01400 
01401 #define SQL_ISV_ASSERTIONS                                      0x00000001L
01402 #define SQL_ISV_CHARACTER_SETS                          0x00000002L
01403 #define SQL_ISV_CHECK_CONSTRAINTS                       0x00000004L
01404 #define SQL_ISV_COLLATIONS                                      0x00000008L
01405 #define SQL_ISV_COLUMN_DOMAIN_USAGE                     0x00000010L
01406 #define SQL_ISV_COLUMN_PRIVILEGES                       0x00000020L
01407 #define SQL_ISV_COLUMNS                                         0x00000040L
01408 #define SQL_ISV_CONSTRAINT_COLUMN_USAGE         0x00000080L
01409 #define SQL_ISV_CONSTRAINT_TABLE_USAGE          0x00000100L
01410 #define SQL_ISV_DOMAIN_CONSTRAINTS                      0x00000200L
01411 #define SQL_ISV_DOMAINS                                         0x00000400L
01412 #define SQL_ISV_KEY_COLUMN_USAGE                        0x00000800L
01413 #define SQL_ISV_REFERENTIAL_CONSTRAINTS         0x00001000L
01414 #define SQL_ISV_SCHEMATA                                        0x00002000L
01415 #define SQL_ISV_SQL_LANGUAGES                           0x00004000L
01416 #define SQL_ISV_TABLE_CONSTRAINTS                       0x00008000L
01417 #define SQL_ISV_TABLE_PRIVILEGES                        0x00010000L
01418 #define SQL_ISV_TABLES                                          0x00020000L
01419 #define SQL_ISV_TRANSLATIONS                            0x00040000L
01420 #define SQL_ISV_USAGE_PRIVILEGES                        0x00080000L
01421 #define SQL_ISV_VIEW_COLUMN_USAGE                       0x00100000L
01422 #define SQL_ISV_VIEW_TABLE_USAGE                        0x00200000L
01423 #define SQL_ISV_VIEWS                                           0x00400000L
01424 
01425 /* Bitmasks for SQL_ASYNC_MODE */
01426 
01427 #define SQL_AM_NONE                     0
01428 #define SQL_AM_CONNECTION       1
01429 #define SQL_AM_STATEMENT        2
01430 
01431 /* Bitmasks for SQL_ALTER_DOMAIN */
01432 #define SQL_AD_CONSTRAINT_NAME_DEFINITION                       0x00000001L     
01433 #define SQL_AD_ADD_DOMAIN_CONSTRAINT                            0x00000002L
01434 #define SQL_AD_DROP_DOMAIN_CONSTRAINT                           0x00000004L
01435 #define SQL_AD_ADD_DOMAIN_DEFAULT                               0x00000008L
01436 #define SQL_AD_DROP_DOMAIN_DEFAULT                              0x00000010L
01437 #define SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED        0x00000020L
01438 #define SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE       0x00000040L
01439 #define SQL_AD_ADD_CONSTRAINT_DEFERRABLE                        0x00000080L
01440 #define SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE            0x00000100L
01441 
01442 
01443 /* SQL_CREATE_SCHEMA bitmasks */
01444 #define SQL_CS_CREATE_SCHEMA                            0x00000001L
01445 #define SQL_CS_AUTHORIZATION                            0x00000002L
01446 #define SQL_CS_DEFAULT_CHARACTER_SET            0x00000004L
01447 
01448 /* SQL_CREATE_TRANSLATION bitmasks */
01449 #define SQL_CTR_CREATE_TRANSLATION                      0x00000001L
01450 
01451 /* SQL_CREATE_ASSERTION bitmasks */
01452 #define SQL_CA_CREATE_ASSERTION                                 0x00000001L
01453 #define SQL_CA_CONSTRAINT_INITIALLY_DEFERRED    0x00000010L
01454 #define SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE   0x00000020L
01455 #define SQL_CA_CONSTRAINT_DEFERRABLE                    0x00000040L
01456 #define SQL_CA_CONSTRAINT_NON_DEFERRABLE                0x00000080L
01457 
01458 /* SQL_CREATE_CHARACTER_SET bitmasks */
01459 #define SQL_CCS_CREATE_CHARACTER_SET            0x00000001L
01460 #define SQL_CCS_COLLATE_CLAUSE                          0x00000002L
01461 #define SQL_CCS_LIMITED_COLLATION                       0x00000004L
01462 
01463 /* SQL_CREATE_COLLATION bitmasks */
01464 #define SQL_CCOL_CREATE_COLLATION                       0x00000001L
01465 
01466 /* SQL_CREATE_DOMAIN bitmasks */
01467 #define SQL_CDO_CREATE_DOMAIN                                   0x00000001L
01468 #define SQL_CDO_DEFAULT                                                 0x00000002L
01469 #define SQL_CDO_CONSTRAINT                                              0x00000004L
01470 #define SQL_CDO_COLLATION                                               0x00000008L
01471 #define SQL_CDO_CONSTRAINT_NAME_DEFINITION              0x00000010L
01472 #define SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED   0x00000020L
01473 #define SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE  0x00000040L
01474 #define SQL_CDO_CONSTRAINT_DEFERRABLE                   0x00000080L
01475 #define SQL_CDO_CONSTRAINT_NON_DEFERRABLE               0x00000100L
01476 
01477 /* SQL_CREATE_TABLE bitmasks */
01478 #define SQL_CT_CREATE_TABLE                                             0x00000001L
01479 #define SQL_CT_COMMIT_PRESERVE                                  0x00000002L
01480 #define SQL_CT_COMMIT_DELETE                                    0x00000004L
01481 #define SQL_CT_GLOBAL_TEMPORARY                                 0x00000008L
01482 #define SQL_CT_LOCAL_TEMPORARY                                  0x00000010L
01483 #define SQL_CT_CONSTRAINT_INITIALLY_DEFERRED    0x00000020L
01484 #define SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE   0x00000040L
01485 #define SQL_CT_CONSTRAINT_DEFERRABLE                    0x00000080L
01486 #define SQL_CT_CONSTRAINT_NON_DEFERRABLE                0x00000100L
01487 #define SQL_CT_COLUMN_CONSTRAINT                                0x00000200L
01488 #define SQL_CT_COLUMN_DEFAULT                                   0x00000400L
01489 #define SQL_CT_COLUMN_COLLATION                                 0x00000800L
01490 #define SQL_CT_TABLE_CONSTRAINT                                 0x00001000L
01491 #define SQL_CT_CONSTRAINT_NAME_DEFINITION               0x00002000L
01492 
01493 /* SQL_DDL_INDEX bitmasks */
01494 #define SQL_DI_CREATE_INDEX                                             0x00000001L
01495 #define SQL_DI_DROP_INDEX                                               0x00000002L
01496 
01497 /* SQL_DROP_COLLATION bitmasks */
01498 #define SQL_DC_DROP_COLLATION                                   0x00000001L
01499 
01500 /* SQL_DROP_DOMAIN bitmasks */
01501 #define SQL_DD_DROP_DOMAIN                                              0x00000001L
01502 #define SQL_DD_RESTRICT                                                 0x00000002L
01503 #define SQL_DD_CASCADE                                                  0x00000004L
01504 
01505 /* SQL_DROP_SCHEMA bitmasks */
01506 #define SQL_DS_DROP_SCHEMA                                              0x00000001L
01507 #define SQL_DS_RESTRICT                                                 0x00000002L
01508 #define SQL_DS_CASCADE                                                  0x00000004L
01509 
01510 /* SQL_DROP_CHARACTER_SET bitmasks */
01511 #define SQL_DCS_DROP_CHARACTER_SET                              0x00000001L
01512 
01513 /* SQL_DROP_ASSERTION bitmasks */
01514 #define SQL_DA_DROP_ASSERTION                                   0x00000001L
01515 
01516 /* SQL_DROP_TABLE bitmasks */
01517 #define SQL_DT_DROP_TABLE                                               0x00000001L
01518 #define SQL_DT_RESTRICT                                                 0x00000002L
01519 #define SQL_DT_CASCADE                                                  0x00000004L
01520 
01521 /* SQL_DROP_TRANSLATION bitmasks */
01522 #define SQL_DTR_DROP_TRANSLATION                                0x00000001L
01523 
01524 /* SQL_DROP_VIEW bitmasks */
01525 #define SQL_DV_DROP_VIEW                                                0x00000001L
01526 #define SQL_DV_RESTRICT                                                 0x00000002L
01527 #define SQL_DV_CASCADE                                                  0x00000004L
01528 
01529 /* SQL_INSERT_STATEMENT bitmasks */
01530 #define SQL_IS_INSERT_LITERALS                                  0x00000001L
01531 #define SQL_IS_INSERT_SEARCHED                                  0x00000002L
01532 #define SQL_IS_SELECT_INTO                                              0x00000004L
01533 
01534 /* SQL_ODBC_INTERFACE_CONFORMANCE values */
01535 #define SQL_OIC_CORE                                                    1UL
01536 #define SQL_OIC_LEVEL1                                                  2UL
01537 #define SQL_OIC_LEVEL2                                                  3UL
01538 
01539 /* SQL_SQL92_FOREIGN_KEY_DELETE_RULE bitmasks */
01540 #define SQL_SFKD_CASCADE                                                0x00000001L
01541 #define SQL_SFKD_NO_ACTION                                              0x00000002L
01542 #define SQL_SFKD_SET_DEFAULT                                    0x00000004L
01543 #define SQL_SFKD_SET_NULL                                               0x00000008L
01544 
01545 /* SQL_SQL92_FOREIGN_KEY_UPDATE_RULE bitmasks */
01546 #define SQL_SFKU_CASCADE                                                0x00000001L
01547 #define SQL_SFKU_NO_ACTION                                              0x00000002L
01548 #define SQL_SFKU_SET_DEFAULT                                    0x00000004L
01549 #define SQL_SFKU_SET_NULL                                               0x00000008L
01550 
01551 /* SQL_SQL92_GRANT      bitmasks */
01552 #define SQL_SG_USAGE_ON_DOMAIN                                  0x00000001L
01553 #define SQL_SG_USAGE_ON_CHARACTER_SET                   0x00000002L
01554 #define SQL_SG_USAGE_ON_COLLATION                               0x00000004L
01555 #define SQL_SG_USAGE_ON_TRANSLATION                             0x00000008L
01556 #define SQL_SG_WITH_GRANT_OPTION                                0x00000010L
01557 #define SQL_SG_DELETE_TABLE                                             0x00000020L
01558 #define SQL_SG_INSERT_TABLE                                             0x00000040L
01559 #define SQL_SG_INSERT_COLUMN                                    0x00000080L
01560 #define SQL_SG_REFERENCES_TABLE                                 0x00000100L
01561 #define SQL_SG_REFERENCES_COLUMN                                0x00000200L
01562 #define SQL_SG_SELECT_TABLE                                             0x00000400L
01563 #define SQL_SG_UPDATE_TABLE                                             0x00000800L
01564 #define SQL_SG_UPDATE_COLUMN                                    0x00001000L     
01565 
01566 /* SQL_SQL92_PREDICATES bitmasks */
01567 #define SQL_SP_EXISTS                                                   0x00000001L
01568 #define SQL_SP_ISNOTNULL                                                0x00000002L
01569 #define SQL_SP_ISNULL                                                   0x00000004L
01570 #define SQL_SP_MATCH_FULL                                               0x00000008L
01571 #define SQL_SP_MATCH_PARTIAL                                    0x00000010L
01572 #define SQL_SP_MATCH_UNIQUE_FULL                                0x00000020L
01573 #define SQL_SP_MATCH_UNIQUE_PARTIAL                             0x00000040L
01574 #define SQL_SP_OVERLAPS                                                 0x00000080L
01575 #define SQL_SP_UNIQUE                                                   0x00000100L
01576 #define SQL_SP_LIKE                                                             0x00000200L
01577 #define SQL_SP_IN                                                               0x00000400L
01578 #define SQL_SP_BETWEEN                                                  0x00000800L
01579 #define SQL_SP_COMPARISON                                               0x00001000L
01580 #define SQL_SP_QUANTIFIED_COMPARISON                    0x00002000L
01581 
01582 /* SQL_SQL92_RELATIONAL_JOIN_OPERATORS bitmasks */
01583 #define SQL_SRJO_CORRESPONDING_CLAUSE                   0x00000001L
01584 #define SQL_SRJO_CROSS_JOIN                                             0x00000002L
01585 #define SQL_SRJO_EXCEPT_JOIN                                    0x00000004L
01586 #define SQL_SRJO_FULL_OUTER_JOIN                                0x00000008L
01587 #define SQL_SRJO_INNER_JOIN                                             0x00000010L
01588 #define SQL_SRJO_INTERSECT_JOIN                                 0x00000020L
01589 #define SQL_SRJO_LEFT_OUTER_JOIN                                0x00000040L
01590 #define SQL_SRJO_NATURAL_JOIN                                   0x00000080L
01591 #define SQL_SRJO_RIGHT_OUTER_JOIN                               0x00000100L
01592 #define SQL_SRJO_UNION_JOIN                                             0x00000200L
01593 
01594 /* SQL_SQL92_REVOKE bitmasks */
01595 #define SQL_SR_USAGE_ON_DOMAIN                                  0x00000001L
01596 #define SQL_SR_USAGE_ON_CHARACTER_SET                   0x00000002L
01597 #define SQL_SR_USAGE_ON_COLLATION                               0x00000004L
01598 #define SQL_SR_USAGE_ON_TRANSLATION                             0x00000008L
01599 #define SQL_SR_GRANT_OPTION_FOR                                 0x00000010L
01600 #define SQL_SR_CASCADE                                                  0x00000020L
01601 #define SQL_SR_RESTRICT                                                 0x00000040L
01602 #define SQL_SR_DELETE_TABLE                                             0x00000080L
01603 #define SQL_SR_INSERT_TABLE                                             0x00000100L
01604 #define SQL_SR_INSERT_COLUMN                                    0x00000200L
01605 #define SQL_SR_REFERENCES_TABLE                                 0x00000400L
01606 #define SQL_SR_REFERENCES_COLUMN                                0x00000800L
01607 #define SQL_SR_SELECT_TABLE                                             0x00001000L
01608 #define SQL_SR_UPDATE_TABLE                                             0x00002000L
01609 #define SQL_SR_UPDATE_COLUMN                                    0x00004000L
01610 
01611 /* SQL_SQL92_ROW_VALUE_CONSTRUCTOR bitmasks */
01612 #define SQL_SRVC_VALUE_EXPRESSION                               0x00000001L
01613 #define SQL_SRVC_NULL                                                   0x00000002L
01614 #define SQL_SRVC_DEFAULT                                                0x00000004L
01615 #define SQL_SRVC_ROW_SUBQUERY                                   0x00000008L
01616 
01617 /* SQL_SQL92_VALUE_EXPRESSIONS bitmasks */
01618 #define SQL_SVE_CASE                                                    0x00000001L
01619 #define SQL_SVE_CAST                                                    0x00000002L
01620 #define SQL_SVE_COALESCE                                                0x00000004L
01621 #define SQL_SVE_NULLIF                                                  0x00000008L
01622 
01623 /* SQL_STANDARD_CLI_CONFORMANCE bitmasks */
01624 #define SQL_SCC_XOPEN_CLI_VERSION1                              0x00000001L
01625 #define SQL_SCC_ISO92_CLI                                               0x00000002L
01626 
01627 /* SQL_UNION_STATEMENT bitmasks */
01628 #define SQL_US_UNION                                                    SQL_U_UNION
01629 #define SQL_US_UNION_ALL                                                SQL_U_UNION_ALL
01630 
01631 #endif  /* ODBCVER >= 0x0300 */
01632 
01633 /* SQL_DTC_TRANSITION_COST bitmasks */
01634 #define SQL_DTC_ENLIST_EXPENSIVE                                0x00000001L
01635 #define SQL_DTC_UNENLIST_EXPENSIVE                              0x00000002L
01636 
01637 /* additional SQLDataSources fetch directions */
01638 #if (ODBCVER >= 0x0300)
01639 #define SQL_FETCH_FIRST_USER                            31
01640 #define SQL_FETCH_FIRST_SYSTEM                          32
01641 #endif  /* ODBCVER >= 0x0300 */
01642 
01643 
01644 /* Defines for SQLSetPos */
01645 #define SQL_ENTIRE_ROWSET            0
01646 
01647 /* Operations in SQLSetPos */
01648 #define SQL_POSITION                 0               /*      1.0 FALSE */
01649 #define SQL_REFRESH                  1               /*      1.0 TRUE */
01650 #define SQL_UPDATE                   2
01651 #define SQL_DELETE                   3
01652 
01653 /* Operations in SQLBulkOperations */
01654 #define SQL_ADD                      4
01655 #define SQL_SETPOS_MAX_OPTION_VALUE                     SQL_ADD
01656 #if (ODBCVER >= 0x0300)
01657 #define SQL_UPDATE_BY_BOOKMARK           5
01658 #define SQL_DELETE_BY_BOOKMARK           6
01659 #define SQL_FETCH_BY_BOOKMARK            7
01660 
01661 #endif /*  ODBCVER >= 0x0300 */
01662 
01663 /* Lock options in SQLSetPos */
01664 #define SQL_LOCK_NO_CHANGE           0               /*      1.0 FALSE */
01665 #define SQL_LOCK_EXCLUSIVE           1               /*      1.0 TRUE */
01666 #define SQL_LOCK_UNLOCK              2
01667 
01668 #define SQL_SETPOS_MAX_LOCK_VALUE               SQL_LOCK_UNLOCK
01669 
01670 /* Macros for SQLSetPos */
01671 #define SQL_POSITION_TO(hstmt,irow) SQLSetPos(hstmt,irow,SQL_POSITION,SQL_LOCK_NO_CHANGE)
01672 #define SQL_LOCK_RECORD(hstmt,irow,fLock) SQLSetPos(hstmt,irow,SQL_POSITION,fLock)
01673 #define SQL_REFRESH_RECORD(hstmt,irow,fLock) SQLSetPos(hstmt,irow,SQL_REFRESH,fLock)
01674 #define SQL_UPDATE_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_UPDATE,SQL_LOCK_NO_CHANGE)
01675 #define SQL_DELETE_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_DELETE,SQL_LOCK_NO_CHANGE)
01676 #define SQL_ADD_RECORD(hstmt,irow) SQLSetPos(hstmt,irow,SQL_ADD,SQL_LOCK_NO_CHANGE)
01677 
01678 /* Column types and scopes in SQLSpecialColumns.  */
01679 #define SQL_BEST_ROWID                  1
01680 #define SQL_ROWVER                      2
01681 
01682 /* Defines for SQLSpecialColumns (returned in the result set)
01683    SQL_PC_UNKNOWN and SQL_PC_PSEUDO are defined in sql.h */
01684 #define SQL_PC_NOT_PSEUDO               1
01685 
01686 /* Defines for SQLStatistics */
01687 #define SQL_QUICK                       0
01688 #define SQL_ENSURE                      1
01689 
01690 /* Defines for SQLStatistics (returned in the result set)
01691    SQL_INDEX_CLUSTERED, SQL_INDEX_HASHED, and SQL_INDEX_OTHER are
01692    defined in sql.h */
01693 #define SQL_TABLE_STAT                  0
01694 
01695 
01696 /* Defines for SQLTables */
01697 #if (ODBCVER >= 0x0300)
01698 #define SQL_ALL_CATALOGS                                "%"
01699 #define SQL_ALL_SCHEMAS                                 "%"
01700 #define SQL_ALL_TABLE_TYPES                             "%"
01701 #endif  /* ODBCVER >= 0x0300 */
01702 
01703 /* Options for SQLDriverConnect */
01704 #define SQL_DRIVER_NOPROMPT             0
01705 #define SQL_DRIVER_COMPLETE             1
01706 #define SQL_DRIVER_PROMPT               2
01707 #define SQL_DRIVER_COMPLETE_REQUIRED    3
01708 
01709 SQLRETURN SQL_API SQLDriverConnect(
01710     SQLHDBC            hdbc,
01711     SQLHWND            hwnd,
01712     SQLCHAR               *szConnStrIn,
01713     SQLSMALLINT        cbConnStrIn,
01714     SQLCHAR           *szConnStrOut,
01715     SQLSMALLINT        cbConnStrOutMax,
01716     SQLSMALLINT           *pcbConnStrOut,
01717     SQLUSMALLINT       fDriverCompletion);
01718 
01719 /* Level 2 Functions                             */
01720 
01721 /* SQLExtendedFetch "fFetchType" values */
01722 #define SQL_FETCH_BOOKMARK               8
01723 
01724 /* SQLExtendedFetch "rgfRowStatus" element values */
01725 #define SQL_ROW_SUCCESS                  0
01726 #define SQL_ROW_DELETED                  1
01727 #define SQL_ROW_UPDATED                  2
01728 #define SQL_ROW_NOROW                    3
01729 #define SQL_ROW_ADDED                    4
01730 #define SQL_ROW_ERROR                    5
01731 #if (ODBCVER >= 0x0300)
01732 #define SQL_ROW_SUCCESS_WITH_INFO                6
01733 #define SQL_ROW_PROCEED                                  0
01734 #define SQL_ROW_IGNORE                                   1
01735 #endif
01736 
01737 /* value for SQL_DESC_ARRAY_STATUS_PTR */
01738 #if (ODBCVER >= 0x0300)
01739 #define SQL_PARAM_SUCCESS                               0
01740 #define SQL_PARAM_SUCCESS_WITH_INFO             6
01741 #define SQL_PARAM_ERROR                                 5
01742 #define SQL_PARAM_UNUSED                                7
01743 #define SQL_PARAM_DIAG_UNAVAILABLE              1
01744 
01745 #define SQL_PARAM_PROCEED                               0
01746 #define SQL_PARAM_IGNORE                                1
01747 #endif  /* ODBCVER >= 0x0300 */
01748 
01749 /* Defines for SQLForeignKeys (UPDATE_RULE and DELETE_RULE) */
01750 #define SQL_CASCADE                      0
01751 #define SQL_RESTRICT                     1
01752 #define SQL_SET_NULL                     2
01753 #if (ODBCVER >= 0x0250)
01754 #define SQL_NO_ACTION                    3
01755 #define SQL_SET_DEFAULT                  4
01756 #endif  /* ODBCVER >= 0x0250 */
01757 
01758 #if (ODBCVER >= 0x0300)
01759 /* Note that the following are in a different column of SQLForeignKeys than */
01760 /* the previous #defines.   These are for DEFERRABILITY.                    */
01761 
01762 #define SQL_INITIALLY_DEFERRED                  5
01763 #define SQL_INITIALLY_IMMEDIATE                 6
01764 #define SQL_NOT_DEFERRABLE                      7
01765 
01766 #endif  /* ODBCVER >= 0x0300 */
01767 
01768 /* Defines for SQLBindParameter and
01769                            SQLProcedureColumns (returned in the result set) */
01770 #define SQL_PARAM_TYPE_UNKNOWN           0
01771 #define SQL_PARAM_INPUT                  1
01772 #define SQL_PARAM_INPUT_OUTPUT           2
01773 #define SQL_RESULT_COL                   3
01774 #define SQL_PARAM_OUTPUT                 4
01775 #define SQL_RETURN_VALUE                 5
01776 
01777 /* Defines for SQLProcedures (returned in the result set) */
01778 #define SQL_PT_UNKNOWN                   0
01779 #define SQL_PT_PROCEDURE                 1
01780 #define SQL_PT_FUNCTION                  2
01781 
01782 /*      This define is too large for RC */
01783 #define SQL_ODBC_KEYWORDS "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,"\
01784 "ASC,ASSERTION,AT,AUTHORIZATION,AVG,"\
01785 "BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,"\
01786 "CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,"\
01787 "COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"\
01788 "CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"\
01789 "CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"\
01790 "DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"\
01791 "DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,"\
01792 "DISTINCT,DOMAIN,DOUBLE,DROP,"\
01793 "ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,"\
01794 "EXISTS,EXTERNAL,EXTRACT,"\
01795 "FALSE,FETCH,FIRST,FLOAT,FOR,FOREIGN,FORTRAN,FOUND,FROM,FULL,"\
01796 "GET,GLOBAL,GO,GOTO,GRANT,GROUP,HAVING,HOUR,"\
01797 "IDENTITY,IMMEDIATE,IN,INCLUDE,INDEX,INDICATOR,INITIALLY,INNER,"\
01798 "INPUT,INSENSITIVE,INSERT,INT,INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,"\
01799 "JOIN,KEY,LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,"\
01800 "MATCH,MAX,MIN,MINUTE,MODULE,MONTH,"\
01801 "NAMES,NATIONAL,NATURAL,NCHAR,NEXT,NO,NONE,NOT,NULL,NULLIF,NUMERIC,"\
01802 "OCTET_LENGTH,OF,ON,ONLY,OPEN,OPTION,OR,ORDER,OUTER,OUTPUT,OVERLAPS,"\
01803 "PAD,PARTIAL,PASCAL,PLI,POSITION,PRECISION,PREPARE,PRESERVE,"\
01804 "PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,"\
01805 "READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS"\
01806 "SCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,SIZE,"\
01807 "SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,"\
01808 "SUBSTRING,SUM,SYSTEM_USER,"\
01809 "TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"\
01810 "TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"\
01811 "UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"\
01812 "VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,"\
01813 "YEAR,ZONE"
01814 
01815 SQLRETURN SQL_API SQLBrowseConnect(
01816     SQLHDBC            hdbc,
01817     SQLCHAR               *szConnStrIn,
01818     SQLSMALLINT        cbConnStrIn,
01819     SQLCHAR               *szConnStrOut,
01820     SQLSMALLINT        cbConnStrOutMax,
01821     SQLSMALLINT       *pcbConnStrOut);
01822 
01823 #if (ODBCVER >= 0x0300)
01824 SQLRETURN       SQL_API SQLBulkOperations(
01825         SQLHSTMT                        StatementHandle,
01826         SQLSMALLINT                     Operation);
01827 #endif  /* ODBCVER >= 0x0300 */
01828 
01829 SQLRETURN SQL_API SQLColAttributes(
01830     SQLHSTMT           hstmt,
01831     SQLUSMALLINT       icol,
01832     SQLUSMALLINT       fDescType,
01833     SQLPOINTER         rgbDesc,
01834     SQLSMALLINT        cbDescMax,
01835     SQLSMALLINT           *pcbDesc,
01836     SQLLEN                    *pfDesc);
01837 
01838 SQLRETURN SQL_API SQLColumnPrivileges(
01839     SQLHSTMT           hstmt,
01840     SQLCHAR               *szCatalogName,
01841     SQLSMALLINT        cbCatalogName,
01842     SQLCHAR               *szSchemaName,
01843     SQLSMALLINT        cbSchemaName,
01844     SQLCHAR               *szTableName,
01845     SQLSMALLINT        cbTableName,
01846     SQLCHAR               *szColumnName,
01847     SQLSMALLINT        cbColumnName);
01848 
01849 SQLRETURN SQL_API SQLDescribeParam(
01850     SQLHSTMT           hstmt,
01851     SQLUSMALLINT       ipar,
01852     SQLSMALLINT           *pfSqlType,
01853     SQLULEN           *pcbParamDef,
01854     SQLSMALLINT           *pibScale,
01855     SQLSMALLINT           *pfNullable);
01856 
01857 SQLRETURN SQL_API SQLExtendedFetch(
01858     SQLHSTMT           hstmt,
01859     SQLUSMALLINT       fFetchType,
01860     SQLROWOFFSET       irow,
01861     SQLROWSETSIZE         *pcrow,
01862     SQLUSMALLINT          *rgfRowStatus);
01863 
01864 SQLRETURN SQL_API SQLForeignKeys(
01865     SQLHSTMT           hstmt,
01866     SQLCHAR               *szPkCatalogName,
01867     SQLSMALLINT        cbPkCatalogName,
01868     SQLCHAR               *szPkSchemaName,
01869     SQLSMALLINT        cbPkSchemaName,
01870     SQLCHAR               *szPkTableName,
01871     SQLSMALLINT        cbPkTableName,
01872     SQLCHAR               *szFkCatalogName,
01873     SQLSMALLINT        cbFkCatalogName,
01874     SQLCHAR               *szFkSchemaName,
01875     SQLSMALLINT        cbFkSchemaName,
01876     SQLCHAR               *szFkTableName,
01877     SQLSMALLINT        cbFkTableName);
01878 
01879 SQLRETURN SQL_API SQLMoreResults(
01880     SQLHSTMT           hstmt);
01881 
01882 SQLRETURN SQL_API SQLNativeSql(
01883     SQLHDBC            hdbc,
01884     SQLCHAR               *szSqlStrIn,
01885     SQLINTEGER         cbSqlStrIn,
01886     SQLCHAR               *szSqlStr,
01887     SQLINTEGER         cbSqlStrMax,
01888     SQLINTEGER            *pcbSqlStr);
01889 
01890 SQLRETURN SQL_API SQLNumParams(
01891     SQLHSTMT           hstmt,
01892     SQLSMALLINT           *pcpar);
01893 
01894 SQLRETURN SQL_API SQLParamOptions(
01895     SQLHSTMT           hstmt,
01896     SQLULEN                crow,
01897     SQLULEN                *pirow);
01898 
01899 SQLRETURN SQL_API SQLPrimaryKeys(
01900     SQLHSTMT           hstmt,
01901     SQLCHAR               *szCatalogName,
01902     SQLSMALLINT        cbCatalogName,
01903     SQLCHAR               *szSchemaName,
01904     SQLSMALLINT        cbSchemaName,
01905     SQLCHAR               *szTableName,
01906     SQLSMALLINT        cbTableName);
01907 
01908 SQLRETURN SQL_API SQLProcedureColumns(
01909     SQLHSTMT           hstmt,
01910     SQLCHAR               *szCatalogName,
01911     SQLSMALLINT        cbCatalogName,
01912     SQLCHAR               *szSchemaName,
01913     SQLSMALLINT        cbSchemaName,
01914     SQLCHAR               *szProcName,
01915     SQLSMALLINT        cbProcName,
01916     SQLCHAR               *szColumnName,
01917     SQLSMALLINT        cbColumnName);
01918 
01919 SQLRETURN SQL_API SQLProcedures(
01920     SQLHSTMT           hstmt,
01921     SQLCHAR               *szCatalogName,
01922     SQLSMALLINT        cbCatalogName,
01923     SQLCHAR               *szSchemaName,
01924     SQLSMALLINT        cbSchemaName,
01925     SQLCHAR               *szProcName,
01926     SQLSMALLINT        cbProcName);
01927 
01928 SQLRETURN SQL_API SQLSetPos(
01929     SQLHSTMT           hstmt,
01930     SQLSETPOSIROW      irow,
01931     SQLUSMALLINT       fOption,
01932     SQLUSMALLINT       fLock);
01933 
01934 SQLRETURN SQL_API SQLTablePrivileges(
01935     SQLHSTMT           hstmt,
01936     SQLCHAR               *szCatalogName,
01937     SQLSMALLINT        cbCatalogName,
01938     SQLCHAR               *szSchemaName,
01939     SQLSMALLINT        cbSchemaName,
01940     SQLCHAR               *szTableName,
01941     SQLSMALLINT        cbTableName);
01942 
01943 SQLRETURN SQL_API SQLDrivers(
01944     SQLHENV            henv,
01945     SQLUSMALLINT       fDirection,
01946     SQLCHAR               *szDriverDesc,
01947     SQLSMALLINT        cbDriverDescMax,
01948     SQLSMALLINT           *pcbDriverDesc,
01949     SQLCHAR               *szDriverAttributes,
01950     SQLSMALLINT        cbDrvrAttrMax,
01951     SQLSMALLINT           *pcbDrvrAttr);
01952 
01953 SQLRETURN SQL_API SQLBindParameter(
01954     SQLHSTMT           hstmt,
01955     SQLUSMALLINT       ipar,
01956     SQLSMALLINT        fParamType,
01957     SQLSMALLINT        fCType,
01958     SQLSMALLINT        fSqlType,
01959     SQLULEN            cbColDef,
01960     SQLSMALLINT        ibScale,
01961     SQLPOINTER         rgbValue,
01962     SQLLEN             cbValueMax,
01963     SQLLEN                    *pcbValue);
01964 
01965 /*---------------------------------------------------------*/
01966 /* SQLAllocHandleStd is implemented to make SQLAllocHandle */
01967 /* compatible with X/Open standard.      an application should */
01968 /* not call SQLAllocHandleStd directly                                     */
01969 /*---------------------------------------------------------*/
01970 #ifdef ODBC_STD
01971 #define SQLAllocHandle  SQLAllocHandleStd
01972 #define SQLAllocEnv(phenv)  SQLAllocHandleStd(SQL_HANDLE_ENV, SQL_NULL_HANDLE, phenv)
01973 
01974 /* Internal type subcodes */
01975 #define SQL_YEAR                                                SQL_CODE_YEAR
01976 #define SQL_MONTH                                               SQL_CODE_MONTH
01977 #define SQL_DAY                                                 SQL_CODE_DAY
01978 #define SQL_HOUR                                                SQL_CODE_HOUR
01979 #define SQL_MINUTE                                              SQL_CODE_MINUTE
01980 #define SQL_SECOND                                              SQL_CODE_SECOND 
01981 #define SQL_YEAR_TO_MONTH                               SQL_CODE_YEAR_TO_MONTH
01982 #define SQL_DAY_TO_HOUR                                 SQL_CODE_DAY_TO_HOUR
01983 #define SQL_DAY_TO_MINUTE                               SQL_CODE_DAY_TO_MINUTE
01984 #define SQL_DAY_TO_SECOND                               SQL_CODE_DAY_TO_SECOND
01985 #define SQL_HOUR_TO_MINUTE                              SQL_CODE_HOUR_TO_MINUTE 
01986 #define SQL_HOUR_TO_SECOND                              SQL_CODE_HOUR_TO_SECOND
01987 #define SQL_MINUTE_TO_SECOND                    SQL_CODE_MINUTE_TO_SECOND
01988 #endif /* ODBC_STD */
01989 
01990 #if (ODBCVER >= 0x0300)
01991 SQLRETURN SQL_API SQLAllocHandleStd(
01992         SQLSMALLINT             fHandleType,
01993         SQLHANDLE               hInput,
01994         SQLHANDLE          *phOutput);
01995 #endif
01996 
01997 /*      Deprecated defines from prior versions of ODBC */
01998 #define SQL_DATABASE_NAME               16    /* Use SQLGetConnectOption/SQL_CURRENT_QUALIFIER */
01999 #define SQL_FD_FETCH_PREV               SQL_FD_FETCH_PRIOR
02000 #define SQL_FETCH_PREV                  SQL_FETCH_PRIOR
02001 #define SQL_CONCUR_TIMESTAMP            SQL_CONCUR_ROWVER
02002 #define SQL_SCCO_OPT_TIMESTAMP          SQL_SCCO_OPT_ROWVER
02003 #define SQL_CC_DELETE                   SQL_CB_DELETE
02004 #define SQL_CR_DELETE                   SQL_CB_DELETE
02005 #define SQL_CC_CLOSE                    SQL_CB_CLOSE
02006 #define SQL_CR_CLOSE                    SQL_CB_CLOSE
02007 #define SQL_CC_PRESERVE                 SQL_CB_PRESERVE
02008 #define SQL_CR_PRESERVE                 SQL_CB_PRESERVE
02009 /* SQL_FETCH_RESUME is not supported by 2.0+ drivers
02010 #define SQL_FETCH_RESUME                7
02011 */
02012 #define SQL_SCROLL_FORWARD_ONLY         0L    /*-SQL_CURSOR_FORWARD_ONLY */
02013 #define SQL_SCROLL_KEYSET_DRIVEN        (-1L) /*-SQL_CURSOR_KEYSET_DRIVEN */
02014 #define SQL_SCROLL_DYNAMIC              (-2L) /*-SQL_CURSOR_DYNAMIC */
02015 #define SQL_SCROLL_STATIC               (-3L) /*-SQL_CURSOR_STATIC */
02016 
02017 /*      Deprecated functions from prior versions of ODBC */
02018 SQLRETURN SQL_API SQLSetScrollOptions(    /*      Use SQLSetStmtOptions */
02019     SQLHSTMT           hstmt,
02020     SQLUSMALLINT       fConcurrency,
02021     SQLLEN             crowKeyset,
02022     SQLUSMALLINT       crowRowset);
02023 
02024 /* Tracing section */
02025 
02026 #define         TRACE_VERSION   1000            /* Version of trace API */
02027 
02028 #ifdef UNICODE
02029 RETCODE  TraceOpenLogFile(LPWSTR,LPWSTR,DWORD);         /* open a trace log file                                */
02030 #endif
02031 #ifdef __cplusplus
02032 RETCODE  TraceCloseLogFile();                                       /* Request to close a trace log                     */
02033 #else
02034 RETCODE  TraceCloseLogFile(VOID);                                   /* Request to close a trace log                     */
02035 #endif
02036 VOID     TraceReturn(RETCODE,RETCODE);                  /* Processes trace after FN is called   */
02037 #ifdef __cplusplus
02038 DWORD    TraceVersion();                                                        /* Returns trace API version                    */
02039 #else
02040 DWORD    TraceVersion(VOID);                                                    /* Returns trace API version                    */
02041 #endif
02042 
02043 /* Functions for Visual Studio Analyzer*/
02044 /* to turn on/off tracing or VS events, call TraceVSControl by setting or clearing the following bits  */
02045 #define TRACE_ON                        0x00000001L
02046 #define TRACE_VS_EVENT_ON       0x00000002L     
02047 
02048 RETCODE TraceVSControl(DWORD);                  
02049 
02050 /* the flags in ODBC_VS_ARGS */
02051 #define ODBC_VS_FLAG_UNICODE_ARG        0x00000001L     /* the argument is unicode */
02052 #define ODBC_VS_FLAG_UNICODE_COR        0x00000002L     /* the correlation is unicode */
02053 #define ODBC_VS_FLAG_RETCODE            0x00000004L     /* RetCode field is set */
02054 #define ODBC_VS_FLAG_STOP               0x00000008L     /* Stop firing visual studio analyzer events */
02055 
02056 typedef struct tagODBC_VS_ARGS {
02057 #ifdef GUID_DEFINED
02058         const GUID      *pguidEvent;    /* the GUID for event */
02059 #else
02060         const void      *pguidEvent;    /* the GUID for event */
02061 #endif
02062         DWORD   dwFlags;                /* flags for the call */
02063         union {
02064                 WCHAR   *wszArg;        
02065                 CHAR    *szArg;
02066         }u1;
02067         union {
02068                 WCHAR   *wszCorrelation;
02069                 CHAR    *szCorrelation;
02070         }u2;                            
02071         RETCODE RetCode;
02072 } ODBC_VS_ARGS, *PODBC_VS_ARGS;
02073 
02074 VOID    FireVSDebugEvent(PODBC_VS_ARGS);
02075 
02076 
02077 #ifdef __cplusplus
02078 }
02079 #endif
02080 
02081 #ifndef __SQLUCODE_H
02082 #include "sqlucode.h"
02083 #endif
02084 
02085 #endif
02086 
02087 

Generated on Mon Jun 9 22:37:14 2008 for csql by  doxygen 1.4.7