LCOV - code coverage report
Current view: top level - usr/include - sqlext.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 11 20 55.0 %
Date: 2024-12-20 20:06:10 Functions: 11 20 55.0 %

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

Generated by: LCOV version 1.14