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