/**
$(RED Warning:
      This binding is out-of-date and does not allow use on non-Windows platforms. Use `etc.c.odbc.sqlext` instead.)

 * Windows API header module
 *
 * Translated from MinGW Windows headers
 *
 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
 * Source: $(DRUNTIMESRC core/sys/windows/_sqlext.d)
 */

module core.sys.windows.sqlext;
version (Windows):

/* Conversion notes:
   The MinGW file was a horrible mess. All of the #defines were sorted alphabetically,
   which is crazy. This file needs a lot of work.
   In MinGW, sqlext #includes sqlucode, but sqlucode #includes sqlext,
   creating a circular dependency!
*/

public import core.sys.windows.sql;
import core.sys.windows.windef;

enum SQL_SPEC_MAJOR = 3;
enum SQL_SPEC_MINOR = 51;
const char[] SQL_SPEC_STRING = "03.51";
enum SQL_ACCESS_MODE = 101;
enum SQL_ACTIVE_CONNECTIONS = 0;
enum SQL_ACTIVE_STATEMENTS  = 1;

enum SQL_DATE = 9;
enum SQL_TIME = 10;
enum SQL_SIGNED_OFFSET = -20;
enum SQL_TINYINT = -6;
enum SQL_TIMESTAMP = 11;
enum SQL_UNSIGNED_OFFSET = -22;

enum SQL_ADD = 4;
enum SQL_ALL_EXCEPT_LIKE = 2;

enum SQL_API_ALL_FUNCTIONS       =   0;
enum SQL_API_SQLCOLATTRIBUTES    =   6;
enum SQL_API_SQLDRIVERCONNECT    =  41;
enum SQL_API_SQLBROWSECONNECT    =  55;
enum SQL_API_SQLCOLUMNPRIVILEGES =  56;
enum SQL_API_SQLDESCRIBEPARAM    =  58;
enum SQL_API_SQLEXTENDEDFETCH    =  59;
enum SQL_API_SQLFOREIGNKEYS      =  60;
enum SQL_API_SQLMORERESULTS      =  61;
enum SQL_API_SQLNATIVESQL        =  62;
enum SQL_API_SQLNUMPARAMS        =  63;
enum SQL_API_SQLPARAMOPTIONS     =  64;
enum SQL_API_SQLPRIMARYKEYS      =  65;
enum SQL_API_SQLPROCEDURECOLUMNS =  66;
enum SQL_API_SQLPROCEDURES       =  67;
enum SQL_API_SQLSETPOS           =  68;
enum SQL_API_SQLSETSCROLLOPTIONS =  69;
enum SQL_API_SQLTABLEPRIVILEGES  =  70;
enum SQL_API_SQLDRIVERS          =  71;
enum SQL_API_SQLBINDPARAMETER    =  72;
enum SQL_API_LOADBYORDINAL       = 199;

enum SQL_ASYNC_ENABLE = 4;
enum SQL_ASYNC_ENABLE_OFF = 0UL;
enum SQL_ASYNC_ENABLE_ON = 1UL;
enum SQL_ASYNC_ENABLE_DEFAULT = SQL_ASYNC_ENABLE_OFF;

enum SQL_ATTR_CONNECTION_DEAD = 1209;
enum SQL_ATTR_READONLY = 0;
enum SQL_ATTR_READWRITE_UNKNOWN = 2;
enum SQL_ATTR_WRITE = 1;

enum SQL_AUTOCOMMIT = 102;
enum SQL_AUTOCOMMIT_OFF = 0UL;
enum SQL_AUTOCOMMIT_ON = 1UL;
enum SQL_AUTOCOMMIT_DEFAULT = SQL_AUTOCOMMIT_ON;
enum SQL_BEST_ROWID = 1;
enum SQL_BIGINT = -5;
enum SQL_BINARY = -2;
enum SQL_BIND_BY_COLUMN = 0UL;
enum SQL_BIND_TYPE = 5;
enum SQL_BIND_TYPE_DEFAULT = SQL_BIND_BY_COLUMN;
enum SQL_BIT = -7;

enum SQL_BOOKMARK_PERSISTENCE = 82;

// for BOOKMARK_PERSISTENCE
enum SQL_BP_CLOSE       = 1;
enum SQL_BP_DELETE      = 2;
enum SQL_BP_DROP        = 4;
enum SQL_BP_TRANSACTION = 8;
enum SQL_BP_UPDATE      = 16;
enum SQL_BP_OTHER_HSTMT = 32;
enum SQL_BP_SCROLL      = 64;

enum SQL_C_BINARY    = SQL_BINARY;
enum SQL_C_BIT       = SQL_BIT;
enum SQL_C_CHAR      = SQL_CHAR;
enum SQL_C_DATE      = SQL_DATE;
enum SQL_C_DOUBLE    = SQL_DOUBLE;
enum SQL_C_FLOAT     = SQL_REAL;
enum SQL_C_LONG      = SQL_INTEGER;
enum SQL_C_SHORT     = SQL_SMALLINT;
enum SQL_C_SLONG     = SQL_C_LONG+SQL_SIGNED_OFFSET;
enum SQL_C_SSHORT    = SQL_C_SHORT+SQL_SIGNED_OFFSET;
enum SQL_C_STINYINT  = SQL_TINYINT+SQL_SIGNED_OFFSET;
enum SQL_C_TIME      = SQL_TIME;
enum SQL_C_TIMESTAMP = SQL_TIMESTAMP;
enum SQL_C_TINYINT   = SQL_TINYINT;
enum SQL_C_ULONG     = SQL_C_LONG+SQL_UNSIGNED_OFFSET;
enum SQL_C_USHORT    = SQL_C_SHORT+SQL_UNSIGNED_OFFSET;
enum SQL_C_UTINYINT  = SQL_TINYINT+SQL_UNSIGNED_OFFSET;
enum SQL_C_BOOKMARK  = SQL_C_ULONG;
enum SQL_C_DEFAULT   = 99;

enum SQL_CASCADE = 0;
enum SQL_CB_NON_NULL = 1;
enum SQL_CB_NULL = 0;
deprecated {
enum SQL_CC_CLOSE = SQL_CB_CLOSE;/* deprecated */
enum SQL_CC_DELETE = SQL_CB_DELETE;/* deprecated */
enum SQL_CC_PRESERVE = SQL_CB_PRESERVE;/* deprecated */
}
enum SQL_CD_FALSE = 0L;
enum SQL_CD_TRUE = 1L;

enum SQL_CN_ANY = 2;
enum SQL_CN_DIFFERENT = 1;
enum SQL_CN_NONE = 0;

enum SQL_COLUMN_ALIAS = 87;

enum SQL_COLUMN_COUNT = 0;
enum SQL_COLUMN_NAME = 1;
enum SQL_COLUMN_DISPLAY_SIZE = 6;
enum SQL_COLUMN_LABEL = 18;
enum SQL_COLUMN_LENGTH = 3;
enum SQL_COLUMN_MONEY = 9;
enum SQL_COLUMN_NULLABLE = 7;
enum SQL_COLUMN_OWNER_NAME = 16;
enum SQL_COLUMN_PRECISION = 4;
enum SQL_COLUMN_QUALIFIER_NAME = 17;
enum SQL_COLUMN_SCALE = 5;
enum SQL_COLUMN_UNSIGNED = 8;
enum SQL_COLUMN_UPDATABLE = 10;
enum SQL_COLUMN_AUTO_INCREMENT = 11;
enum SQL_COLUMN_CASE_SENSITIVE = 12;
enum SQL_COLUMN_SEARCHABLE = 13;
enum SQL_COLUMN_TYPE = 2;
enum SQL_COLUMN_TYPE_NAME = 14;
enum SQL_COLUMN_TABLE_NAME = 15;

enum SQL_CONCAT_NULL_BEHAVIOR = 22;

enum SQL_CONCUR_READ_ONLY = 1;
enum SQL_CONCUR_DEFAULT   = SQL_CONCUR_READ_ONLY;
enum SQL_CONCUR_LOCK      = 2;
enum SQL_CONCUR_ROWVER    = 3;
enum SQL_CONCUR_TIMESTAMP = SQL_CONCUR_ROWVER;/* deprecated */
enum SQL_CONCUR_VALUES    = 4;

enum SQL_CONCURRENCY = 7;
enum SQL_CONVERT_BIGINT = 53;
enum SQL_CONVERT_BINARY = 54;
enum SQL_CONVERT_BIT = 55;
enum SQL_CONVERT_CHAR = 56;
enum SQL_CONVERT_DATE = 57;
enum SQL_CONVERT_DECIMAL = 58;
enum SQL_CONVERT_DOUBLE = 59;
enum SQL_CONVERT_FLOAT = 60;
enum SQL_CONVERT_FUNCTIONS = 48;
enum SQL_CONVERT_INTEGER = 61;
enum SQL_CONVERT_LONGVARBINARY = 71;
enum SQL_CONVERT_LONGVARCHAR = 62;
enum SQL_CONVERT_NUMERIC = 63;
enum SQL_CONVERT_REAL = 64;
enum SQL_CONVERT_SMALLINT = 65;
enum SQL_CONVERT_TIME = 66;
enum SQL_CONVERT_TIMESTAMP = 67;
enum SQL_CONVERT_TINYINT = 68;
enum SQL_CONVERT_VARBINARY = 69;
enum SQL_CONVERT_VARCHAR = 70;
enum SQL_CORRELATION_NAME = 74;
enum SQL_CR_CLOSE = SQL_CB_CLOSE;/* deprecated */
enum SQL_CR_DELETE = SQL_CB_DELETE;/* deprecated */
enum SQL_CR_PRESERVE = SQL_CB_PRESERVE;/* deprecated */

enum : ULONG {
    SQL_CUR_USE_IF_NEEDED = 0,
    SQL_CUR_USE_ODBC,
    SQL_CUR_USE_DRIVER,
    SQL_CUR_DEFAULT = SQL_CUR_USE_DRIVER
}

enum SQL_CURRENT_QUALIFIER = 109;
enum SQL_CURSOR_DYNAMIC = 2UL;
enum SQL_CURSOR_FORWARD_ONLY = 0UL;
enum SQL_CURSOR_KEYSET_DRIVEN = 1UL;
enum SQL_CURSOR_ROLLBACK_BEHAVIOR = 24;
enum SQL_CURSOR_STATIC = 3UL;
enum SQL_CURSOR_TYPE = 6;
enum SQL_CURSOR_TYPE_DEFAULT = SQL_CURSOR_FORWARD_ONLY;

enum SQL_CV_CASCADED = 0x00000004L;
enum SQL_CV_CHECK_OPTION = 0x00000002L;
enum SQL_CV_CREATE_VIEW = 0x00000001L;
enum SQL_CV_LOCAL = 0x00000008L;
enum SQL_CVT_BIGINT = 0x00004000L;
enum SQL_CVT_BINARY = 0x00000400L;
enum SQL_CVT_BIT = 0x00001000L;
enum SQL_CVT_CHAR = 0x00000001L;
enum SQL_CVT_DATE = 0x00008000L;
enum SQL_CVT_DECIMAL = 0x00000004L;
enum SQL_CVT_DOUBLE = 0x00000080L;
enum SQL_CVT_FLOAT = 0x00000020L;
enum SQL_CVT_INTEGER = 0x00000008L;
enum SQL_CVT_LONGVARBINARY = 0x00040000L;
enum SQL_CVT_LONGVARCHAR = 0x00000200L;
enum SQL_CVT_NUMERIC = 0x00000002L;
enum SQL_CVT_REAL = 0x00000040L;
enum SQL_CVT_SMALLINT = 0x00000010L;
enum SQL_CVT_TIME = 0x00010000L;
enum SQL_CVT_TIMESTAMP = 0x00020000L;
enum SQL_CVT_TINYINT = 0x00002000L;
enum SQL_CVT_VARBINARY = 0x00000800L;
enum SQL_CVT_VARCHAR = 0x00000100L;
enum SQL_DATABASE_NAME = 16;/* deprecated */

enum SQL_DEFAULT_PARAM = -5;
enum SQL_DELETE = 3;

enum SQL_DRIVER_COMPLETE = 1;
enum SQL_DRIVER_COMPLETE_REQUIRED = 3;
enum SQL_DRIVER_HDBC = 3;
enum SQL_DRIVER_HENV = 4;
enum SQL_DRIVER_HLIB = 76;
enum SQL_DRIVER_HSTMT = 5;
enum SQL_DRIVER_NAME = 6;
enum SQL_DRIVER_NOPROMPT = 0;
enum SQL_DRIVER_ODBC_VER = 77;
enum SQL_DRIVER_PROMPT = 2;
enum SQL_DRIVER_VER = 7;

enum SQL_DTC_ENLIST_EXPENSIVE = 1;
enum SQL_DTC_UNENLIST_EXPENSIVE = 2;
enum SQL_DTC_TRANSITION_COST = 1750;
enum SQL_ENSURE = 1;
enum SQL_ENTIRE_ROWSET = 0;
enum SQL_EXPRESSIONS_IN_ORDERBY = 27;
enum SQL_FD_FETCH_BOOKMARK = 128;
enum SQL_FD_FETCH_PREV = SQL_FD_FETCH_PRIOR;/* deprecated */
enum SQL_FD_FETCH_RESUME = 64;
enum SQL_FETCH_BOOKMARK = 8;
enum SQL_FETCH_PREV = SQL_FETCH_PRIOR;/* deprecated */
enum SQL_FETCH_RESUME = 7;/* deprecated */

enum SQL_FILE_NOT_SUPPORTED = 0x0000;
enum SQL_FILE_TABLE = 0x0001;
enum SQL_FILE_QUALIFIER = 0x0002;
enum SQL_FILE_CATALOG = SQL_FILE_QUALIFIER;
enum SQL_FILE_USAGE = 84;

enum SQL_FN_CVT_CONVERT = 0x00000001L;
enum SQL_FN_NUM_ABS = 0x00000001L;
enum SQL_FN_NUM_ACOS = 0x00000002L;
enum SQL_FN_NUM_ASIN = 0x00000004L;
enum SQL_FN_NUM_ATAN = 0x00000008L;
enum SQL_FN_NUM_ATAN2 = 0x00000010L;
enum SQL_FN_NUM_CEILING = 0x00000020L;
enum SQL_FN_NUM_COS = 0x00000040L;
enum SQL_FN_NUM_COT = 0x00000080L;
enum SQL_FN_NUM_DEGREES = 0x00040000L;
enum SQL_FN_NUM_EXP = 0x00000100L;
enum SQL_FN_NUM_FLOOR = 0x00000200L;
enum SQL_FN_NUM_LOG = 0x00000400L;
enum SQL_FN_NUM_LOG10 = 0x00080000L;
enum SQL_FN_NUM_MOD = 0x00000800L;
enum SQL_FN_NUM_PI = 0x00010000L;
enum SQL_FN_NUM_POWER = 0x00100000L;
enum SQL_FN_NUM_RADIANS = 0x00200000L;
enum SQL_FN_NUM_RAND = 0x00020000L;
enum SQL_FN_NUM_ROUND = 0x00400000L;
enum SQL_FN_NUM_SIGN = 0x00001000L;
enum SQL_FN_NUM_SIN = 0x00002000L;
enum SQL_FN_NUM_SQRT = 0x00004000L;
enum SQL_FN_NUM_TAN = 0x00008000L;
enum SQL_FN_NUM_TRUNCATE = 0x00800000L;
enum SQL_FN_STR_ASCII = 0x00002000L;
enum SQL_FN_STR_CHAR = 0x00004000L;
enum SQL_FN_STR_CONCAT = 0x00000001L;
enum SQL_FN_STR_DIFFERENCE = 0x00008000L;
enum SQL_FN_STR_INSERT = 0x00000002L;
enum SQL_FN_STR_LCASE = 0x00000040L;
enum SQL_FN_STR_LEFT = 0x00000004L;
enum SQL_FN_STR_LENGTH = 0x00000010L;
enum SQL_FN_STR_LOCATE = 0x00000020L;
enum SQL_FN_STR_LOCATE_2 = 0x00010000L;
enum SQL_FN_STR_LTRIM = 0x00000008L;
enum SQL_FN_STR_REPEAT = 0x00000080L;
enum SQL_FN_STR_REPLACE = 0x00000100L;
enum SQL_FN_STR_RIGHT = 0x00000200L;
enum SQL_FN_STR_RTRIM = 0x00000400L;
enum SQL_FN_STR_SOUNDEX = 0x00020000L;
enum SQL_FN_STR_SPACE = 0x00040000L;
enum SQL_FN_STR_SUBSTRING = 0x00000800L;
enum SQL_FN_STR_UCASE = 0x00001000L;
enum SQL_FN_SYS_DBNAME = 0x00000002L;
enum SQL_FN_SYS_IFNULL = 0x00000004L;
enum SQL_FN_SYS_USERNAME = 0x00000001L;
enum SQL_FN_TD_CURDATE = 0x00000002L;
enum SQL_FN_TD_CURTIME = 0x00000200L;
enum SQL_FN_TD_DAYNAME = 0x00008000L;
enum SQL_FN_TD_DAYOFMONTH = 0x00000004L;
enum SQL_FN_TD_DAYOFWEEK = 0x00000008L;
enum SQL_FN_TD_DAYOFYEAR = 0x00000010L;
enum SQL_FN_TD_HOUR = 0x00000400L;
enum SQL_FN_TD_MINUTE = 0x00000800L;
enum SQL_FN_TD_MONTH = 0x00000020L;
enum SQL_FN_TD_MONTHNAME = 0x00010000L;
enum SQL_FN_TD_NOW = 0x00000001L;
enum SQL_FN_TD_QUARTER = 0x00000040L;
enum SQL_FN_TD_SECOND = 0x00001000L;
enum SQL_FN_TD_TIMESTAMPADD = 0x00002000L;
enum SQL_FN_TD_TIMESTAMPDIFF = 0x00004000L;
enum SQL_FN_TD_WEEK = 0x00000080L;
enum SQL_FN_TD_YEAR = 0x00000100L;
enum SQL_FN_TSI_DAY = 0x00000010L;
enum SQL_FN_TSI_FRAC_SECOND = 0x00000001L;
enum SQL_FN_TSI_HOUR = 0x00000008L;
enum SQL_FN_TSI_MINUTE = 0x00000004L;
enum SQL_FN_TSI_MONTH = 0x00000040L;
enum SQL_FN_TSI_QUARTER = 0x00000080L;
enum SQL_FN_TSI_SECOND = 0x00000002L;
enum SQL_FN_TSI_WEEK = 0x00000020L;
enum SQL_FN_TSI_YEAR = 0x00000100L;
enum SQL_GB_GROUP_BY_CONTAINS_SELECT = 2;
enum SQL_GB_GROUP_BY_EQUALS_SELECT = 1;
enum SQL_GB_NO_RELATION = 3;
enum SQL_GB_NOT_SUPPORTED = 0;
enum SQL_GD_BLOCK = 4;
enum SQL_GD_BOUND = 8;
enum SQL_GET_BOOKMARK = 13;
enum SQL_GROUP_BY = 88;
enum SQL_IGNORE = -6;
enum SQL_INFO_FIRST = 0;
enum SQL_KEYSET_SIZE = 8;
enum SQL_KEYSET_SIZE_DEFAULT = 0UL;
enum SQL_KEYWORDS = 89;
enum SQL_LCK_EXCLUSIVE = 2;
enum SQL_LCK_NO_CHANGE = 1;
enum SQL_LCK_UNLOCK = 4;

enum SQL_LEN_BINARY_ATTR_OFFSET  = -100;
enum SQL_LEN_DATA_AT_EXEC_OFFSET = -100;
//MACRO #define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET)
//MACRO #define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET)

enum SQL_LIKE_ESCAPE_CLAUSE = 113;
enum SQL_LIKE_ONLY = 1;
enum SQL_LOCK_EXCLUSIVE = 1;
enum SQL_LOCK_NO_CHANGE = 0;
enum SQL_LOCK_TYPES = 78;
enum SQL_LOCK_UNLOCK = 2;
enum SQL_LOGIN_TIMEOUT = 103;
enum SQL_LOGIN_TIMEOUT_DEFAULT = 15UL;
enum SQL_LONGVARBINARY = -4;
enum SQL_LONGVARCHAR = -1;
enum SQL_MAX_BINARY_LITERAL_LEN = 112;
enum SQL_MAX_CHAR_LITERAL_LEN = 108;
enum SQL_MAX_DSN_LENGTH = 32;
enum SQL_MAX_LENGTH = 3;
enum SQL_MAX_LENGTH_DEFAULT = 0UL;
enum SQL_MAX_OPTION_STRING_LENGTH = 256;
enum SQL_MAX_OWNER_NAME_LEN = 32;
enum SQL_MAX_PROCEDURE_NAME_LEN = 33;
enum SQL_MAX_QUALIFIER_NAME_LEN = 34;
enum SQL_MAX_ROW_SIZE_INCLUDES_LONG = 103;
enum SQL_MAX_ROWS = 1;
enum SQL_MAX_ROWS_DEFAULT = 0UL;

enum SQL_MODE_READ_WRITE = 0UL;
enum SQL_MODE_READ_ONLY = 1UL;
enum SQL_MODE_DEFAULT = SQL_MODE_READ_WRITE;

enum SQL_MULT_RESULT_SETS = 36;
enum SQL_MULTIPLE_ACTIVE_TXN = 37;
enum SQL_NC_END = 0x0004;
enum SQL_NC_START = 0x0002;
enum SQL_NEED_LONG_DATA_LEN = 111;
enum SQL_NNC_NON_NULL = 0x0001;
enum SQL_NNC_NULL = 0x0000;
enum SQL_NO_TOTAL = -4;
enum SQL_NON_NULLABLE_COLUMNS = 75;

enum SQL_NOSCAN_OFF = 0UL;
enum SQL_NOSCAN_ON = 1UL;
enum SQL_NOSCAN = 2;
enum SQL_NOSCAN_DEFAULT = SQL_NOSCAN_OFF;

enum SQL_NUMERIC_FUNCTIONS = 49;
enum SQL_OAC_LEVEL1 = 0x0001;
enum SQL_OAC_LEVEL2 = 0x0002;
enum SQL_OAC_NONE = 0x0000;
enum SQL_ODBC_API_CONFORMANCE = 9;
enum SQL_ODBC_CURSORS = 110;
enum SQL_ODBC_SAG_CLI_CONFORMANCE = 12;
enum SQL_ODBC_SQL_CONFORMANCE = 15;
enum SQL_ODBC_SQL_OPT_IEF = 73;
enum SQL_ODBC_VER = 10;
enum SQL_OPT_TRACE = 104;

enum SQL_OPT_TRACE_FILE_DEFAULT = "\\SQL.LOG";
enum SQL_OPT_TRACE_OFF = 0UL;
enum SQL_OPT_TRACE_DEFAULT = SQL_OPT_TRACE_OFF;
enum SQL_OPT_TRACE_ON = 1UL;

enum SQL_OPT_TRACEFILE = 105;
enum SQL_OSC_CORE = 1;
enum SQL_OSC_EXTENDED = 2;
enum SQL_OSC_MINIMUM = 0;
enum SQL_OSCC_COMPLIANT = 1;
enum SQL_OSCC_NOT_COMPLIANT = 0;
enum SQL_OU_DML_STATEMENTS = 1;
enum SQL_OU_INDEX_DEFINITION = 8;
enum SQL_OU_PRIVILEGE_DEFINITION = 16;
enum SQL_OU_PROCEDURE_INVOCATION = 2;
enum SQL_OU_TABLE_DEFINITION = 4;
enum SQL_OUTER_JOINS = 38;
enum SQL_OWNER_TERM = 39;
enum SQL_OWNER_USAGE = 91;
enum SQL_PACKET_SIZE = 112;
enum SQL_PARAM_INPUT = 1;
enum SQL_PARAM_INPUT_OUTPUT = 2;
enum SQL_PARAM_OUTPUT = 4;
enum SQL_PARAM_TYPE_DEFAULT = SQL_PARAM_INPUT_OUTPUT;
enum SQL_PARAM_TYPE_UNKNOWN = 0;
enum SQL_PC_NOT_PSEUDO = 1;
enum SQL_POS_ADD = 16;
enum SQL_POS_DELETE = 8;
enum SQL_POS_OPERATIONS = 79;
enum SQL_POS_POSITION = 1;
enum SQL_POS_REFRESH = 2;
enum SQL_POS_UPDATE = 4;
enum SQL_POSITION = 0;
enum SQL_POSITIONED_STATEMENTS = 80;
enum SQL_PROCEDURE_TERM = 40;
enum SQL_PROCEDURES = 21;
enum SQL_PS_POSITIONED_DELETE = 1;
enum SQL_PS_POSITIONED_UPDATE = 2;
enum SQL_PS_SELECT_FOR_UPDATE = 4;
enum SQL_PT_FUNCTION = 2;
enum SQL_PT_PROCEDURE = 1;
enum SQL_PT_UNKNOWN = 0;
enum SQL_QL_END = 0x0002;
enum SQL_QL_START = 0x0001;
enum SQL_QU_DML_STATEMENTS = 1;
enum SQL_QU_INDEX_DEFINITION = 8;
enum SQL_QU_PRIVILEGE_DEFINITION = 16;
enum SQL_QU_PROCEDURE_INVOCATION = 2;
enum SQL_QU_TABLE_DEFINITION = 4;
enum SQL_QUALIFIER_LOCATION = 114;
enum SQL_QUALIFIER_NAME_SEPARATOR = 41;
enum SQL_QUALIFIER_TERM = 42;
enum SQL_QUALIFIER_USAGE = 92;
enum SQL_QUERY_TIMEOUT = 0;
enum SQL_QUERY_TIMEOUT_DEFAULT = 0UL;
enum SQL_QUICK = 0;
enum SQL_QUIET_MODE = 111;
enum SQL_QUOTED_IDENTIFIER_CASE = 93;

enum SQL_RD_OFF = 0UL;
enum SQL_RD_ON = 1UL;
enum SQL_RD_DEFAULT = SQL_RD_ON;

enum SQL_REFRESH = 1;
enum SQL_RESTRICT = 1;
enum SQL_RESULT_COL = 3;
enum SQL_RETRIEVE_DATA = 11;
enum SQL_RETURN_VALUE = 5;
enum SQL_ROW_ADDED = 4;
enum SQL_ROW_DELETED = 1;
enum SQL_ROW_ERROR = 5;
enum SQL_ROW_NOROW = 3;
enum SQL_ROW_NUMBER = 14;
enum SQL_ROW_SUCCESS = 0;
enum SQL_ROW_UPDATED = 2;
enum SQL_ROW_UPDATES = 11;
enum SQL_ROWSET_SIZE = 9;
enum SQL_ROWSET_SIZE_DEFAULT = 1UL;
enum SQL_ROWVER = 2;
enum SQL_SC_NON_UNIQUE = 0UL;
enum SQL_SC_TRY_UNIQUE = 1UL;
enum SQL_SC_UNIQUE = 2UL;
enum SQL_SCCO_OPT_TIMESTAMP = SQL_SCCO_OPT_ROWVER;/* deprecated */
enum SQL_SCROLL_DYNAMIC = -2L;/* deprecated */
enum SQL_SCROLL_FORWARD_ONLY = 0L;/* deprecated */
enum SQL_SCROLL_KEYSET_DRIVEN = -1L;/* deprecated */
enum SQL_SCROLL_OPTIONS = 44;
enum SQL_SCROLL_STATIC = -3L;/* deprecated */
enum SQL_SEARCHABLE = 3;
enum SQL_SET_NULL = 2;
enum SQL_SETPARAM_VALUE_MAX = -1L;
enum SQL_SETPOS_MAX_LOCK_VALUE = SQL_LOCK_UNLOCK;
enum SQL_SETPOS_MAX_OPTION_VALUE = SQL_ADD;
enum SQL_SIMULATE_CURSOR = 10;
enum SQL_SO_DYNAMIC = 4;
enum SQL_SO_FORWARD_ONLY = 1;
enum SQL_SO_KEYSET_DRIVEN = 2;
enum SQL_SO_MIXED = 8;
enum SQL_SO_STATIC = 16;
enum SQL_SQ_COMPARISON = 1;
enum SQL_SQ_CORRELATED_SUBQUERIES = 16;
enum SQL_SQ_EXISTS = 2;
enum SQL_SQ_IN = 4;
enum SQL_SQ_QUANTIFIED = 8;
enum SQL_SQLSTATE_SIZE = 5;
enum SQL_SS_ADDITIONS = 1;
enum SQL_SS_DELETIONS = 2;
enum SQL_SS_UPDATES = 4;
enum SQL_STATIC_SENSITIVITY = 83;
enum SQL_STRING_FUNCTIONS = 50;
enum SQL_SUBQUERIES = 95;
enum SQL_SYSTEM_FUNCTIONS = 51;
enum SQL_TABLE_STAT = 0;
enum SQL_TABLE_TERM = 45;
enum SQL_TIMEDATE_ADD_INTERVALS = 109;
enum SQL_TIMEDATE_DIFF_INTERVALS = 110;
enum SQL_TIMEDATE_FUNCTIONS = 52;
enum SQL_TRANSLATE_DLL = 106;
enum SQL_TRANSLATE_OPTION = 107;
enum SQL_TXN_ISOLATION = 108;
enum SQL_TXN_VERSIONING = 16;
enum SQL_TYPE_NULL = 0;
enum SQL_U_UNION = 1;
enum SQL_U_UNION_ALL = 2;

enum SQL_UB_OFF = 0UL;
enum SQL_UB_DEFAULT = SQL_UB_OFF;
enum SQL_UB_ON = 1UL;

enum SQL_UNION = 96;
enum SQL_UNSEARCHABLE = 0;
enum SQL_UPDATE = 2;
enum SQL_USE_BOOKMARKS = 12;
enum SQL_VARBINARY = -3;

enum SQL_COLATT_OPT_MAX = SQL_COLUMN_LABEL;
enum SQL_COLATT_OPT_MIN = SQL_COLUMN_COUNT;
enum SQL_PRED_SEARCHABLE = SQL_SEARCHABLE;

//MACRO #define SQL_POSITION_TO(s, r) SQLSetPos(s, r, SQL_POSITION, SQL_LOCK_NO_CHANGE)

//MACRO #define SQL_LOCK_RECORD(s, r, l) SQLSetPos(s, r, SQL_POSITION, l)

//MACRO #define SQL_REFRESH_RECORD(s, r, l) SQLSetPos(s, r, SQL_REFRESH, l)

//MACRO #define SQL_UPDATE_RECORD(s, r) SQLSetPos(s, r, SQL_UPDATE, SQL_LOCK_NO_CHANGE)

//MACRO #define SQL_DELETE_RECORD(s, r) SQLSetPos(s, r, SQL_DELETE, SQL_LOCK_NO_CHANGE)

//MACRO #define SQL_ADD_RECORD(s, r) SQLSetPos(s, r, SQL_ADD, SQL_LOCK_NO_CHANGE)


static if (ODBCVER < 0x0300) {
enum SQL_CONNECT_OPT_DRVR_START = 1000;
enum SQL_CONN_OPT_MAX = SQL_PACKET_SIZE;
enum SQL_CONN_OPT_MIN = SQL_ACCESS_MODE;
enum SQL_STMT_OPT_MAX = SQL_ROW_NUMBER;
enum SQL_STMT_OPT_MIN = SQL_QUERY_TIMEOUT;
enum SQL_TYPE_DRIVER_START = SQL_INTERVAL_YEAR;
enum SQL_TYPE_DRIVER_END = SQL_UNICODE_LONGVARCHAR;
enum SQL_TYPE_MIN = SQL_BIT;
enum SQL_TYPE_MAX = SQL_VARCHAR;
}

static if (ODBCVER < 0x0300) {
enum SQL_NO_DATA_FOUND = 100;
enum SQL_INTERVAL_YEAR = -80;
enum SQL_INTERVAL_MONTH = -81;
enum SQL_INTERVAL_YEAR_TO_MONTH = -82;
enum SQL_INTERVAL_DAY = -83;
enum SQL_INTERVAL_HOUR = -84;
enum SQL_INTERVAL_MINUTE = -85;
enum SQL_INTERVAL_SECOND = -86;
enum SQL_INTERVAL_DAY_TO_HOUR = -87;
enum SQL_INTERVAL_DAY_TO_MINUTE = -88;
enum SQL_INTERVAL_DAY_TO_SECOND = -89;
enum SQL_INTERVAL_HOUR_TO_MINUTE = -90;
enum SQL_INTERVAL_HOUR_TO_SECOND = -91;
enum SQL_INTERVAL_MINUTE_TO_SECOND = -92;
} else {
enum SQL_NO_DATA_FOUND = SQL_NO_DATA;
enum SQL_CODE_YEAR = 1;
enum SQL_CODE_MONTH = 2;
enum SQL_CODE_DAY = 3;
enum SQL_CODE_HOUR = 4;
enum SQL_CODE_MINUTE = 5;
enum SQL_CODE_SECOND = 6;
enum SQL_CODE_YEAR_TO_MONTH = 7;
enum SQL_CODE_DAY_TO_HOUR = 8;
enum SQL_CODE_DAY_TO_MINUTE = 9;
enum SQL_CODE_DAY_TO_SECOND = 10;
enum SQL_CODE_HOUR_TO_MINUTE = 11;
enum SQL_CODE_HOUR_TO_SECOND = 12;
enum SQL_CODE_MINUTE_TO_SECOND = 13;
enum SQL_INTERVAL_YEAR = 100 + SQL_CODE_YEAR;
enum SQL_INTERVAL_MONTH = 100 + SQL_CODE_MONTH;
enum SQL_INTERVAL_DAY = 100 + SQL_CODE_DAY;
enum SQL_INTERVAL_HOUR = 100 + SQL_CODE_HOUR;
enum SQL_INTERVAL_MINUTE = 100 + SQL_CODE_MINUTE;
enum SQL_INTERVAL_SECOND = 100 + SQL_CODE_SECOND;
enum SQL_INTERVAL_YEAR_TO_MONTH = 100 + SQL_CODE_YEAR_TO_MONTH;
enum SQL_INTERVAL_DAY_TO_HOUR = 100 + SQL_CODE_DAY_TO_HOUR;
enum SQL_INTERVAL_DAY_TO_MINUTE = 100 + SQL_CODE_DAY_TO_MINUTE;
enum SQL_INTERVAL_DAY_TO_SECOND = 100 + SQL_CODE_DAY_TO_SECOND;
enum SQL_INTERVAL_HOUR_TO_MINUTE = 100 + SQL_CODE_HOUR_TO_MINUTE;
enum SQL_INTERVAL_HOUR_TO_SECOND = 100 + SQL_CODE_HOUR_TO_SECOND;
enum SQL_INTERVAL_MINUTE_TO_SECOND = 100 + SQL_CODE_MINUTE_TO_SECOND;
}//[Yes] #endif


static if ((ODBCVER >= 0x0201) && (ODBCVER < 0x0300)) {
enum SQL_OJ_CAPABILITIES = 65003;
}

static if (ODBCVER >= 0x0250) {
enum SQL_NO_ACTION   = 3;
enum SQL_SET_DEFAULT = 4;
}

static if (ODBCVER >= 0x0300) {
enum SQL_ACTIVE_ENVIRONMENTS = 116;
enum SQL_AD_ADD_CONSTRAINT_DEFERRABLE = 0x00000080L;
enum SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED = 0x00000020L;
enum SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE = 0x00000040L;
enum SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE = 0x00000100L;
enum SQL_AD_ADD_DOMAIN_CONSTRAINT = 0x00000002L;
enum SQL_AD_ADD_DOMAIN_DEFAULT = 0x00000008L;
enum SQL_AD_CONSTRAINT_NAME_DEFINITION = 0x00000001L;
enum SQL_AD_DROP_DOMAIN_CONSTRAINT = 0x00000004L;
enum SQL_AD_DROP_DOMAIN_DEFAULT = 0x00000010L;
enum SQL_AF_ALL = 0x00000040L;
enum SQL_AF_AVG = 0x00000001L;
enum SQL_AF_COUNT = 0x00000002L;
enum SQL_AF_DISTINCT = 0x00000020L;
enum SQL_AF_MAX = 0x00000004L;
enum SQL_AF_MIN = 0x00000008L;
enum SQL_AF_SUM = 0x00000010L;
enum SQL_AGGREGATE_FUNCTIONS = 169;
enum SQL_ALL_CATALOGS = "%";
enum SQL_ALL_SCHEMAS = "%";
enum SQL_ALL_TABLE_TYPES = "%";
enum SQL_ALTER_DOMAIN = 117;
enum SQL_AM_CONNECTION = 1;
enum SQL_AM_NONE = 0;
enum SQL_AM_STATEMENT = 2;
enum SQL_API_ODBC3_ALL_FUNCTIONS = 999;
enum SQL_API_ODBC3_ALL_FUNCTIONS_SIZE = 250;
enum SQL_API_SQLALLOCHANDLESTD = 73;
enum SQL_API_SQLBULKOPERATIONS = 24;
enum SQL_ASYNC_MODE = 10021;
enum SQL_AT_ADD_COLUMN_COLLATION = 0x00000080L;
enum SQL_AT_ADD_COLUMN_DEFAULT = 0x00000040L;
enum SQL_AT_ADD_COLUMN_SINGLE = 0x00000020L;
enum SQL_AT_ADD_TABLE_CONSTRAINT = 0x00001000L;
enum SQL_AT_CONSTRAINT_DEFERRABLE = 0x00040000L;
enum SQL_AT_CONSTRAINT_INITIALLY_DEFERRED = 0x00010000L;
enum SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE = 0x00020000L;
enum SQL_AT_CONSTRAINT_NAME_DEFINITION = 0x00008000L;
enum SQL_AT_CONSTRAINT_NON_DEFERRABLE = 0x00080000L;
enum SQL_AT_DROP_COLUMN_CASCADE = 0x00000400L;
enum SQL_AT_DROP_COLUMN_DEFAULT = 0x00000200L;
enum SQL_AT_DROP_COLUMN_RESTRICT = 0x00000800L;
enum SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE = 0x00002000L;
enum SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT = 0x00004000L;
enum SQL_AT_SET_COLUMN_DEFAULT = 0x00000100L;
enum SQL_ATTR_ACCESS_MODE = SQL_ACCESS_MODE;
enum SQL_ATTR_ASYNC_ENABLE = 4;
enum SQL_ATTR_AUTOCOMMIT = SQL_AUTOCOMMIT;
enum SQL_ATTR_CONCURRENCY = SQL_CONCURRENCY;
enum SQL_ATTR_CONNECTION_POOLING = 201;
enum SQL_ATTR_CONNECTION_TIMEOUT = 113;
enum SQL_ATTR_CP_MATCH = 202;
enum SQL_ATTR_CURRENT_CATALOG = SQL_CURRENT_QUALIFIER;
enum SQL_ATTR_CURSOR_TYPE = SQL_CURSOR_TYPE;
enum SQL_ATTR_DISCONNECT_BEHAVIOR = 114;
enum SQL_ATTR_ENABLE_AUTO_IPD = 15;
enum SQL_ATTR_ENLIST_IN_DTC = 1207;
enum SQL_ATTR_ENLIST_IN_XA = 1208;
enum SQL_ATTR_FETCH_BOOKMARK_PTR = 16;
enum SQL_ATTR_KEYSET_SIZE = SQL_KEYSET_SIZE;
enum SQL_ATTR_LOGIN_TIMEOUT = SQL_LOGIN_TIMEOUT;
enum SQL_ATTR_MAX_LENGTH = SQL_MAX_LENGTH;
enum SQL_ATTR_MAX_ROWS = SQL_MAX_ROWS;
enum SQL_ATTR_NOSCAN = SQL_NOSCAN;
enum SQL_ATTR_ODBC_CURSORS = SQL_ODBC_CURSORS;
enum SQL_ATTR_ODBC_VERSION = 200;
enum SQL_ATTR_PACKET_SIZE = SQL_PACKET_SIZE;
enum SQL_ATTR_PARAM_BIND_OFFSET_PTR = 17;
enum SQL_ATTR_PARAM_BIND_TYPE = 18;
enum SQL_ATTR_PARAM_OPERATION_PTR = 19;
enum SQL_ATTR_PARAM_STATUS_PTR = 20;
enum SQL_ATTR_PARAMS_PROCESSED_PTR = 21;
enum SQL_ATTR_PARAMSET_SIZE = 22;
enum SQL_ATTR_QUERY_TIMEOUT = SQL_QUERY_TIMEOUT;
enum SQL_ATTR_QUIET_MODE = SQL_QUIET_MODE;
enum SQL_ATTR_RETRIEVE_DATA = SQL_RETRIEVE_DATA;
enum SQL_ATTR_ROW_ARRAY_SIZE = 27;
enum SQL_ATTR_ROW_BIND_OFFSET_PTR = 23;
enum SQL_ATTR_ROW_BIND_TYPE = SQL_BIND_TYPE;
enum SQL_ATTR_ROW_NUMBER = SQL_ROW_NUMBER;
enum SQL_ATTR_ROW_OPERATION_PTR = 24;
enum SQL_ATTR_ROW_STATUS_PTR = 25;
enum SQL_ATTR_ROWS_FETCHED_PTR = 26;
enum SQL_ATTR_SIMULATE_CURSOR = SQL_SIMULATE_CURSOR;
enum SQL_ATTR_TRACE = SQL_OPT_TRACE;
enum SQL_ATTR_TRACEFILE = SQL_OPT_TRACEFILE;
enum SQL_ATTR_TRANSLATE_LIB = SQL_TRANSLATE_DLL;
enum SQL_ATTR_TRANSLATE_OPTION = SQL_TRANSLATE_OPTION;
enum SQL_ATTR_TXN_ISOLATION = SQL_TXN_ISOLATION;
enum SQL_ATTR_USE_BOOKMARKS = SQL_USE_BOOKMARKS;
enum SQL_BATCH_ROW_COUNT = 120;
enum SQL_BATCH_SUPPORT = 121;
enum SQL_BRC_EXPLICIT = 0x0000002;
enum SQL_BRC_PROCEDURES = 0x0000001;
enum SQL_BRC_ROLLED_UP = 0x0000004;
enum SQL_BS_ROW_COUNT_EXPLICIT = 0x00000002L;
enum SQL_BS_ROW_COUNT_PROC = 0x00000008L;
enum SQL_BS_SELECT_EXPLICIT = 0x00000001L;
enum SQL_BS_SELECT_PROC = 0x00000004L;
enum SQL_C_INTERVAL_DAY = SQL_INTERVAL_DAY;
enum SQL_C_INTERVAL_DAY_TO_HOUR = SQL_INTERVAL_DAY_TO_HOUR;
enum SQL_C_INTERVAL_DAY_TO_MINUTE = SQL_INTERVAL_DAY_TO_MINUTE;
enum SQL_C_INTERVAL_DAY_TO_SECOND = SQL_INTERVAL_DAY_TO_SECOND;
enum SQL_C_INTERVAL_HOUR = SQL_INTERVAL_HOUR;
enum SQL_C_INTERVAL_HOUR_TO_MINUTE = SQL_INTERVAL_HOUR_TO_MINUTE;
enum SQL_C_INTERVAL_HOUR_TO_SECOND = SQL_INTERVAL_HOUR_TO_SECOND;
enum SQL_C_INTERVAL_MINUTE = SQL_INTERVAL_MINUTE;
enum SQL_C_INTERVAL_MINUTE_TO_SECOND = SQL_INTERVAL_MINUTE_TO_SECOND;
enum SQL_C_INTERVAL_MONTH = SQL_INTERVAL_MONTH;
enum SQL_C_INTERVAL_SECOND = SQL_INTERVAL_SECOND;
enum SQL_C_INTERVAL_YEAR = SQL_INTERVAL_YEAR;
enum SQL_C_INTERVAL_YEAR_TO_MONTH = SQL_INTERVAL_YEAR_TO_MONTH;
enum SQL_C_NUMERIC = SQL_NUMERIC;
enum SQL_C_SBIGINT = SQL_BIGINT+SQL_SIGNED_OFFSET;
enum SQL_C_TYPE_DATE = SQL_TYPE_DATE;
enum SQL_C_TYPE_TIME = SQL_TYPE_TIME;
enum SQL_C_TYPE_TIMESTAMP = SQL_TYPE_TIMESTAMP;
enum SQL_C_UBIGINT = SQL_BIGINT+SQL_UNSIGNED_OFFSET;
enum SQL_C_VARBOOKMARK = SQL_C_BINARY;
enum SQL_CA_CONSTRAINT_DEFERRABLE = 0x00000040L;
enum SQL_CA_CONSTRAINT_INITIALLY_DEFERRED = 0x00000010L;
enum SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE = 0x00000020L;
enum SQL_CA_CONSTRAINT_NON_DEFERRABLE = 0x00000080L;
enum SQL_CA_CREATE_ASSERTION = 0x00000001L;
enum SQL_CA1_ABSOLUTE = 0x00000002L;
enum SQL_CA1_BOOKMARK = 0x00000008L;
enum SQL_CA1_BULK_ADD = 0x00010000L;
enum SQL_CA1_BULK_DELETE_BY_BOOKMARK = 0x00040000L;
enum SQL_CA1_BULK_FETCH_BY_BOOKMARK = 0x00080000L;
enum SQL_CA1_BULK_UPDATE_BY_BOOKMARK = 0x00020000L;
enum SQL_CA1_LOCK_EXCLUSIVE = 0x00000080L;
enum SQL_CA1_LOCK_NO_CHANGE = 0x00000040L;
enum SQL_CA1_LOCK_UNLOCK = 0x00000100L;
enum SQL_CA1_NEXT = 0x00000001L;
enum SQL_CA1_POS_DELETE = 0x00000800L;
enum SQL_CA1_POS_POSITION = 0x00000200L;
enum SQL_CA1_POS_REFRESH = 0x00001000L;
enum SQL_CA1_POS_UPDATE = 0x00000400L;
enum SQL_CA1_POSITIONED_DELETE = 0x00004000L;
enum SQL_CA1_POSITIONED_UPDATE = 0x00002000L;
enum SQL_CA1_RELATIVE = 0x00000004L;
enum SQL_CA1_SELECT_FOR_UPDATE = 0x00008000L;
enum SQL_CA2_CRC_APPROXIMATE = 0x00002000L;
enum SQL_CA2_CRC_EXACT = 0x00001000L;
enum SQL_CA2_LOCK_CONCURRENCY = 0x00000002L;

enum SQL_CA2_MAX_ROWS_CATALOG = 0x00000800L;
enum SQL_CA2_MAX_ROWS_DELETE  = 0x00000200L;
enum SQL_CA2_MAX_ROWS_INSERT  = 0x00000100L;
enum SQL_CA2_MAX_ROWS_SELECT  = 0x00000080L;
enum SQL_CA2_MAX_ROWS_UPDATE  = 0x00000400L;
enum 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;

enum SQL_CA2_OPT_ROWVER_CONCURRENCY = 0x00000004L;
enum SQL_CA2_OPT_VALUES_CONCURRENCY = 0x00000008L;
enum SQL_CA2_READ_ONLY_CONCURRENCY = 0x00000001L;
enum SQL_CA2_SENSITIVITY_ADDITIONS = 0x00000010L;
enum SQL_CA2_SENSITIVITY_DELETIONS = 0x00000020L;
enum SQL_CA2_SENSITIVITY_UPDATES = 0x00000040L;
enum SQL_CA2_SIMULATE_NON_UNIQUE = 0x00004000L;
enum SQL_CA2_SIMULATE_TRY_UNIQUE = 0x00008000L;
enum SQL_CA2_SIMULATE_UNIQUE = 0x00010000L;
enum SQL_CATALOG_LOCATION = SQL_QUALIFIER_LOCATION;
enum SQL_CATALOG_NAME_SEPARATOR = SQL_QUALIFIER_NAME_SEPARATOR;
enum SQL_CATALOG_TERM = SQL_QUALIFIER_TERM;
enum SQL_CATALOG_USAGE = SQL_QUALIFIER_USAGE;
enum SQL_CCOL_CREATE_COLLATION = 0x00000001L;
enum SQL_CCS_COLLATE_CLAUSE = 0x00000002L;
enum SQL_CCS_CREATE_CHARACTER_SET = 0x00000001L;
enum SQL_CCS_LIMITED_COLLATION = 0x00000004L;
enum SQL_CDO_COLLATION = 0x00000008L;
enum SQL_CDO_CONSTRAINT = 0x00000004L;
enum SQL_CDO_CONSTRAINT_DEFERRABLE = 0x00000080L;
enum SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED = 0x00000020L;
enum SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE = 0x00000040L;
enum SQL_CDO_CONSTRAINT_NAME_DEFINITION = 0x00000010L;
enum SQL_CDO_CONSTRAINT_NON_DEFERRABLE = 0x00000100L;
enum SQL_CDO_CREATE_DOMAIN = 0x00000001L;
enum SQL_CDO_DEFAULT = 0x00000002L;
enum SQL_CL_END = SQL_QL_END;
enum SQL_CL_START = SQL_QL_START;
enum SQL_COL_PRED_BASIC = SQL_ALL_EXCEPT_LIKE;
enum SQL_COL_PRED_CHAR = SQL_LIKE_ONLY;
enum SQL_COLUMN_DRIVER_START = 1000;
enum SQL_COLUMN_IGNORE = SQL_IGNORE;
enum SQL_COLUMN_NUMBER_UNKNOWN = -2;
enum SQL_CONVERT_GUID = 173;

enum SQL_CONVERT_WCHAR               = 122;
enum SQL_CONVERT_INTERVAL_DAY_TIME   = 123;
enum SQL_CONVERT_INTERVAL_YEAR_MONTH = 124;
enum SQL_CONVERT_WLONGVARCHAR        = 125;
enum SQL_CONVERT_WVARCHAR            = 126;

enum SQL_CREATE_ASSERTION     = 127;
enum SQL_CREATE_CHARACTER_SET = 128;
enum SQL_CREATE_COLLATION     = 129;
enum SQL_CREATE_DOMAIN        = 130;
enum SQL_CREATE_SCHEMA        = 131;
enum SQL_CREATE_TABLE         = 132;
enum SQL_CREATE_TRANSLATION   = 133;
enum SQL_CREATE_VIEW          = 134;


enum SQL_CP_OFF            = 0UL;
enum SQL_CP_DEFAULT        = SQL_CP_OFF;
enum SQL_CP_ONE_PER_DRIVER = 1UL;
enum SQL_CP_ONE_PER_HENV   = 2UL;

enum SQL_CP_STRICT_MATCH  = 0UL;
enum SQL_CP_MATCH_DEFAULT = SQL_CP_STRICT_MATCH;
enum SQL_CP_RELAXED_MATCH = 1UL;

enum SQL_CS_CREATE_SCHEMA         = 0x00000001L;
enum SQL_CS_AUTHORIZATION         = 0x00000002L;
enum SQL_CS_DEFAULT_CHARACTER_SET = 0x00000004L;

enum SQL_CT_COLUMN_COLLATION = 0x00000800L;
enum SQL_CT_COLUMN_CONSTRAINT = 0x00000200L;
enum SQL_CT_COLUMN_DEFAULT = 0x00000400L;
enum SQL_CT_COMMIT_DELETE = 0x00000004L;
enum SQL_CT_COMMIT_PRESERVE = 0x00000002L;
enum SQL_CT_CONSTRAINT_DEFERRABLE = 0x00000080L;
enum SQL_CT_CONSTRAINT_INITIALLY_DEFERRED = 0x00000020L;
enum SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE = 0x00000040L;
enum SQL_CT_CONSTRAINT_NAME_DEFINITION = 0x00002000L;
enum SQL_CT_CONSTRAINT_NON_DEFERRABLE = 0x00000100L;
enum SQL_CT_CREATE_TABLE = 0x00000001L;
enum SQL_CT_GLOBAL_TEMPORARY = 0x00000008L;
enum SQL_CT_LOCAL_TEMPORARY = 0x00000010L;
enum SQL_CT_TABLE_CONSTRAINT = 0x00001000L;

enum SQL_CTR_CREATE_TRANSLATION = 0x00000001L;

enum SQL_CU_DML_STATEMENTS = SQL_QU_DML_STATEMENTS;
enum SQL_CU_INDEX_DEFINITION = SQL_QU_INDEX_DEFINITION;
enum SQL_CU_PRIVILEGE_DEFINITION = SQL_QU_PRIVILEGE_DEFINITION;
enum SQL_CU_PROCEDURE_INVOCATION = SQL_QU_PROCEDURE_INVOCATION;
enum SQL_CU_TABLE_DEFINITION = SQL_QU_TABLE_DEFINITION;

enum SQL_CVT_INTERVAL_YEAR_MONTH = 0x00080000L;
enum SQL_CVT_INTERVAL_DAY_TIME   = 0x00100000L;
enum SQL_CVT_WCHAR               = 0x00200000L;
enum SQL_CVT_WLONGVARCHAR        = 0x00400000L;
enum SQL_CVT_WVARCHAR            = 0x00800000L;
enum SQL_CVT_GUID                = 0x01000000L;

enum SQL_DA_DROP_ASSERTION = 0x00000001L;
enum SQL_DATETIME_LITERALS = 119;

enum SQL_DB_DISCONNECT     = 1UL;
enum SQL_DB_RETURN_TO_POOL = 0UL;
enum SQL_DB_DEFAULT        = SQL_DB_RETURN_TO_POOL;

enum SQL_DC_DROP_COLLATION = 0x00000001L;
enum SQL_DCS_DROP_CHARACTER_SET = 0x00000001L;
enum SQL_DD_CASCADE = 0x00000004L;
enum SQL_DD_DROP_DOMAIN = 0x00000001L;
enum SQL_DD_RESTRICT = 0x00000002L;
enum SQL_DDL_INDEX = 170;
enum SQL_DELETE_BY_BOOKMARK = 6;
enum SQL_DESC_ARRAY_SIZE = 20;
enum SQL_DESC_ARRAY_STATUS_PTR = 21;
enum SQL_DESC_AUTO_UNIQUE_VALUE = SQL_COLUMN_AUTO_INCREMENT;
enum SQL_DESC_BASE_COLUMN_NAME = 22;
enum SQL_DESC_BASE_TABLE_NAME = 23;
enum SQL_DESC_BIND_OFFSET_PTR = 24;
enum SQL_DESC_BIND_TYPE = 25;
enum SQL_DESC_CASE_SENSITIVE = SQL_COLUMN_CASE_SENSITIVE;
enum SQL_DESC_CATALOG_NAME = SQL_COLUMN_QUALIFIER_NAME;
enum SQL_DESC_CONCISE_TYPE = SQL_COLUMN_TYPE;
enum SQL_DESC_DATETIME_INTERVAL_PRECISION = 26;
enum SQL_DESC_DISPLAY_SIZE = SQL_COLUMN_DISPLAY_SIZE;
enum SQL_DESC_FIXED_PREC_SCALE = SQL_COLUMN_MONEY;
enum SQL_DESC_LABEL = SQL_COLUMN_LABEL;
enum SQL_DESC_LITERAL_PREFIX = 27;
enum SQL_DESC_LITERAL_SUFFIX = 28;
enum SQL_DESC_LOCAL_TYPE_NAME = 29;
enum SQL_DESC_MAXIMUM_SCALE = 30;
enum SQL_DESC_MINIMUM_SCALE = 31;
enum SQL_DESC_NUM_PREC_RADIX = 32;
enum SQL_DESC_PARAMETER_TYPE = 33;
enum SQL_DESC_ROWS_PROCESSED_PTR = 34;
enum SQL_DESC_SCHEMA_NAME = SQL_COLUMN_OWNER_NAME;
enum SQL_DESC_SEARCHABLE = SQL_COLUMN_SEARCHABLE;
enum SQL_DESC_TABLE_NAME = SQL_COLUMN_TABLE_NAME;
enum SQL_DESC_TYPE_NAME = SQL_COLUMN_TYPE_NAME;
enum SQL_DESC_UNSIGNED = SQL_COLUMN_UNSIGNED;
enum SQL_DESC_UPDATABLE = SQL_COLUMN_UPDATABLE;
enum SQL_DI_CREATE_INDEX = 0x00000001L;
enum SQL_DI_DROP_INDEX = 0x00000002L;

enum SQL_DIAG_COLUMN_NUMBER = -1247;
enum SQL_DIAG_ROW_NUMBER = -1248;
enum SQL_DIAG_CURSOR_ROW_COUNT = -1249;

enum SQL_DL_SQL92_DATE = 0x00000001L;
enum SQL_DL_SQL92_INTERVAL_DAY = 0x00000020L;
enum SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR = 0x00000400L;
enum SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE = 0x00000800L;
enum SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND = 0x00001000L;
enum SQL_DL_SQL92_INTERVAL_HOUR = 0x00000040L;
enum SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE = 0x00002000L;
enum SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND = 0x00004000L;
enum SQL_DL_SQL92_INTERVAL_MINUTE = 0x00000080L;
enum SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND = 0x00008000L;
enum SQL_DL_SQL92_INTERVAL_MONTH = 0x00000010L;
enum SQL_DL_SQL92_INTERVAL_SECOND = 0x00000100L;
enum SQL_DL_SQL92_INTERVAL_YEAR = 0x00000008L;
enum SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH = 0x00000200L;
enum SQL_DL_SQL92_TIME = 0x00000002L;
enum SQL_DL_SQL92_TIMESTAMP = 0x00000004L;
enum SQL_DM_VER = 171;
enum SQL_DRIVER_HDESC = 135;
enum SQL_DROP_ASSERTION = 136;
enum SQL_DROP_CHARACTER_SET = 137;
enum SQL_DROP_COLLATION = 138;
enum SQL_DROP_DOMAIN = 139;
enum SQL_DROP_SCHEMA = 140;
enum SQL_DROP_TABLE = 141;
enum SQL_DROP_TRANSLATION = 142;
enum SQL_DROP_VIEW = 143;
enum SQL_DS_CASCADE = 0x00000004L;
enum SQL_DS_DROP_SCHEMA = 0x00000001L;
enum SQL_DS_RESTRICT = 0x00000002L;
enum SQL_DT_CASCADE = 0x00000004L;
enum SQL_DT_DROP_TABLE = 0x00000001L;
enum SQL_DT_RESTRICT = 0x00000002L;
enum SQL_DTC_DONE = 0L;
enum SQL_DTR_DROP_TRANSLATION = 0x00000001L;
enum SQL_DV_CASCADE = 0x00000004L;
enum SQL_DV_DROP_VIEW = 0x00000001L;
enum SQL_DV_RESTRICT = 0x00000002L;
enum SQL_DYNAMIC_CURSOR_ATTRIBUTES1 = 144;
enum SQL_DYNAMIC_CURSOR_ATTRIBUTES2 = 145;
enum SQL_EXT_API_LAST = SQL_API_SQLBINDPARAMETER;
enum SQL_EXT_API_START = 40;
enum SQL_FETCH_BY_BOOKMARK = 7;
enum SQL_FETCH_FIRST_SYSTEM = 32;
enum SQL_FETCH_FIRST_USER = 31;
enum SQL_FN_CVT_CAST = 0x00000002L;
enum SQL_FN_STR_BIT_LENGTH = 0x00080000L;
enum SQL_FN_STR_CHAR_LENGTH = 0x00100000L;
enum SQL_FN_STR_CHARACTER_LENGTH = 0x00200000L;
enum SQL_FN_STR_OCTET_LENGTH = 0x00400000L;
enum SQL_FN_STR_POSITION = 0x00800000L;
enum SQL_FN_TD_CURRENT_DATE = 0x00020000L;
enum SQL_FN_TD_CURRENT_TIME = 0x00040000L;
enum SQL_FN_TD_CURRENT_TIMESTAMP = 0x00080000L;
enum SQL_FN_TD_EXTRACT = 0x00100000L;
enum SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 = 146;
enum SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 = 147;
    /* #define SQL_FUNC_EXISTS(exists, api)
       ((*(((UWORD*) (exists)) + ((api) >> 4)) & (1 << ((api) & 15)) ) ?
       SQL_TRUE : SQL_FALSE )
    */
enum SQL_GB_COLLATE = 0x0004;
enum SQL_HANDLE_SENV = 5;

enum SQL_IK_NONE = 0;
enum SQL_IK_ASC = 1;
enum SQL_IK_DESC = 2;
enum SQL_IK_ALL = SQL_IK_ASC | SQL_IK_DESC;

enum SQL_INDEX_KEYWORDS = 148;
enum SQL_INFO_DRIVER_START = 1000;
enum SQL_INFO_LAST = SQL_QUALIFIER_LOCATION;
enum SQL_INFO_SCHEMA_VIEWS = 149;
enum SQL_INITIALLY_DEFERRED = 5;
enum SQL_INITIALLY_IMMEDIATE = 6;
enum SQL_INSERT_STATEMENT = 172;
enum SQL_INTERVAL = 10;
enum SQL_IS_INSERT_LITERALS = 0x00000001L;
enum SQL_IS_INSERT_SEARCHED = 0x00000002L;
enum SQL_IS_INTEGER = -6;
enum SQL_IS_POINTER = -4;
enum SQL_IS_SELECT_INTO = 0x00000004L;
enum SQL_IS_SMALLINT = -8;
enum SQL_IS_UINTEGER = -5;
enum SQL_IS_USMALLINT = -7;
enum SQL_ISV_ASSERTIONS = 0x00000001L;
enum SQL_ISV_CHARACTER_SETS = 0x00000002L;
enum SQL_ISV_CHECK_CONSTRAINTS = 0x00000004L;
enum SQL_ISV_COLLATIONS = 0x00000008L;
enum SQL_ISV_COLUMN_DOMAIN_USAGE = 0x00000010L;
enum SQL_ISV_COLUMN_PRIVILEGES = 0x00000020L;
enum SQL_ISV_COLUMNS = 0x00000040L;
enum SQL_ISV_CONSTRAINT_COLUMN_USAGE = 0x00000080L;
enum SQL_ISV_CONSTRAINT_TABLE_USAGE = 0x00000100L;
enum SQL_ISV_DOMAIN_CONSTRAINTS = 0x00000200L;
enum SQL_ISV_DOMAINS = 0x00000400L;
enum SQL_ISV_KEY_COLUMN_USAGE = 0x00000800L;
enum SQL_ISV_REFERENTIAL_CONSTRAINTS = 0x00001000L;
enum SQL_ISV_SCHEMATA = 0x00002000L;
enum SQL_ISV_SQL_LANGUAGES = 0x00004000L;
enum SQL_ISV_TABLE_CONSTRAINTS = 0x00008000L;
enum SQL_ISV_TABLE_PRIVILEGES = 0x00010000L;
enum SQL_ISV_TABLES = 0x00020000L;
enum SQL_ISV_TRANSLATIONS = 0x00040000L;
enum SQL_ISV_USAGE_PRIVILEGES = 0x00080000L;
enum SQL_ISV_VIEW_COLUMN_USAGE = 0x00100000L;
enum SQL_ISV_VIEW_TABLE_USAGE = 0x00200000L;
enum SQL_ISV_VIEWS = 0x00400000L;
enum SQL_KEYSET_CURSOR_ATTRIBUTES1 = 150;
enum SQL_KEYSET_CURSOR_ATTRIBUTES2 = 151;
enum SQL_MAX_ASYNC_CONCURRENT_STATEMENTS = 10022;
enum SQL_NO_COLUMN_NUMBER = -1;
enum SQL_NO_ROW_NUMBER = -1;
enum SQL_NOT_DEFERRABLE = 7;
enum SQL_NUM_EXTENSIONS = SQL_EXT_API_LAST-SQL_EXT_API_START+1;
enum SQL_NUM_FUNCTIONS = 23;
enum SQL_ODBC_INTERFACE_CONFORMANCE = 152;

    enum : ULONG {
        SQL_OIC_CORE = 1,
        SQL_OIC_LEVEL1,
        SQL_OIC_LEVEL2
    }
    enum : ULONG {
        SQL_OV_ODBC2 = 2,
        SQL_OV_ODBC3 = 3
    }

enum ULONG
        SQL_PARAM_BIND_BY_COLUMN = 0,
        SQL_PARAM_BIND_TYPE_DEFAULT = SQL_PARAM_BIND_BY_COLUMN;

enum SQL_PARAM_ARRAY_ROW_COUNTS = 153;
enum SQL_PARAM_ARRAY_SELECTS = 154;
enum SQL_PARAM_DIAG_UNAVAILABLE = 1;
enum SQL_PARAM_ERROR = 5;
enum SQL_PARAM_IGNORE = 1;
enum SQL_PARAM_PROCEED = 0;
enum SQL_PARAM_SUCCESS = 0;
enum SQL_PARAM_SUCCESS_WITH_INFO = 6;
enum SQL_PARAM_UNUSED = 7;

enum SQL_PARC_BATCH = 1;
enum SQL_PARC_NO_BATCH = 2;
enum SQL_PAS_BATCH = 1;
enum SQL_PAS_NO_BATCH = 2;
enum SQL_PAS_NO_SELECT = 3;

enum SQL_ROW_IGNORE = 1;
enum SQL_ROW_NUMBER_UNKNOWN = -2;
enum SQL_ROW_PROCEED = 0;
enum SQL_ROW_SUCCESS_WITH_INFO = 6;

enum SQL_SC_FIPS127_2_TRANSITIONAL = 0x00000002L;
enum SQL_SC_SQL92_ENTRY = 0x00000001L;
enum SQL_SC_SQL92_FULL = 0x00000008L;
enum SQL_SC_SQL92_INTERMEDIATE = 0x00000004L;

enum SQL_SCC_ISO92_CLI = 0x00000002L;
enum SQL_SCC_XOPEN_CLI_VERSION1 = 0x00000001L;

enum SQL_SCHEMA_TERM = SQL_OWNER_TERM;
enum SQL_SCHEMA_USAGE = SQL_OWNER_USAGE;
enum SQL_SDF_CURRENT_DATE = 0x00000001L;
enum SQL_SDF_CURRENT_TIME = 0x00000002L;
enum SQL_SDF_CURRENT_TIMESTAMP = 0x00000004L;
enum SQL_SFKD_CASCADE = 0x00000001L;
enum SQL_SFKD_NO_ACTION = 0x00000002L;
enum SQL_SFKD_SET_DEFAULT = 0x00000004L;
enum SQL_SFKD_SET_NULL = 0x00000008L;
enum SQL_SFKU_CASCADE = 0x00000001L;
enum SQL_SFKU_NO_ACTION = 0x00000002L;
enum SQL_SFKU_SET_DEFAULT = 0x00000004L;
enum SQL_SFKU_SET_NULL = 0x00000008L;
enum SQL_SG_DELETE_TABLE = 0x00000020L;
enum SQL_SG_INSERT_COLUMN = 0x00000080L;
enum SQL_SG_INSERT_TABLE = 0x00000040L;
enum SQL_SG_REFERENCES_COLUMN = 0x00000200L;
enum SQL_SG_REFERENCES_TABLE = 0x00000100L;
enum SQL_SG_SELECT_TABLE = 0x00000400L;
enum SQL_SG_UPDATE_COLUMN = 0x00001000L;
enum SQL_SG_UPDATE_TABLE = 0x00000800L;
enum SQL_SG_USAGE_ON_CHARACTER_SET = 0x00000002L;
enum SQL_SG_USAGE_ON_COLLATION = 0x00000004L;
enum SQL_SG_USAGE_ON_DOMAIN = 0x00000001L;
enum SQL_SG_USAGE_ON_TRANSLATION = 0x00000008L;
enum SQL_SG_WITH_GRANT_OPTION = 0x00000010L;
enum SQL_SNVF_BIT_LENGTH = 0x00000001L;
enum SQL_SNVF_CHAR_LENGTH = 0x00000002L;
enum SQL_SNVF_CHARACTER_LENGTH = 0x00000004L;
enum SQL_SNVF_EXTRACT = 0x00000008L;
enum SQL_SNVF_OCTET_LENGTH = 0x00000010L;
enum SQL_SNVF_POSITION = 0x00000020L;
enum SQL_SP_BETWEEN = 0x00000800L;
enum SQL_SP_COMPARISON = 0x00001000L;
enum SQL_SP_EXISTS = 0x00000001L;
enum SQL_SP_IN = 0x00000400L;
enum SQL_SP_ISNOTNULL = 0x00000002L;
enum SQL_SP_ISNULL = 0x00000004L;
enum SQL_SP_LIKE = 0x00000200L;
enum SQL_SP_MATCH_FULL = 0x00000008L;
enum SQL_SP_MATCH_PARTIAL = 0x00000010L;
enum SQL_SP_MATCH_UNIQUE_FULL = 0x00000020L;
enum SQL_SP_MATCH_UNIQUE_PARTIAL = 0x00000040L;
enum SQL_SP_OVERLAPS = 0x00000080L;
enum SQL_SP_QUANTIFIED_COMPARISON = 0x00002000L;
enum SQL_SP_UNIQUE = 0x00000100L;
enum SQL_SQL_CONFORMANCE = 118;
enum SQL_SQL92_DATETIME_FUNCTIONS = 155;
enum SQL_SQL92_FOREIGN_KEY_DELETE_RULE = 156;
enum SQL_SQL92_FOREIGN_KEY_UPDATE_RULE = 157;
enum SQL_SQL92_GRANT = 158;
enum SQL_SQL92_NUMERIC_VALUE_FUNCTIONS = 159;
enum SQL_SQL92_PREDICATES = 160;
enum SQL_SQL92_RELATIONAL_JOIN_OPERATORS = 161;
enum SQL_SQL92_REVOKE = 162;
enum SQL_SQL92_ROW_VALUE_CONSTRUCTOR = 163;
enum SQL_SQL92_STRING_FUNCTIONS = 164;
enum SQL_SQL92_VALUE_EXPRESSIONS = 165;
enum SQL_SR_CASCADE = 0x00000020L;
enum SQL_SR_DELETE_TABLE = 0x00000080L;
enum SQL_SR_GRANT_OPTION_FOR = 0x00000010L;
enum SQL_SR_INSERT_COLUMN = 0x00000200L;
enum SQL_SR_INSERT_TABLE = 0x00000100L;
enum SQL_SR_REFERENCES_COLUMN = 0x00000800L;
enum SQL_SR_REFERENCES_TABLE = 0x00000400L;
enum SQL_SR_RESTRICT = 0x00000040L;
enum SQL_SR_SELECT_TABLE = 0x00001000L;
enum SQL_SR_UPDATE_COLUMN = 0x00004000L;
enum SQL_SR_UPDATE_TABLE = 0x00002000L;
enum SQL_SR_USAGE_ON_CHARACTER_SET = 0x00000002L;
enum SQL_SR_USAGE_ON_COLLATION = 0x00000004L;
enum SQL_SR_USAGE_ON_DOMAIN = 0x00000001L;
enum SQL_SR_USAGE_ON_TRANSLATION = 0x00000008L;
enum SQL_SRJO_CORRESPONDING_CLAUSE = 0x00000001L;
enum SQL_SRJO_CROSS_JOIN = 0x00000002L;
enum SQL_SRJO_EXCEPT_JOIN = 0x00000004L;
enum SQL_SRJO_FULL_OUTER_JOIN = 0x00000008L;
enum SQL_SRJO_INNER_JOIN = 0x00000010L;
enum SQL_SRJO_INTERSECT_JOIN = 0x00000020L;
enum SQL_SRJO_LEFT_OUTER_JOIN = 0x00000040L;
enum SQL_SRJO_NATURAL_JOIN = 0x00000080L;
enum SQL_SRJO_RIGHT_OUTER_JOIN = 0x00000100L;
enum SQL_SRJO_UNION_JOIN = 0x00000200L;
enum SQL_SRVC_DEFAULT = 0x00000004L;
enum SQL_SRVC_NULL = 0x00000002L;
enum SQL_SRVC_ROW_SUBQUERY = 0x00000008L;
enum SQL_SRVC_VALUE_EXPRESSION = 0x00000001L;
enum SQL_SSF_CONVERT = 0x00000001L;
enum SQL_SSF_LOWER = 0x00000002L;
enum SQL_SSF_SUBSTRING = 0x00000008L;
enum SQL_SSF_TRANSLATE = 0x00000010L;
enum SQL_SSF_TRIM_BOTH = 0x00000020L;
enum SQL_SSF_TRIM_LEADING = 0x00000040L;
enum SQL_SSF_TRIM_TRAILING = 0x00000080L;
enum SQL_SSF_UPPER = 0x00000004L;
enum SQL_STANDARD_CLI_CONFORMANCE = 166;
enum SQL_STATIC_CURSOR_ATTRIBUTES1 = 167;
enum SQL_STATIC_CURSOR_ATTRIBUTES2 = 168;
enum SQL_SU_DML_STATEMENTS = SQL_OU_DML_STATEMENTS;
enum SQL_SU_INDEX_DEFINITION = SQL_OU_INDEX_DEFINITION;
enum SQL_SU_PRIVILEGE_DEFINITION = SQL_OU_PRIVILEGE_DEFINITION;
enum SQL_SU_PROCEDURE_INVOCATION = SQL_OU_PROCEDURE_INVOCATION;
enum SQL_SU_TABLE_DEFINITION = SQL_OU_TABLE_DEFINITION;
enum SQL_SVE_CASE = 0x00000001L;
enum SQL_SVE_CAST = 0x00000002L;
enum SQL_SVE_COALESCE = 0x00000004L;
enum SQL_SVE_NULLIF = 0x00000008L;
enum SQL_UB_FIXED = SQL_UB_ON;
enum SQL_UB_VARIABLE = 2UL;
enum SQL_UNION_STATEMENT = SQL_UNION;
enum SQL_UPDATE_BY_BOOKMARK = 5;
enum SQL_US_UNION = SQL_U_UNION;
enum SQL_US_UNION_ALL = SQL_U_UNION_ALL;
}//[Yes] #endif /* ODBCVER >= 0x300 */
static if (ODBCVER >= 0x0350) {
enum SQL_DESC_ROWVER = 35;
enum SQL_GUID = -11;
enum SQL_C_GUID = SQL_GUID;
    //#ifdef ODBC_STD
    //#define SQLAllocHandle SQLAllocHandleStd
    //#define SQLAllocEnv(p) SQLAllocHandleStd(SQL_HANDLE_ENV, SQL_NULL_HANDLE, p)
    //#define SQL_YEAR SQL_CODE_YEAR
    //#define SQL_MONTH SQL_CODE_MONTH
    //#define SQL_DAY SQL_CODE_DAY
    //#define SQL_HOUR SQL_CODE_HOUR
    //#define SQL_MINUTE SQL_CODE_MINUTE
    //#define SQL_SECOND SQL_CODE_SECOND
    //#define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MONTH
    //#define SQL_DAY_TO_HOUR SQL_CODE_DAY_TO_HOUR
    //#define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINUTE
    //#define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECOND
    //#define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MINUTE
    //#define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SECOND
    //#define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND
    //#endif /* ODBC_STD */
}//#endif /* ODBCVER >= 0x0350 */

//static if (ODBCVER >= 0x0351) {
enum SQL_ATTR_ANSI_APP=115;
enum SQL_AA_TRUE=1L;
enum SQL_AA_FALSE=0L;
//}//[Yes] #endif

enum TRACE_VERSION=1000;
enum TRACE_ON=1;

const char [] SQL_ODBC_KEYWORDS =
    "ABSOLUTE, ACTION, ADA, ADD, ALL, ALLOCATE, ALTER, AND, ANY, ARE, AS, "
    ~ "ASC, ASSERTION, AT, AUTHORIZATION, AVG, "
    ~ "BEGIN, BETWEEN, BIT, BIT_LENGTH, BOTH, BY, CASCADE, CASCADED, CASE, CAST, CATALOG, "
    ~ "CHAR, CHAR_LENGTH, CHARACTER, CHARACTER_LENGTH, CHECK, CLOSE, COALESCE, "
    ~ "COLLATE, COLLATION, COLUMN, COMMIT, CONNECT, CONNECTION, CONSTRAINT, "
    ~ "CONSTRAINTS, CONTINUE, CONVERT, CORRESPONDING, COUNT, CREATE, CROSS, CURRENT, "
    ~ "CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CURSOR, "
    ~ "DATE, DAY, DEALLOCATE, DEC, DECIMAL, DECLARE, DEFAULT, DEFERRABLE, "
    ~ "DEFERRED, DELETE, DESC, DESCRIBE, DESCRIPTOR, DIAGNOSTICS, DISCONNECT, "
    ~ "DISTINCT, DOMAIN, DOUBLE, DROP, "
    ~ "ELSE, END, END-EXEC, ESCAPE, EXCEPT, EXCEPTION, EXEC, EXECUTE, "
    ~ "EXISTS, EXTERNAL, EXTRACT, "
    ~ "FALSE, FETCH, FIRST, FLOAT, FOR, FOREIGN, FORTRAN, FOUND, FROM, FULL, "
    ~ "GET, GLOBAL, GO, GOTO, GRANT, GROUP, HAVING, HOUR, "
    ~ "IDENTITY, IMMEDIATE, IN, INCLUDE, INDEX, INDICATOR, INITIALLY, INNER, "
    ~ "INPUT, INSENSITIVE, INSERT, INT, INTEGER, INTERSECT, INTERVAL, INTO, IS, ISOLATION, "
    ~ "JOIN, KEY, LANGUAGE, LAST, LEADING, LEFT, LEVEL, LIKE, LOCAL, LOWER, "
    ~ "MATCH, MAX, MIN, MINUTE, MODULE, MONTH, "
    ~ "NAMES, NATIONAL, NATURAL, NCHAR, NEXT, NO, NONE, NOT, NULL, NULLIF, NUMERIC, "
    ~ "OCTET_LENGTH, OF, ON, ONLY, OPEN, OPTION, OR, ORDER, OUTER, OUTPUT, OVERLAPS, "
    ~ "PAD, PARTIAL, PASCAL, PLI, POSITION, PRECISION, PREPARE, PRESERVE, "
    ~ "PRIMARY, PRIOR, PRIVILEGES, PROCEDURE, PUBLIC, "
    ~ "READ, REAL, REFERENCES, RELATIVE, RESTRICT, REVOKE, RIGHT, ROLLBACK, ROWS"
    ~ "SCHEMA, SCROLL, SECOND, SECTION, SELECT, SESSION, SESSION_USER, SET, SIZE, "
    ~ "SMALLINT, SOME, SPACE, SQL, SQLCA, SQLCODE, SQLERROR, SQLSTATE, SQLWARNING, "
    ~ "SUBSTRING, SUM, SYSTEM_USER, "
    ~ "TABLE, TEMPORARY, THEN, TIME, TIMESTAMP, TIMEZONE_HOUR, TIMEZONE_MINUTE, "
    ~ "TO, TRAILING, TRANSACTION, TRANSLATE, TRANSLATION, TRIM, TRUE, "
    ~ "UNION, UNIQUE, UNKNOWN, UPDATE, UPPER, USAGE, USER, USING, "
    ~ "VALUE, VALUES, VARCHAR, VARYING, VIEW, WHEN, WHENEVER, WHERE, WITH, WORK, WRITE, "
    ~ "YEAR, ZONE";
extern (Windows) {
    SQLRETURN SQLDriverConnect(SQLHDBC, SQLHWND, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLSMALLINT*, SQLUSMALLINT);
    SQLRETURN SQLBrowseConnect(SQLHDBC, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLSMALLINT*);
    SQLRETURN SQLColumnPrivileges(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
    SQLRETURN SQLColAttributes(SQLHSTMT, SQLUSMALLINT, SQLUSMALLINT, SQLPOINTER, SQLSMALLINT, SQLSMALLINT*, SQLLEN*);
    SQLRETURN SQLDescribeParam(SQLHSTMT, SQLUSMALLINT, SQLSMALLINT*, SQLULEN*, SQLSMALLINT*, SQLSMALLINT*);
    SQLRETURN SQLExtendedFetch(SQLHSTMT, SQLUSMALLINT, SQLINTEGER, SQLUINTEGER*, SQLUSMALLINT*);
    SQLRETURN SQLForeignKeys(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
    SQLRETURN SQLMoreResults(SQLHSTMT);
    SQLRETURN SQLNativeSql(SQLHDBC, SQLCHAR*, SQLINTEGER, SQLCHAR*, SQLINTEGER, SQLINTEGER*);
    SQLRETURN SQLNumParams(SQLHSTMT, SQLSMALLINT*);
    SQLRETURN SQLParamOptions(SQLHSTMT, SQLUINTEGER, SQLUINTEGER*);
    SQLRETURN SQLPrimaryKeys(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
    SQLRETURN SQLProcedureColumns(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
    SQLRETURN SQLProcedures(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
    SQLRETURN SQLSetPos(SQLHSTMT, SQLUSMALLINT, SQLUSMALLINT, SQLUSMALLINT);
    SQLRETURN SQLTablePrivileges(SQLHSTMT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT, SQLCHAR*, SQLSMALLINT);
    SQLRETURN SQLDrivers(SQLHENV, SQLUSMALLINT, SQLCHAR*, SQLSMALLINT, SQLSMALLINT*, SQLCHAR*, SQLSMALLINT, SQLSMALLINT*);
    SQLRETURN SQLBindParameter(SQLHSTMT, SQLUSMALLINT, SQLSMALLINT, SQLSMALLINT, SQLSMALLINT, SQLULEN, SQLSMALLINT, SQLPOINTER, SQLLEN, SQLLEN*);
    SQLRETURN SQLSetScrollOptions(SQLHSTMT, SQLUSMALLINT, SQLLEN, SQLUSMALLINT);/* deprecated */
    DWORD ODBCGetTryWaitValue();
    BOOL ODBCSetTryWaitValue(DWORD);
    RETCODE TraceOpenLogFile(LPWSTR, LPWSTR, DWORD);
    RETCODE TraceCloseLogFile();
    VOID TraceReturn(RETCODE, RETCODE);
    DWORD TraceVersion();
    //static if (ODBCVER >= 0x0300) {
    SQLRETURN SQLBulkOperations(SQLHSTMT, SQLSMALLINT);
    SQLRETURN SQLAllocHandleStd( SQLSMALLINT, SQLHANDLE, SQLHANDLE*);
    //}
}
