parent
1dc551cf6b
commit
8551f8ca98
|
@ -50,6 +50,7 @@ LIBSUBDIRS = \
|
|||
dlls/msnet32 \
|
||||
dlls/msvideo \
|
||||
dlls/ntdll \
|
||||
dlls/odbc32 \
|
||||
dlls/ole32 \
|
||||
dlls/oleaut32 \
|
||||
dlls/olecli \
|
||||
|
@ -163,6 +164,7 @@ LIBOBJS = \
|
|||
dlls/msnet32/msnet32.o \
|
||||
dlls/msvideo/msvideo.o \
|
||||
dlls/ntdll/ntdll.o \
|
||||
dlls/odbc32/odbc32.o \
|
||||
dlls/ole32/ole32.o \
|
||||
dlls/oleaut32/oleaut32.o \
|
||||
dlls/olecli/olecli.o \
|
||||
|
|
|
@ -5858,6 +5858,7 @@ dlls/msacm32/Makefile
|
|||
dlls/msnet32/Makefile
|
||||
dlls/msvideo/Makefile
|
||||
dlls/ntdll/Makefile
|
||||
dlls/odbc32/Makefile
|
||||
dlls/ole32/Makefile
|
||||
dlls/oleaut32/Makefile
|
||||
dlls/olecli/Makefile
|
||||
|
@ -6064,6 +6065,7 @@ dlls/msacm32/Makefile
|
|||
dlls/msnet32/Makefile
|
||||
dlls/msvideo/Makefile
|
||||
dlls/ntdll/Makefile
|
||||
dlls/odbc32/Makefile
|
||||
dlls/ole32/Makefile
|
||||
dlls/oleaut32/Makefile
|
||||
dlls/olecli/Makefile
|
||||
|
|
|
@ -883,6 +883,7 @@ dlls/msacm32/Makefile
|
|||
dlls/msnet32/Makefile
|
||||
dlls/msvideo/Makefile
|
||||
dlls/ntdll/Makefile
|
||||
dlls/odbc32/Makefile
|
||||
dlls/ole32/Makefile
|
||||
dlls/oleaut32/Makefile
|
||||
dlls/olecli/Makefile
|
||||
|
|
|
@ -19,6 +19,7 @@ SUBDIRS = \
|
|||
msnet32 \
|
||||
msvideo \
|
||||
ntdll \
|
||||
odbc32 \
|
||||
ole32 \
|
||||
oleaut32 \
|
||||
olecli \
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Makefile
|
||||
odbc32.spec.c
|
|
@ -0,0 +1,18 @@
|
|||
DEFS = @DLLFLAGS@ -D__WINE__
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = odbc32
|
||||
|
||||
SPEC_SRCS = odbc32.spec
|
||||
|
||||
C_SRCS = \
|
||||
proxyodbc.c
|
||||
|
||||
all: $(MODULE).o
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
### Dependencies:
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
name odbc32
|
||||
type win32
|
||||
init MAIN_OdbcInit
|
||||
|
||||
001 stdcall SQLAllocConnect(long ptr) SQLAllocConnect
|
||||
002 stdcall SQLAllocEnv(ptr) SQLAllocEnv
|
||||
003 stdcall SQLAllocStmt(long ptr) SQLAllocStmt
|
||||
004 stdcall SQLBindCol(long long long ptr long ptr) SQLBindCol
|
||||
005 stdcall SQLCancel(long) SQLCancel
|
||||
006 stdcall SQLColAttributes(long long long ptr long ptr ptr) SQLColAttributes
|
||||
007 stdcall SQLConnect(long str long str long str long) SQLConnect
|
||||
008 stdcall SQLDescribeCol(long long str long ptr ptr ptr ptr ptr) SQLDescribeCol
|
||||
009 stdcall SQLDisconnect(long) SQLDisconnect
|
||||
010 stdcall SQLError(long long long str ptr str long ptr) SQLError
|
||||
011 stdcall SQLExecDirect(long str long) SQLExecDirect
|
||||
012 stdcall SQLExecute(long) SQLExecute
|
||||
013 stdcall SQLFetch(long) SQLFetch
|
||||
014 stdcall SQLFreeConnect(long) SQLFreeConnect
|
||||
015 stdcall SQLFreeEnv(long) SQLFreeEnv
|
||||
016 stdcall SQLFreeStmt(long long ) SQLFreeStmt
|
||||
017 stdcall SQLGetCursorName(long str long ptr) SQLGetCursorName
|
||||
018 stdcall SQLNumResultCols(long ptr) SQLNumResultCols
|
||||
019 stdcall SQLPrepare(long str long) SQLPrepare
|
||||
020 stdcall SQLRowCount(long ptr) SQLRowCount
|
||||
021 stdcall SQLSetCursorName(long str long) SQLSetCursorName
|
||||
022 stdcall SQLSetParam(long long long long long long ptr ptr) SQLSetParam
|
||||
023 stdcall SQLTransact(long long long) SQLTransact
|
||||
024 stdcall SQLAllocHandle(long long ptr) SQLAllocHandle
|
||||
025 stdcall SQLBindParam(long long long long long long ptr ptr) SQLBindParam
|
||||
026 stdcall SQLCloseCursor(long) SQLCloseCursor
|
||||
027 stdcall SQLColAttribute(long long long ptr long ptr ptr) SQLColAttribute
|
||||
028 stdcall SQLCopyDesc(long long) SQLCopyDesc
|
||||
029 stdcall SQLEndTran(long long long) SQLEndTran
|
||||
030 stdcall SQLFetchScroll(long long long) SQLFetchScroll
|
||||
031 stdcall SQLFreeHandle(long long) SQLFreeHandle
|
||||
032 stdcall SQLGetConnectAttr(long long ptr ptr) SQLGetConnectAttr
|
||||
033 stdcall SQLGetDescField(long long long ptr long ptr) SQLGetDescField
|
||||
034 stdcall SQLGetDescRec(long long str long ptr ptr ptr ptr ptr ptr ptr) SQLGetDescRec
|
||||
035 stdcall SQLGetDiagField(long long long long ptr long ptr) SQLGetDiagField
|
||||
036 stdcall SQLGetDiagRec(long long long str ptr str long ptr) SQLGetDiagRec
|
||||
037 stdcall SQLGetEnvAttr(long long ptr long ptr) SQLGetEnvAttr
|
||||
038 stdcall SQLGetStmtAttr(long long ptr long ptr) SQLGetStmtAttr
|
||||
039 stdcall SQLSetConnectAttr(long long ptr long) SQLSetConnectAttr
|
||||
040 stdcall SQLColumns(long str long str long str long str long) SQLColumns
|
||||
041 stdcall SQLDriverConnect(long long str long str long str long) SQLDriverConnect
|
||||
042 stdcall SQLGetConnectOption(long long ptr) SQLGetConnectOption
|
||||
043 stdcall SQLGetData(long long long ptr long ptr) SQLGetData
|
||||
044 stdcall SQLGetFunctions(long long ptr) SQLGetFunctions
|
||||
045 stdcall SQLGetInfo(long long ptr long ptr) SQLGetInfo
|
||||
046 stdcall SQLGetStmtOption(long long ptr) SQLGetStmtOption
|
||||
047 stdcall SQLGetTypeInfo(long long) SQLGetTypeInfo
|
||||
048 stdcall SQLParamData(long ptr) SQLParamData
|
||||
049 stdcall SQLPutData(long ptr long) SQLPutData
|
||||
050 stdcall SQLSetConnectOption(long long long) SQLSetConnectOption
|
||||
051 stdcall SQLSetStmtOption(long long long) SQLSetStmtOption
|
||||
052 stdcall SQLSpecialColumns(long long str long str long str long long long) SQLSpecialColumns
|
||||
053 stdcall SQLStatistics(long str long str long str long long long) SQLStatistics
|
||||
054 stdcall SQLTables(long str long str long str long str long) SQLTables
|
||||
055 stdcall SQLBrowseConnect(long str long str long ptr) SQLBrowseConnect
|
||||
056 stdcall SQLColumnPrivileges(long str long str long str long str long) SQLColumnPrivileges
|
||||
057 stdcall SQLDataSources(long long str long ptr str long ptr) SQLDataSources
|
||||
058 stdcall SQLDescribeParam(long long ptr ptr ptr ptr) SQLDescribeParam
|
||||
059 stdcall SQLExtendedFetch(long long long ptr ptr) SQLExtendedFetch
|
||||
060 stdcall SQLForeignKeys(long str long str long str long str long str long str long) SQLForeignKeys
|
||||
061 stdcall SQLMoreResults(long str long str long ptr) SQLMoreResults
|
||||
062 stdcall SQLNativeSql(long str long str long str long) SQLNativeSql
|
||||
063 stdcall SQLNumParams(long ptr) SQLNumParams
|
||||
064 stdcall SQLParamOptions(long str long str long str long) SQLParamOptions
|
||||
065 stdcall SQLPrimaryKeys(long str long str long str long) SQLPrimaryKeys
|
||||
066 stdcall SQLProcedureColumns(long str long str long str long str long) SQLProcedureColumns
|
||||
067 stdcall SQLProcedures(long str long str long str long) SQLProcedures
|
||||
068 stdcall SQLSetPos(long long long long) SQLSetPos
|
||||
069 stdcall SQLSetScrollOptions(long long long long) SQLSetScrollOptions
|
||||
070 stdcall SQLTablePrivileges(long str long str long str long) SQLTablePrivileges
|
||||
071 stdcall SQLDrivers(long long str long ptr str long ptr) SQLDrivers
|
||||
072 stdcall SQLBindParameter(long long long long long long long ptr long ptr) SQLBindParameter
|
||||
073 stdcall SQLSetDescField(long long long ptr long) SQLSetDescField
|
||||
074 stdcall SQLSetDescRec(long long long long long long long ptr ptr ptr) SQLSetDescRec
|
||||
075 stdcall SQLSetEnvAttr(long long ptr long) SQLSetEnvAttr
|
||||
076 stdcall SQLSetStmtAttr(long long ptr long) SQLSetStmtAttr
|
||||
077 stdcall SQLAllocHandleStd(long long ptr) SQLAllocHandleStd
|
||||
078 stdcall SQLBulkOperations(long long) SQLBulkOperations
|
||||
079 stub CloseODBCPerfData
|
||||
080 stub CollectODBCPerfData
|
||||
081 stub CursorLibLockDbc
|
||||
082 stub CursorLibLockDesc
|
||||
083 stub CursorLibLockStmt
|
||||
084 stub ODBCGetTryWaitValue
|
||||
085 stub CursorLibTransact
|
||||
086 stub ODBSetTryWaitValue
|
||||
087 stub LockHandle
|
||||
088 stub ODBCInternalConnectW
|
||||
089 stub ODBCSharedPerfMon
|
||||
090 stub ODBCSharedVSFlag
|
||||
091 stub OpenODBCPerfData
|
||||
092 stub PostComponentError
|
||||
093 stub PostODBCComponentError
|
||||
094 stub PostODBCError
|
||||
095 stub SearchStatusCode
|
||||
096 stub VFreeErrors
|
||||
097 stub VRetrieveDriverErrorsRowCol
|
||||
098 stub ValidateErrorQueue
|
||||
099 stub SQLColAttributesW
|
||||
100 stub SQLConnectW
|
||||
101 stub SQLDescribeColW
|
||||
102 stub SQLErrorW
|
||||
103 stub SQLExecDirectW
|
||||
104 stub SQLGetCursorNameW
|
||||
105 stub SQLPrepareW
|
||||
106 stub SQLSetCursorNameW
|
||||
107 stub SQLColAttributeW
|
||||
108 stub SQLGetConnectAttrW
|
||||
109 stub SQLGetDescFieldW
|
||||
110 stub SQLGetDescRecW
|
||||
111 stub SQLGetDiagFieldW
|
||||
112 stub SQLGetDiagRecW
|
||||
113 stub SQLGetStmtAttrW
|
||||
114 stub SQLSetConnectAttrW
|
||||
115 stub SQLColumnsW
|
||||
116 stub SQLDriverConnectW
|
||||
117 stub SQLGetConnectOptionW
|
||||
118 stub SQLGetInfoW
|
||||
119 stub SQLGetTypeInfoW
|
||||
120 stub SQLSetConnectOptionW
|
||||
121 stub SQLSpecialColumnsA
|
||||
122 stub SQLStatisticsW
|
||||
123 stub SQLTablesW
|
||||
124 stub SQLBrowseConnectW
|
||||
125 stub SQLDataSourcesW
|
||||
126 stub SQLColumnPrivilegesW
|
||||
127 stub SQLForeignKeysW
|
||||
128 stub SQLNativeSqlW
|
||||
129 stub SQLPrimaryKeysW
|
||||
130 stub SQLProcedureColumnsW
|
||||
131 stub SQLProceduresW
|
||||
132 stub SQLTablePrivilegesW
|
||||
133 stub SQLDriversW
|
||||
134 stub SQLSetDescFieldW
|
||||
135 stub SQLSetStmtAttrW
|
||||
136 stub SQLColAttributesW
|
||||
137 stub SQLConnectA
|
||||
138 stub SQLDescribeColA
|
||||
139 stub SQLErrorA
|
||||
140 stub SQLExecDirectA
|
||||
141 stub SQLGetCursorNameA
|
||||
142 stub SQLPrepareA
|
||||
143 stub SQLSetCursorNameA
|
||||
144 stub SQLColAttributeA
|
||||
145 stub SQLGetConnectAttrA
|
||||
146 stub SQLGetDescFieldA
|
||||
147 stub SQLGetDescRecA
|
||||
148 stub SQLGetDiagFieldA
|
||||
149 stub SQLGetDiagRecA
|
||||
150 stub SQLGetStmtAttrA
|
||||
151 stub SQLSetConnectAttrA
|
||||
152 stub SQLColumnsA
|
||||
153 stub SQLDriverConnectA
|
||||
154 stub SQLGetConnectOptionA
|
||||
155 stub SQLGetInfoA
|
||||
156 stub SQLGetTypeInfoA
|
||||
157 stub SQLSetConnectOptionA
|
||||
158 stub SQLSpecialColumnsA
|
||||
159 stub SQLStatisticsA
|
||||
160 stub SQLTablesA
|
||||
161 stub SQLBrowseConnectA
|
||||
162 stub SQLColumnPrivilegesA
|
||||
163 stub SQLDataSourcesA
|
||||
164 stub SQLForeignKeysA
|
||||
165 stub SQLNativeSqlA
|
||||
166 stub SQLPrimaryKeysA
|
||||
167 stub SQLProcedureColumnsA
|
||||
168 stub SQLProceduresA
|
||||
169 stub SQLTablePrivilegesA
|
||||
170 stub SQLDriversA
|
||||
171 stub SQLSetDescFieldA
|
||||
172 stub SQLSetStmtAttrA
|
||||
173 stub ODBCSharedTraceFlag
|
||||
174 stub ODBCQualifyFileDSNW
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,116 @@
|
|||
#ifndef _PROXYMANAGER_H
|
||||
#define _PROXYMANAGER_H
|
||||
|
||||
#define NUM_SQLFUNC 78
|
||||
#define ERROR_FREE 0
|
||||
#define ERROR_SQLERROR 1
|
||||
#define ERROR_LIBRARY_NOT_FOUND 2
|
||||
#define ERROR_FUNCTIONS_NOT_LOADED 3
|
||||
|
||||
#define ODBCVER 0x0351
|
||||
|
||||
typedef struct dm_func /* driver manager functions */
|
||||
{
|
||||
int ordinal;
|
||||
char *name;
|
||||
void *d_func;
|
||||
SQLRETURN (*func)();
|
||||
} DM_FUNC;
|
||||
|
||||
typedef struct proxyhandle
|
||||
{
|
||||
void *dmHandle; /* driver manager handle */
|
||||
BOOL isWindowsDriver; /* is driver a Windows version*/
|
||||
BOOL bCallbackReady; /* procs taken from Windows driver placed in driver manager as callbacks */
|
||||
BOOL bFunctionReady;
|
||||
int nErrorType;
|
||||
DM_FUNC functions[NUM_SQLFUNC]; /* entry point for driver manager functions */
|
||||
char driverLibName[200]; /* ODBC driver SO name */
|
||||
char dmLibName[200]; /* driver manager library name */
|
||||
char ServerName[200]; /* keep server name */
|
||||
char UserName[50]; /* keep username */
|
||||
} PROXYHANDLE;
|
||||
|
||||
BOOL ODBC_LoadDriverManager();
|
||||
BOOL ODBC_LoadDMFunctions();
|
||||
|
||||
#define /* 00 */ SQLAPI_INDEX_SQLALLOCCONNECT 0
|
||||
#define /* 01 */ SQLAPI_INDEX_SQLALLOCENV 1
|
||||
#define /* 02 */ SQLAPI_INDEX_SQLALLOCHANDLE 2
|
||||
#define /* 03 */ SQLAPI_INDEX_SQLALLOCSTMT 3
|
||||
#define /* 04 */ SQLAPI_INDEX_SQLALLOCHANDLESTD 4
|
||||
#define /* 05 */ SQLAPI_INDEX_SQLBINDCOL 5
|
||||
#define /* 06 */ SQLAPI_INDEX_SQLBINDPARAM 6
|
||||
#define /* 07 */ SQLAPI_INDEX_SQLBINDPARAMETER 7
|
||||
#define /* 08 */ SQLAPI_INDEX_SQLBROWSECONNECT 8
|
||||
#define /* 09 */ SQLAPI_INDEX_SQLBULKOPERATIONS 9
|
||||
#define /* 10 */ SQLAPI_INDEX_SQLCANCEL 10
|
||||
#define /* 11 */ SQLAPI_INDEX_SQLCLOSECURSOR 11
|
||||
#define /* 12 */ SQLAPI_INDEX_SQLCOLATTRIBUTE 12
|
||||
#define /* 13 */ SQLAPI_INDEX_SQLCOLATTRIBUTES 13
|
||||
#define /* 14 */ SQLAPI_INDEX_SQLCOLUMNPRIVILEGES 14
|
||||
#define /* 15 */ SQLAPI_INDEX_SQLCOLUMNS 15
|
||||
#define /* 16 */ SQLAPI_INDEX_SQLCONNECT 16
|
||||
#define /* 17 */ SQLAPI_INDEX_SQLCOPYDESC 17
|
||||
#define /* 18 */ SQLAPI_INDEX_SQLDATASOURCES 18
|
||||
#define /* 19 */ SQLAPI_INDEX_SQLDESCRIBECOL 19
|
||||
#define /* 20 */ SQLAPI_INDEX_SQLDESCRIBEPARAM 20
|
||||
#define /* 21 */ SQLAPI_INDEX_SQLDISCONNECT 21
|
||||
#define /* 22 */ SQLAPI_INDEX_SQLDRIVERCONNECT 22
|
||||
#define /* 23 */ SQLAPI_INDEX_SQLDRIVERS 23
|
||||
#define /* 24 */ SQLAPI_INDEX_SQLENDTRAN 24
|
||||
#define /* 25 */ SQLAPI_INDEX_SQLERROR 25
|
||||
#define /* 26 */ SQLAPI_INDEX_SQLEXECDIRECT 26
|
||||
#define /* 27 */ SQLAPI_INDEX_SQLEXECUTE 27
|
||||
#define /* 28 */ SQLAPI_INDEX_SQLEXTENDEDFETCH 28
|
||||
#define /* 29 */ SQLAPI_INDEX_SQLFETCH 29
|
||||
#define /* 30 */ SQLAPI_INDEX_SQLFETCHSCROLL 30
|
||||
#define /* 31 */ SQLAPI_INDEX_SQLFOREIGNKEYS 31
|
||||
#define /* 32 */ SQLAPI_INDEX_SQLFREEENV 32
|
||||
#define /* 33 */ SQLAPI_INDEX_SQLFREEHANDLE 33
|
||||
#define /* 34 */ SQLAPI_INDEX_SQLFREESTMT 34
|
||||
#define /* 35 */ SQLAPI_INDEX_SQLFREECONNECT 35
|
||||
#define /* 36 */ SQLAPI_INDEX_SQLGETCONNECTATTR 36
|
||||
#define /* 37 */ SQLAPI_INDEX_SQLGETCONNECTOPTION 37
|
||||
#define /* 38 */ SQLAPI_INDEX_SQLGETCURSORNAME 38
|
||||
#define /* 39 */ SQLAPI_INDEX_SQLGETDATA 39
|
||||
#define /* 40 */ SQLAPI_INDEX_SQLGETDESCFIELD 40
|
||||
#define /* 41 */ SQLAPI_INDEX_SQLGETDESCREC 41
|
||||
#define /* 42 */ SQLAPI_INDEX_SQLGETDIAGFIELD 42
|
||||
#define /* 43 */ SQLAPI_INDEX_SQLGETENVATTR 43
|
||||
#define /* 44 */ SQLAPI_INDEX_SQLGETFUNCTIONS 44
|
||||
#define /* 45 */ SQLAPI_INDEX_SQLGETINFO 45
|
||||
#define /* 46 */ SQLAPI_INDEX_SQLGETSTMTATTR 46
|
||||
#define /* 47 */ SQLAPI_INDEX_SQLGETSTMTOPTION 47
|
||||
#define /* 48 */ SQLAPI_INDEX_SQLGETTYPEINFO 48
|
||||
#define /* 49 */ SQLAPI_INDEX_SQLMORERESULTS 49
|
||||
#define /* 50 */ SQLAPI_INDEX_SQLNATIVESQL 50
|
||||
#define /* 51 */ SQLAPI_INDEX_SQLNUMPARAMS 51
|
||||
#define /* 52 */ SQLAPI_INDEX_SQLNUMRESULTCOLS 52
|
||||
#define /* 53 */ SQLAPI_INDEX_SQLPARAMDATA 53
|
||||
#define /* 54 */ SQLAPI_INDEX_SQLPARAMOPTIONS 54
|
||||
#define /* 55 */ SQLAPI_INDEX_SQLPREPARE 55
|
||||
#define /* 56 */ SQLAPI_INDEX_SQLPRIMARYKEYS 56
|
||||
#define /* 57 */ SQLAPI_INDEX_SQLPROCEDURECOLUMNS 57
|
||||
#define /* 58 */ SQLAPI_INDEX_SQLPROCEDURES 58
|
||||
#define /* 59 */ SQLAPI_INDEX_SQLPUTDATA 59
|
||||
#define /* 60 */ SQLAPI_INDEX_SQLROWCOUNT 60
|
||||
#define /* 61 */ SQLAPI_INDEX_SQLSETCONNECTATTR 61
|
||||
#define /* 62 */ SQLAPI_INDEX_SQLSETCONNECTOPTION 62
|
||||
#define /* 63 */ SQLAPI_INDEX_SQLSETCURSORNAME 63
|
||||
#define /* 64 */ SQLAPI_INDEX_SQLSETDESCFIELD 64
|
||||
#define /* 65 */ SQLAPI_INDEX_SQLSETDESCREC 65
|
||||
#define /* 66 */ SQLAPI_INDEX_SQLSETENVATTR 66
|
||||
#define /* 67 */ SQLAPI_INDEX_SQLSETPARAM 67
|
||||
#define /* 68 */ SQLAPI_INDEX_SQLSETPOS 68
|
||||
#define /* 69 */ SQLAPI_INDEX_SQLSETSCROLLOPTIONS 69
|
||||
#define /* 70 */ SQLAPI_INDEX_SQLSETSTMTATTR 70
|
||||
#define /* 71 */ SQLAPI_INDEX_SQLSETSTMTOPTION 71
|
||||
#define /* 72 */ SQLAPI_INDEX_SQLSPECIALCOLUMNS 72
|
||||
#define /* 73 */ SQLAPI_INDEX_SQLSTATISTICS 73
|
||||
#define /* 74 */ SQLAPI_INDEX_SQLTABLEPRIVILEGES 74
|
||||
#define /* 75 */ SQLAPI_INDEX_SQLTABLES 75
|
||||
#define /* 76 */ SQLAPI_INDEX_SQLTRANSACT 76
|
||||
#define /* 77 */ SQLAPI_INDEX_SQLGETDIAGREC 77
|
||||
|
||||
#endif
|
|
@ -102,73 +102,74 @@ const int dbch_msvideo = 90;
|
|||
const int dbch_nativefont = 91;
|
||||
const int dbch_nonclient = 92;
|
||||
const int dbch_ntdll = 93;
|
||||
const int dbch_ole = 94;
|
||||
const int dbch_pager = 95;
|
||||
const int dbch_palette = 96;
|
||||
const int dbch_pidl = 97;
|
||||
const int dbch_print = 98;
|
||||
const int dbch_process = 99;
|
||||
const int dbch_profile = 100;
|
||||
const int dbch_progress = 101;
|
||||
const int dbch_prop = 102;
|
||||
const int dbch_propsheet = 103;
|
||||
const int dbch_psapi = 104;
|
||||
const int dbch_psdrv = 105;
|
||||
const int dbch_ras = 106;
|
||||
const int dbch_rebar = 107;
|
||||
const int dbch_reg = 108;
|
||||
const int dbch_region = 109;
|
||||
const int dbch_relay = 110;
|
||||
const int dbch_resource = 111;
|
||||
const int dbch_scroll = 112;
|
||||
const int dbch_security = 113;
|
||||
const int dbch_segment = 114;
|
||||
const int dbch_seh = 115;
|
||||
const int dbch_selector = 116;
|
||||
const int dbch_sendmsg = 117;
|
||||
const int dbch_server = 118;
|
||||
const int dbch_shell = 119;
|
||||
const int dbch_snoop = 120;
|
||||
const int dbch_sound = 121;
|
||||
const int dbch_static = 122;
|
||||
const int dbch_statusbar = 123;
|
||||
const int dbch_storage = 124;
|
||||
const int dbch_stress = 125;
|
||||
const int dbch_string = 126;
|
||||
const int dbch_syscolor = 127;
|
||||
const int dbch_system = 128;
|
||||
const int dbch_tab = 129;
|
||||
const int dbch_tape = 130;
|
||||
const int dbch_tapi = 131;
|
||||
const int dbch_task = 132;
|
||||
const int dbch_text = 133;
|
||||
const int dbch_thread = 134;
|
||||
const int dbch_thunk = 135;
|
||||
const int dbch_timer = 136;
|
||||
const int dbch_toolbar = 137;
|
||||
const int dbch_toolhelp = 138;
|
||||
const int dbch_tooltips = 139;
|
||||
const int dbch_trackbar = 140;
|
||||
const int dbch_treeview = 141;
|
||||
const int dbch_ttydrv = 142;
|
||||
const int dbch_tweak = 143;
|
||||
const int dbch_typelib = 144;
|
||||
const int dbch_updown = 145;
|
||||
const int dbch_ver = 146;
|
||||
const int dbch_virtual = 147;
|
||||
const int dbch_vxd = 148;
|
||||
const int dbch_wave = 149;
|
||||
const int dbch_win = 150;
|
||||
const int dbch_win16drv = 151;
|
||||
const int dbch_win32 = 152;
|
||||
const int dbch_wing = 153;
|
||||
const int dbch_winsock = 154;
|
||||
const int dbch_winspool = 155;
|
||||
const int dbch_wnet = 156;
|
||||
const int dbch_x11 = 157;
|
||||
const int dbch_x11drv = 158;
|
||||
const int dbch_odbc = 94;
|
||||
const int dbch_ole = 95;
|
||||
const int dbch_pager = 96;
|
||||
const int dbch_palette = 97;
|
||||
const int dbch_pidl = 98;
|
||||
const int dbch_print = 99;
|
||||
const int dbch_process = 100;
|
||||
const int dbch_profile = 101;
|
||||
const int dbch_progress = 102;
|
||||
const int dbch_prop = 103;
|
||||
const int dbch_propsheet = 104;
|
||||
const int dbch_psapi = 105;
|
||||
const int dbch_psdrv = 106;
|
||||
const int dbch_ras = 107;
|
||||
const int dbch_rebar = 108;
|
||||
const int dbch_reg = 109;
|
||||
const int dbch_region = 110;
|
||||
const int dbch_relay = 111;
|
||||
const int dbch_resource = 112;
|
||||
const int dbch_scroll = 113;
|
||||
const int dbch_security = 114;
|
||||
const int dbch_segment = 115;
|
||||
const int dbch_seh = 116;
|
||||
const int dbch_selector = 117;
|
||||
const int dbch_sendmsg = 118;
|
||||
const int dbch_server = 119;
|
||||
const int dbch_shell = 120;
|
||||
const int dbch_snoop = 121;
|
||||
const int dbch_sound = 122;
|
||||
const int dbch_static = 123;
|
||||
const int dbch_statusbar = 124;
|
||||
const int dbch_storage = 125;
|
||||
const int dbch_stress = 126;
|
||||
const int dbch_string = 127;
|
||||
const int dbch_syscolor = 128;
|
||||
const int dbch_system = 129;
|
||||
const int dbch_tab = 130;
|
||||
const int dbch_tape = 131;
|
||||
const int dbch_tapi = 132;
|
||||
const int dbch_task = 133;
|
||||
const int dbch_text = 134;
|
||||
const int dbch_thread = 135;
|
||||
const int dbch_thunk = 136;
|
||||
const int dbch_timer = 137;
|
||||
const int dbch_toolbar = 138;
|
||||
const int dbch_toolhelp = 139;
|
||||
const int dbch_tooltips = 140;
|
||||
const int dbch_trackbar = 141;
|
||||
const int dbch_treeview = 142;
|
||||
const int dbch_ttydrv = 143;
|
||||
const int dbch_tweak = 144;
|
||||
const int dbch_typelib = 145;
|
||||
const int dbch_updown = 146;
|
||||
const int dbch_ver = 147;
|
||||
const int dbch_virtual = 148;
|
||||
const int dbch_vxd = 149;
|
||||
const int dbch_wave = 150;
|
||||
const int dbch_win = 151;
|
||||
const int dbch_win16drv = 152;
|
||||
const int dbch_win32 = 153;
|
||||
const int dbch_wing = 154;
|
||||
const int dbch_winsock = 155;
|
||||
const int dbch_winspool = 156;
|
||||
const int dbch_wnet = 157;
|
||||
const int dbch_x11 = 158;
|
||||
const int dbch_x11drv = 159;
|
||||
|
||||
#define DEBUG_CHANNEL_COUNT 159
|
||||
#define DEBUG_CHANNEL_COUNT 160
|
||||
|
||||
char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
|
||||
{1, 1, 0, 0},
|
||||
|
@ -329,6 +330,7 @@ char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
|
|||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0},
|
||||
{1, 1, 0, 0}
|
||||
};
|
||||
|
||||
|
@ -427,6 +429,7 @@ const char * const debug_ch_name[DEBUG_CHANNEL_COUNT] = {
|
|||
"nativefont",
|
||||
"nonclient",
|
||||
"ntdll",
|
||||
"odbc",
|
||||
"ole",
|
||||
"pager",
|
||||
"palette",
|
||||
|
|
|
@ -0,0 +1,730 @@
|
|||
/*
|
||||
* ODBC definitions
|
||||
*
|
||||
*/
|
||||
#ifndef __SQL_H
|
||||
#define __SQL_H
|
||||
|
||||
#ifndef ODBCVER
|
||||
#define ODBCVER 0x0351
|
||||
#endif
|
||||
|
||||
#include "sqltypes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SQL_NULL_DATA (-1)
|
||||
#define SQL_DATA_AT_EXEC (-2)
|
||||
#define SQL_SUCCESS 0
|
||||
#define SQL_SUCCESS_WITH_INFO 1
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_NO_DATA 100
|
||||
#endif
|
||||
#define SQL_ERROR (-1)
|
||||
#define SQL_INVALID_HANDLE (-2)
|
||||
#define SQL_STILL_EXECUTING 2
|
||||
#define SQL_NEED_DATA 99
|
||||
#define SQL_SUCCEEDED(rc) (((rc)&(~1))==0)
|
||||
|
||||
#define SQL_NTS (-3)
|
||||
#define SQL_NTSL (-3L)
|
||||
|
||||
#define SQL_MAX_MESSAGE_LENGTH 512
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_DATE_LEN 10
|
||||
#define SQL_TIME_LEN 8
|
||||
#define SQL_TIMESTAMP_LEN 19
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_HANDLE_ENV 1
|
||||
#define SQL_HANDLE_DBC 2
|
||||
#define SQL_HANDLE_STMT 3
|
||||
#define SQL_HANDLE_DESC 4
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_ATTR_OUTPUT_NTS 10001
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_ATTR_AUTO_IPD 10001
|
||||
#define SQL_ATTR_METADATA_ID 10014
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_ATTR_APP_ROW_DESC 10010
|
||||
#define SQL_ATTR_APP_PARAM_DESC 10011
|
||||
#define SQL_ATTR_IMP_ROW_DESC 10012
|
||||
#define SQL_ATTR_IMP_PARAM_DESC 10013
|
||||
#define SQL_ATTR_CURSOR_SCROLLABLE (-1)
|
||||
#define SQL_ATTR_CURSOR_SENSITIVITY (-2)
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_NONSCROLLABLE 0
|
||||
#define SQL_SCROLLABLE 1
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_DESC_COUNT 1001
|
||||
#define SQL_DESC_TYPE 1002
|
||||
#define SQL_DESC_LENGTH 1003
|
||||
#define SQL_DESC_OCTET_LENGTH_PTR 1004
|
||||
#define SQL_DESC_PRECISION 1005
|
||||
#define SQL_DESC_SCALE 1006
|
||||
#define SQL_DESC_DATETIME_INTERVAL_CODE 1007
|
||||
#define SQL_DESC_NULLABLE 1008
|
||||
#define SQL_DESC_INDICATOR_PTR 1009
|
||||
#define SQL_DESC_DATA_PTR 1010
|
||||
#define SQL_DESC_NAME 1011
|
||||
#define SQL_DESC_UNNAMED 1012
|
||||
#define SQL_DESC_OCTET_LENGTH 1013
|
||||
#define SQL_DESC_ALLOC_TYPE 1099
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_DIAG_RETURNCODE 1
|
||||
#define SQL_DIAG_NUMBER 2
|
||||
#define SQL_DIAG_ROW_COUNT 3
|
||||
#define SQL_DIAG_SQLSTATE 4
|
||||
#define SQL_DIAG_NATIVE 5
|
||||
#define SQL_DIAG_MESSAGE_TEXT 6
|
||||
#define SQL_DIAG_DYNAMIC_FUNCTION 7
|
||||
#define SQL_DIAG_CLASS_ORIGIN 8
|
||||
#define SQL_DIAG_SUBCLASS_ORIGIN 9
|
||||
#define SQL_DIAG_CONNECTION_NAME 10
|
||||
#define SQL_DIAG_SERVER_NAME 11
|
||||
#define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_DIAG_ALTER_DOMAIN 3
|
||||
#define SQL_DIAG_ALTER_TABLE 4
|
||||
#define SQL_DIAG_CALL 7
|
||||
#define SQL_DIAG_CREATE_ASSERTION 6
|
||||
#define SQL_DIAG_CREATE_CHARACTER_SET 8
|
||||
#define SQL_DIAG_CREATE_COLLATION 10
|
||||
#define SQL_DIAG_CREATE_DOMAIN 23
|
||||
#define SQL_DIAG_CREATE_INDEX (-1)
|
||||
#define SQL_DIAG_CREATE_SCHEMA 64
|
||||
#define SQL_DIAG_CREATE_TABLE 77
|
||||
#define SQL_DIAG_CREATE_TRANSLATION 79
|
||||
#define SQL_DIAG_CREATE_VIEW 84
|
||||
#define SQL_DIAG_DELETE_WHERE 19
|
||||
#define SQL_DIAG_DROP_ASSERTION 24
|
||||
#define SQL_DIAG_DROP_CHARACTER_SET 25
|
||||
#define SQL_DIAG_DROP_COLLATION 26
|
||||
#define SQL_DIAG_DROP_DOMAIN 27
|
||||
#define SQL_DIAG_DROP_INDEX (-2)
|
||||
#define SQL_DIAG_DROP_SCHEMA 31
|
||||
#define SQL_DIAG_DROP_TABLE 32
|
||||
#define SQL_DIAG_DROP_TRANSLATION 33
|
||||
#define SQL_DIAG_DROP_VIEW 36
|
||||
#define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38
|
||||
#define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81
|
||||
#define SQL_DIAG_GRANT 48
|
||||
#define SQL_DIAG_INSERT 50
|
||||
#define SQL_DIAG_REVOKE 59
|
||||
#define SQL_DIAG_SELECT_CURSOR 85
|
||||
#define SQL_DIAG_UNKNOWN_STATEMENT 0
|
||||
#define SQL_DIAG_UPDATE_WHERE 82
|
||||
#endif
|
||||
|
||||
#define SQL_UNKNOWN_TYPE 0
|
||||
#define SQL_CHAR 1
|
||||
#define SQL_NUMERIC 2
|
||||
#define SQL_DECIMAL 3
|
||||
#define SQL_INTEGER 4
|
||||
#define SQL_SMALLINT 5
|
||||
#define SQL_FLOAT 6
|
||||
#define SQL_REAL 7
|
||||
#define SQL_DOUBLE 8
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_DATETIME 9
|
||||
#endif
|
||||
#define SQL_VARCHAR 12
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_TYPE_DATE 91
|
||||
#define SQL_TYPE_TIME 92
|
||||
#define SQL_TYPE_TIMESTAMP 93
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_UNSPECIFIED 0
|
||||
#define SQL_INSENSITIVE 1
|
||||
#define SQL_SENSITIVE 2
|
||||
#endif
|
||||
|
||||
#define SQL_ALL_TYPES 0
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_DEFAULT 99
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_ARD_TYPE (-99)
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_CODE_DATE 1
|
||||
#define SQL_CODE_TIME 2
|
||||
#define SQL_CODE_TIMESTAMP 3
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_FALSE 0
|
||||
#define SQL_TRUE 1
|
||||
#endif
|
||||
|
||||
#define SQL_NO_NULLS 0
|
||||
#define SQL_NULLABLE 1
|
||||
|
||||
#define SQL_NULLABLE_UNKNOWN 2
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_PRED_NONE 0
|
||||
#define SQL_PRED_CHAR 1
|
||||
#define SQL_PRED_BASIC 2
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_NAMED 0
|
||||
#define SQL_UNNAMED 1
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_DESC_ALLOC_AUTO 1
|
||||
#define SQL_DESC_ALLOC_USER 2
|
||||
#endif
|
||||
|
||||
#define SQL_CLOSE 0
|
||||
#define SQL_DROP 1
|
||||
#define SQL_UNBIND 2
|
||||
#define SQL_RESET_PARAMS 3
|
||||
#define SQL_FETCH_NEXT 1
|
||||
#define SQL_FETCH_FIRST 2
|
||||
#define SQL_FETCH_LAST 3
|
||||
#define SQL_FETCH_PRIOR 4
|
||||
#define SQL_FETCH_ABSOLUTE 5
|
||||
#define SQL_FETCH_RELATIVE 6
|
||||
|
||||
#define SQL_COMMIT 0
|
||||
#define SQL_ROLLBACK 1
|
||||
|
||||
#define SQL_NULL_HENV 0
|
||||
#define SQL_NULL_HDBC 0
|
||||
#define SQL_NULL_HSTMT 0
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_NULL_HDESC 0
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_NULL_HANDLE 0L
|
||||
#endif
|
||||
|
||||
#define SQL_SCOPE_CURROW 0
|
||||
#define SQL_SCOPE_TRANSACTION 1
|
||||
#define SQL_SCOPE_SESSION 2
|
||||
|
||||
#define SQL_PC_UNKNOWN 0
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_PC_NON_PSEUDO 1
|
||||
#endif
|
||||
#define SQL_PC_PSEUDO 2
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_ROW_IDENTIFIER 1
|
||||
#endif
|
||||
|
||||
#define SQL_INDEX_UNIQUE 0
|
||||
#define SQL_INDEX_ALL 1
|
||||
|
||||
#define SQL_INDEX_CLUSTERED 1
|
||||
#define SQL_INDEX_HASHED 2
|
||||
#define SQL_INDEX_OTHER 3
|
||||
|
||||
#define SQL_API_SQLALLOCCONNECT 1
|
||||
#define SQL_API_SQLALLOCENV 2
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLALLOCHANDLE 1001
|
||||
#endif
|
||||
#define SQL_API_SQLALLOCSTMT 3
|
||||
#define SQL_API_SQLBINDCOL 4
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLBINDPARAM 1002
|
||||
#endif
|
||||
#define SQL_API_SQLCANCEL 5
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLCLOSECURSOR 1003
|
||||
#define SQL_API_SQLCOLATTRIBUTE 6
|
||||
#endif
|
||||
#define SQL_API_SQLCOLUMNS 40
|
||||
#define SQL_API_SQLCONNECT 7
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLCOPYDESC 1004
|
||||
#endif
|
||||
#define SQL_API_SQLDATASOURCES 57
|
||||
#define SQL_API_SQLDESCRIBECOL 8
|
||||
#define SQL_API_SQLDISCONNECT 9
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLENDTRAN 1005
|
||||
#endif
|
||||
#define SQL_API_SQLERROR 10
|
||||
#define SQL_API_SQLEXECDIRECT 11
|
||||
#define SQL_API_SQLEXECUTE 12
|
||||
#define SQL_API_SQLFETCH 13
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLFETCHSCROLL 1021
|
||||
#endif
|
||||
#define SQL_API_SQLFREECONNECT 14
|
||||
#define SQL_API_SQLFREEENV 15
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLFREEHANDLE 1006
|
||||
#endif
|
||||
#define SQL_API_SQLFREESTMT 16
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLGETCONNECTATTR 1007
|
||||
#endif
|
||||
#define SQL_API_SQLGETCONNECTOPTION 42
|
||||
#define SQL_API_SQLGETCURSORNAME 17
|
||||
#define SQL_API_SQLGETDATA 43
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLGETDESCFIELD 1008
|
||||
#define SQL_API_SQLGETDESCREC 1009
|
||||
#define SQL_API_SQLGETDIAGFIELD 1010
|
||||
#define SQL_API_SQLGETDIAGREC 1011
|
||||
#define SQL_API_SQLGETENVATTR 1012
|
||||
#endif
|
||||
#define SQL_API_SQLGETFUNCTIONS 44
|
||||
#define SQL_API_SQLGETINFO 45
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLGETSTMTATTR 1014
|
||||
#endif
|
||||
#define SQL_API_SQLGETSTMTOPTION 46
|
||||
#define SQL_API_SQLGETTYPEINFO 47
|
||||
#define SQL_API_SQLNUMRESULTCOLS 18
|
||||
#define SQL_API_SQLPARAMDATA 48
|
||||
#define SQL_API_SQLPREPARE 19
|
||||
#define SQL_API_SQLPUTDATA 49
|
||||
#define SQL_API_SQLROWCOUNT 20
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLSETCONNECTATTR 1016
|
||||
#endif
|
||||
#define SQL_API_SQLSETCONNECTOPTION 50
|
||||
#define SQL_API_SQLSETCURSORNAME 21
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLSETDESCFIELD 1017
|
||||
#define SQL_API_SQLSETDESCREC 1018
|
||||
#define SQL_API_SQLSETENVATTR 1019
|
||||
#endif
|
||||
#define SQL_API_SQLSETPARAM 22
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_API_SQLSETSTMTATTR 1020
|
||||
#endif
|
||||
#define SQL_API_SQLSETSTMTOPTION 51
|
||||
#define SQL_API_SQLSPECIALCOLUMNS 52
|
||||
#define SQL_API_SQLSTATISTICS 53
|
||||
#define SQL_API_SQLTABLES 54
|
||||
#define SQL_API_SQLTRANSACT 23
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_MAX_DRIVER_CONNECTIONS 0
|
||||
#define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS
|
||||
#define SQL_MAX_CONCURRENT_ACTIVITIES 1
|
||||
#define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIES
|
||||
#endif
|
||||
#define SQL_DATA_SOURCE_NAME 2
|
||||
#define SQL_FETCH_DIRECTION 8
|
||||
#define SQL_SERVER_NAME 13
|
||||
#define SQL_SEARCH_PATTERN_ESCAPE 14
|
||||
#define SQL_DBMS_NAME 17
|
||||
#define SQL_DBMS_VER 18
|
||||
#define SQL_ACCESSIBLE_TABLES 19
|
||||
#define SQL_ACCESSIBLE_PROCEDURES 20
|
||||
#define SQL_CURSOR_COMMIT_BEHAVIOR 23
|
||||
#define SQL_DATA_SOURCE_READ_ONLY 25
|
||||
#define SQL_DEFAULT_TXN_ISOLATION 26
|
||||
#define SQL_IDENTIFIER_CASE 28
|
||||
#define SQL_IDENTIFIER_QUOTE_CHAR 29
|
||||
#define SQL_MAX_COLUMN_NAME_LEN 30
|
||||
#define SQL_MAXIMUM_COLUMN_NAME_LENGTH SQL_MAX_COLUMN_NAME_LEN
|
||||
#define SQL_MAX_CURSOR_NAME_LEN 31
|
||||
#define SQL_MAXIMUM_CURSOR_NAME_LENGTH SQL_MAX_CURSOR_NAME_LEN
|
||||
#define SQL_MAX_SCHEMA_NAME_LEN 32
|
||||
#define SQL_MAXIMUM_SCHEMA_NAME_LENGTH SQL_MAX_SCHEMA_NAME_LEN
|
||||
#define SQL_MAX_CATALOG_NAME_LEN 34
|
||||
#define SQL_MAXIMUM_CATALOG_NAME_LENGTH SQL_MAX_CATALOG_NAME_LEN
|
||||
#define SQL_MAX_TABLE_NAME_LEN 35
|
||||
#define SQL_SCROLL_CONCURRENCY 43
|
||||
#define SQL_TXN_CAPABLE 46
|
||||
#define SQL_TRANSACTION_CAPABLE SQL_TXN_CAPABLE
|
||||
#define SQL_USER_NAME 47
|
||||
#define SQL_TXN_ISOLATION_OPTION 72
|
||||
#define SQL_TRANSACTION_ISOLATION_OPTION SQL_TXN_ISOLATION_OPTION
|
||||
#define SQL_INTEGRITY 73
|
||||
#define SQL_GETDATA_EXTENSIONS 81
|
||||
#define SQL_NULL_COLLATION 85
|
||||
#define SQL_ALTER_TABLE 86
|
||||
#define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
|
||||
#define SQL_SPECIAL_CHARACTERS 94
|
||||
#define SQL_MAX_COLUMNS_IN_GROUP_BY 97
|
||||
#define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY SQL_MAX_COLUMNS_IN_GROUP_BY
|
||||
#define SQL_MAX_COLUMNS_IN_INDEX 98
|
||||
#define SQL_MAXIMUM_COLUMNS_IN_INDEX SQL_MAX_COLUMNS_IN_INDEX
|
||||
#define SQL_MAX_COLUMNS_IN_ORDER_BY 99
|
||||
#define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY SQL_MAX_COLUMNS_IN_ORDER_BY
|
||||
#define SQL_MAX_COLUMNS_IN_SELECT 100
|
||||
#define SQL_MAXIMUM_COLUMNS_IN_SELECT SQL_MAX_COLUMNS_IN_SELECT
|
||||
#define SQL_MAX_COLUMNS_IN_TABLE 101
|
||||
#define SQL_MAX_INDEX_SIZE 102
|
||||
#define SQL_MAXIMUM_INDEX_SIZE SQL_MAX_INDEX_SIZE
|
||||
#define SQL_MAX_ROW_SIZE 104
|
||||
#define SQL_MAXIMUM_ROW_SIZE SQL_MAX_ROW_SIZE
|
||||
#define SQL_MAX_STATEMENT_LEN 105
|
||||
#define SQL_MAXIMUM_STATEMENT_LENGTH SQL_MAX_STATEMENT_LEN
|
||||
#define SQL_MAX_TABLES_IN_SELECT 106
|
||||
#define SQL_MAXIMUM_TABLES_IN_SELECT SQL_MAX_TABLES_IN_SELECT
|
||||
#define SQL_MAX_USER_NAME_LEN 107
|
||||
#define SQL_MAXIMUM_USER_NAME_LENGTH SQL_MAX_USER_NAME_LEN
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_OJ_CAPABILITIES 115
|
||||
#define SQL_OUTER_JOIN_CAPABILITIES SQL_OJ_CAPABILITIES
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_XOPEN_CLI_YEAR 10000
|
||||
#define SQL_CURSOR_SENSITIVITY 10001
|
||||
#define SQL_DESCRIBE_PARAMETER 10002
|
||||
#define SQL_CATALOG_NAME 10003
|
||||
#define SQL_COLLATION_SEQ 10004
|
||||
#define SQL_MAX_IDENTIFIER_LEN 10005
|
||||
#define SQL_MAXIMUM_IDENTIFIER_LENGTH SQL_MAX_IDENTIFIER_LEN
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0200)
|
||||
#define SQL_AT_ADD_COLUMN 0x00000001L
|
||||
#define SQL_AT_DROP_COLUMN 0x00000002L
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_AT_ADD_CONSTRAINT 0x00000008L
|
||||
|
||||
#endif /* ODBCVER >= 0x0300 */
|
||||
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_AM_NONE 0
|
||||
#define SQL_AM_CONNECTION 1
|
||||
#define SQL_AM_STATEMENT 2
|
||||
#endif
|
||||
|
||||
#define SQL_CB_DELETE 0
|
||||
#define SQL_CB_CLOSE 1
|
||||
#define SQL_CB_PRESERVE 2
|
||||
|
||||
#define SQL_FD_FETCH_NEXT 0x00000001L
|
||||
#define SQL_FD_FETCH_FIRST 0x00000002L
|
||||
#define SQL_FD_FETCH_LAST 0x00000004L
|
||||
#define SQL_FD_FETCH_PRIOR 0x00000008L
|
||||
#define SQL_FD_FETCH_ABSOLUTE 0x00000010L
|
||||
#define SQL_FD_FETCH_RELATIVE 0x00000020L
|
||||
|
||||
#define SQL_GD_ANY_COLUMN 0x00000001L
|
||||
#define SQL_GD_ANY_ORDER 0x00000002L
|
||||
|
||||
#define SQL_IC_UPPER 1
|
||||
#define SQL_IC_LOWER 2
|
||||
#define SQL_IC_SENSITIVE 3
|
||||
#define SQL_IC_MIXED 4
|
||||
|
||||
#if (ODBCVER >= 0x0201)
|
||||
#define SQL_OJ_LEFT 0x00000001L
|
||||
#define SQL_OJ_RIGHT 0x00000002L
|
||||
#define SQL_OJ_FULL 0x00000004L
|
||||
#define SQL_OJ_NESTED 0x00000008L
|
||||
#define SQL_OJ_NOT_ORDERED 0x00000010L
|
||||
#define SQL_OJ_INNER 0x00000020L
|
||||
#define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L
|
||||
#endif
|
||||
|
||||
#define SQL_SCCO_READ_ONLY 0x00000001L
|
||||
#define SQL_SCCO_LOCK 0x00000002L
|
||||
#define SQL_SCCO_OPT_ROWVER 0x00000004L
|
||||
#define SQL_SCCO_OPT_VALUES 0x00000008L
|
||||
|
||||
#define SQL_TC_NONE 0
|
||||
#define SQL_TC_DML 1
|
||||
#define SQL_TC_ALL 2
|
||||
#define SQL_TC_DDL_COMMIT 3
|
||||
#define SQL_TC_DDL_IGNORE 4
|
||||
|
||||
#define SQL_TXN_READ_UNCOMMITTED 0x00000001L
|
||||
#define SQL_TRANSACTION_READ_UNCOMMITTED SQL_TXN_READ_UNCOMMITTED
|
||||
#define SQL_TXN_READ_COMMITTED 0x00000002L
|
||||
#define SQL_TRANSACTION_READ_COMMITTED SQL_TXN_READ_COMMITTED
|
||||
#define SQL_TXN_REPEATABLE_READ 0x00000004L
|
||||
#define SQL_TRANSACTION_REPEATABLE_READ SQL_TXN_REPEATABLE_READ
|
||||
#define SQL_TXN_SERIALIZABLE 0x00000008L
|
||||
#define SQL_TRANSACTION_SERIALIZABLE SQL_TXN_SERIALIZABLE
|
||||
|
||||
#define SQL_NC_HIGH 0
|
||||
#define SQL_NC_LOW 1
|
||||
|
||||
SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle,
|
||||
SQLHDBC *ConnectionHandle);
|
||||
|
||||
SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType,
|
||||
SQLHANDLE InputHandle, SQLHANDLE *OutputHandle);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle,
|
||||
SQLHSTMT *StatementHandle);
|
||||
|
||||
SQLRETURN WINAPI SQLBindCol(SQLHSTMT StatementHandle,
|
||||
SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
|
||||
SQLPOINTER TargetValue, SQLINTEGER BufferLength,
|
||||
SQLINTEGER *StrLen_or_Ind);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle,
|
||||
SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
|
||||
SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
|
||||
SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
|
||||
SQLINTEGER *StrLen_or_Ind);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLCloseCursor(SQLHSTMT StatementHandle);
|
||||
|
||||
SQLRETURN WINAPI SQLColAttribute (SQLHSTMT StatementHandle,
|
||||
SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier,
|
||||
SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength,
|
||||
SQLSMALLINT *StringLength, SQLPOINTER NumericAttribute);
|
||||
#endif
|
||||
|
||||
|
||||
SQLRETURN WINAPI SQLColumns(SQLHSTMT StatementHandle,
|
||||
SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
|
||||
SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
|
||||
SQLCHAR *TableName, SQLSMALLINT NameLength3,
|
||||
SQLCHAR *ColumnName, SQLSMALLINT NameLength4);
|
||||
|
||||
|
||||
SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle,
|
||||
SQLCHAR *ServerName, SQLSMALLINT NameLength1,
|
||||
SQLCHAR *UserName, SQLSMALLINT NameLength2,
|
||||
SQLCHAR *Authentication, SQLSMALLINT NameLength3);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLCopyDesc(SQLHDESC SourceDescHandle,
|
||||
SQLHDESC TargetDescHandle);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle,
|
||||
SQLUSMALLINT Direction, SQLCHAR *ServerName,
|
||||
SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1,
|
||||
SQLCHAR *Description, SQLSMALLINT BufferLength2,
|
||||
SQLSMALLINT *NameLength2);
|
||||
|
||||
SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle,
|
||||
SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName,
|
||||
SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
|
||||
SQLSMALLINT *DataType, SQLUINTEGER *ColumnSize,
|
||||
SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable);
|
||||
|
||||
SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle,
|
||||
SQLSMALLINT CompletionType);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle,
|
||||
SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle,
|
||||
SQLCHAR *Sqlstate, SQLINTEGER *NativeError,
|
||||
SQLCHAR *MessageText, SQLSMALLINT BufferLength,
|
||||
SQLSMALLINT *TextLength);
|
||||
|
||||
SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle,
|
||||
SQLCHAR *StatementText, SQLINTEGER TextLength);
|
||||
|
||||
SQLRETURN WINAPI SQLExecute(SQLHSTMT StatementHandle);
|
||||
|
||||
SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle,
|
||||
SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle);
|
||||
|
||||
SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle,
|
||||
SQLUSMALLINT Option);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle,
|
||||
SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER BufferLength, SQLINTEGER *StringLength);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle,
|
||||
SQLUSMALLINT Option, SQLPOINTER Value);
|
||||
|
||||
SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle,
|
||||
SQLCHAR *CursorName, SQLSMALLINT BufferLength,
|
||||
SQLSMALLINT *NameLength);
|
||||
|
||||
SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle,
|
||||
SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
|
||||
SQLPOINTER TargetValue, SQLINTEGER BufferLength,
|
||||
SQLINTEGER *StrLen_or_Ind);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLGetDescField(SQLHDESC DescriptorHandle,
|
||||
SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
|
||||
SQLPOINTER Value, SQLINTEGER BufferLength,
|
||||
SQLINTEGER *StringLength);
|
||||
|
||||
SQLRETURN WINAPI SQLGetDescRec(SQLHDESC DescriptorHandle,
|
||||
SQLSMALLINT RecNumber, SQLCHAR *Name,
|
||||
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
|
||||
SQLSMALLINT *Type, SQLSMALLINT *SubType,
|
||||
SQLINTEGER *Length, SQLSMALLINT *Precision,
|
||||
SQLSMALLINT *Scale, SQLSMALLINT *Nullable);
|
||||
|
||||
SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle,
|
||||
SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier,
|
||||
SQLPOINTER DiagInfo, SQLSMALLINT BufferLength,
|
||||
SQLSMALLINT *StringLength);
|
||||
|
||||
SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
|
||||
SQLSMALLINT RecNumber, SQLCHAR *Sqlstate,
|
||||
SQLINTEGER *NativeError, SQLCHAR *MessageText,
|
||||
SQLSMALLINT BufferLength, SQLSMALLINT *TextLength);
|
||||
|
||||
SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle,
|
||||
SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER BufferLength, SQLINTEGER *StringLength);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle,
|
||||
SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported);
|
||||
|
||||
SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle,
|
||||
SQLUSMALLINT InfoType, SQLPOINTER InfoValue,
|
||||
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle,
|
||||
SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER BufferLength, SQLINTEGER *StringLength);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle,
|
||||
SQLUSMALLINT Option, SQLPOINTER Value);
|
||||
|
||||
SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle,
|
||||
SQLSMALLINT DataType);
|
||||
|
||||
SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle,
|
||||
SQLSMALLINT *ColumnCount);
|
||||
|
||||
SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle,
|
||||
SQLPOINTER *Value);
|
||||
|
||||
SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle,
|
||||
SQLCHAR *StatementText, SQLINTEGER TextLength);
|
||||
|
||||
SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle,
|
||||
SQLPOINTER Data, SQLINTEGER StrLen_or_Ind);
|
||||
|
||||
SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle,
|
||||
SQLINTEGER *RowCount);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle,
|
||||
SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER StringLength);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle,
|
||||
SQLUSMALLINT Option, SQLUINTEGER Value);
|
||||
|
||||
SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle,
|
||||
SQLCHAR *CursorName, SQLSMALLINT NameLength);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLSetDescField(SQLHDESC DescriptorHandle,
|
||||
SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
|
||||
SQLPOINTER Value, SQLINTEGER BufferLength);
|
||||
|
||||
SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle,
|
||||
SQLSMALLINT RecNumber, SQLSMALLINT Type,
|
||||
SQLSMALLINT SubType, SQLINTEGER Length,
|
||||
SQLSMALLINT Precision, SQLSMALLINT Scale,
|
||||
SQLPOINTER Data, SQLINTEGER *StringLength,
|
||||
SQLINTEGER *Indicator);
|
||||
|
||||
SQLRETURN WINAPI SQLSetEnvAttr(SQLHENV EnvironmentHandle,
|
||||
SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER StringLength);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle,
|
||||
SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
|
||||
SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
|
||||
SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
|
||||
SQLINTEGER *StrLen_or_Ind);
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle,
|
||||
SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER StringLength);
|
||||
#endif
|
||||
|
||||
SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle,
|
||||
SQLUSMALLINT Option, SQLUINTEGER Value);
|
||||
|
||||
SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle,
|
||||
SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName,
|
||||
SQLSMALLINT NameLength1, SQLCHAR *SchemaName,
|
||||
SQLSMALLINT NameLength2, SQLCHAR *TableName,
|
||||
SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
|
||||
SQLUSMALLINT Nullable);
|
||||
|
||||
SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle,
|
||||
SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
|
||||
SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
|
||||
SQLCHAR *TableName, SQLSMALLINT NameLength3,
|
||||
SQLUSMALLINT Unique, SQLUSMALLINT Reserved);
|
||||
|
||||
SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle,
|
||||
SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
|
||||
SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
|
||||
SQLCHAR *TableName, SQLSMALLINT NameLength3,
|
||||
SQLCHAR *TableType, SQLSMALLINT NameLength4);
|
||||
|
||||
SQLRETURN WINAPI SQLTransact(SQLHENV EnvironmentHandle,
|
||||
SQLHDBC ConnectionHandle, SQLUSMALLINT CompletionType);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,237 @@
|
|||
/*
|
||||
* sqltypes.h
|
||||
*/
|
||||
#ifndef __SQLTYPES_H
|
||||
#define __SQLTYPES_H
|
||||
|
||||
#ifndef ODBCVER
|
||||
#define ODBCVER 0x0351
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _WINDOWS
|
||||
#define FAR
|
||||
#define CALLBACK
|
||||
#define SQL_API
|
||||
#define BOOL int
|
||||
typedef void* HWND;
|
||||
typedef char* GUID;
|
||||
#define GUID_DEFINED
|
||||
typedef char CHAR;
|
||||
typedef void VOID;
|
||||
typedef unsigned short WORD;
|
||||
typedef unsigned long DWORD;
|
||||
typedef unsigned char BYTE;
|
||||
typedef unsigned short WCHAR;
|
||||
typedef WCHAR* LPWSTR;
|
||||
typedef const char* LPCSTR;
|
||||
typedef char* LPSTR;
|
||||
typedef DWORD* LPDWORD;
|
||||
#endif
|
||||
|
||||
typedef unsigned char SQLCHAR;
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
typedef unsigned char SQLDATE;
|
||||
typedef unsigned char SQLDECIMAL;
|
||||
typedef double SQLDOUBLE;
|
||||
typedef double SQLFLOAT;
|
||||
#endif
|
||||
|
||||
typedef long SQLINTEGER;
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
typedef unsigned char SQLNUMERIC;
|
||||
#endif
|
||||
|
||||
typedef void * SQLPOINTER;
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
typedef float SQLREAL;
|
||||
#endif
|
||||
|
||||
typedef signed short int SQLSMALLINT;
|
||||
typedef unsigned short SQLUSMALLINT;
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
typedef unsigned char SQLTIME;
|
||||
typedef unsigned char SQLTIMESTAMP;
|
||||
typedef unsigned char SQLVARCHAR;
|
||||
#endif
|
||||
|
||||
typedef SQLSMALLINT SQLRETURN;
|
||||
|
||||
/* typedef void * SQLHANDLE; */
|
||||
|
||||
typedef SQLINTEGER SQLHANDLE;
|
||||
#if (ODBCVER >= 0x0300)
|
||||
|
||||
typedef SQLHANDLE SQLHENV;
|
||||
typedef SQLHANDLE SQLHDBC;
|
||||
typedef SQLHANDLE SQLHSTMT;
|
||||
typedef SQLHANDLE SQLHDESC;
|
||||
|
||||
#else
|
||||
typedef SQLINTEGER SQLHENV;
|
||||
typedef SQLINTEGER SQLHDBC;
|
||||
typedef SQLINTEGER SQLHSTMT;
|
||||
#endif
|
||||
|
||||
typedef signed char SCHAR;
|
||||
typedef SCHAR SQLSCHAR;
|
||||
typedef long int SDWORD;
|
||||
typedef signed short int SWORD;
|
||||
typedef unsigned long int UDWORD;
|
||||
typedef unsigned short int UWORD;
|
||||
typedef UDWORD SQLUINTEGER;
|
||||
typedef signed long SLONG;
|
||||
typedef signed short SSHORT;
|
||||
typedef double SDOUBLE;
|
||||
typedef double LDOUBLE;
|
||||
typedef float SFLOAT;
|
||||
typedef void* PTR;
|
||||
typedef signed short RETCODE;
|
||||
typedef void* SQLHWND;
|
||||
|
||||
typedef SQLHANDLE HENV;
|
||||
typedef SQLHANDLE HDBC;
|
||||
typedef SQLHANDLE HSTMT;
|
||||
|
||||
#ifndef __SQLDATE
|
||||
#define __SQLDATE
|
||||
typedef struct tagDATE_STRUCT
|
||||
{
|
||||
SQLSMALLINT year;
|
||||
SQLUSMALLINT month;
|
||||
SQLUSMALLINT day;
|
||||
} DATE_STRUCT;
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
typedef DATE_STRUCT SQL_DATE_STRUCT;
|
||||
#endif
|
||||
|
||||
typedef struct tagTIME_STRUCT
|
||||
{
|
||||
SQLUSMALLINT hour;
|
||||
SQLUSMALLINT minute;
|
||||
SQLUSMALLINT second;
|
||||
} TIME_STRUCT;
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
typedef TIME_STRUCT SQL_TIME_STRUCT;
|
||||
#endif
|
||||
|
||||
typedef struct tagTIMESTAMP_STRUCT
|
||||
{
|
||||
SQLSMALLINT year;
|
||||
SQLUSMALLINT month;
|
||||
SQLUSMALLINT day;
|
||||
SQLUSMALLINT hour;
|
||||
SQLUSMALLINT minute;
|
||||
SQLUSMALLINT second;
|
||||
SQLUINTEGER fraction;
|
||||
} TIMESTAMP_STRUCT;
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
|
||||
#endif
|
||||
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
typedef enum
|
||||
{
|
||||
SQL_IS_YEAR = 1,
|
||||
SQL_IS_MONTH = 2,
|
||||
SQL_IS_DAY = 3,
|
||||
SQL_IS_HOUR = 4,
|
||||
SQL_IS_MINUTE = 5,
|
||||
SQL_IS_SECOND = 6,
|
||||
SQL_IS_YEAR_TO_MONTH = 7,
|
||||
SQL_IS_DAY_TO_HOUR = 8,
|
||||
SQL_IS_DAY_TO_MINUTE = 9,
|
||||
SQL_IS_DAY_TO_SECOND = 10,
|
||||
SQL_IS_HOUR_TO_MINUTE = 11,
|
||||
SQL_IS_HOUR_TO_SECOND = 12,
|
||||
SQL_IS_MINUTE_TO_SECOND = 13
|
||||
} SQLINTERVAL;
|
||||
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
typedef struct tagSQL_YEAR_MONTH
|
||||
{
|
||||
SQLUINTEGER year;
|
||||
SQLUINTEGER month;
|
||||
} SQL_YEAR_MONTH_STRUCT;
|
||||
|
||||
typedef struct tagSQL_DAY_SECOND
|
||||
{
|
||||
SQLUINTEGER day;
|
||||
SQLUINTEGER hour;
|
||||
SQLUINTEGER minute;
|
||||
SQLUINTEGER second;
|
||||
SQLUINTEGER fraction;
|
||||
} SQL_DAY_SECOND_STRUCT;
|
||||
|
||||
typedef struct tagSQL_INTERVAL_STRUCT
|
||||
{
|
||||
SQLINTERVAL interval_type;
|
||||
SQLSMALLINT interval_sign;
|
||||
union {
|
||||
SQL_YEAR_MONTH_STRUCT year_month;
|
||||
SQL_DAY_SECOND_STRUCT day_second;
|
||||
} intval;
|
||||
|
||||
} SQL_INTERVAL_STRUCT;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define ODBCINT64 long
|
||||
#ifdef ODBCINT64
|
||||
typedef ODBCINT64 SQLBIGINT;
|
||||
typedef unsigned ODBCINT64 SQLUBIGINT;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0300)
|
||||
#define SQL_MAX_NUMERIC_LEN 16
|
||||
typedef struct tagSQL_NUMERIC_STRUCT
|
||||
{
|
||||
SQLCHAR precision;
|
||||
SQLSCHAR scale;
|
||||
SQLCHAR sign; /* 1=pos 0=neg */
|
||||
SQLCHAR val[SQL_MAX_NUMERIC_LEN];
|
||||
} SQL_NUMERIC_STRUCT;
|
||||
#endif
|
||||
|
||||
#if (ODBCVER >= 0x0350)
|
||||
#ifdef GUID_DEFINED
|
||||
typedef GUID SQLGUID;
|
||||
#else
|
||||
typedef struct tagSQLGUID
|
||||
{
|
||||
DWORD Data1;
|
||||
WORD Data2;
|
||||
WORD Data3;
|
||||
BYTE Data4[ 8 ];
|
||||
} SQLGUID;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
typedef unsigned long int BOOKMARK;
|
||||
|
||||
#define SQL_WCHAR (-8)
|
||||
#define SQL_C_WCHAR SQL_WCHAR
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -58,6 +58,7 @@ static struct tagDllOverride {
|
|||
{"icmp", "builtin"},
|
||||
/* we have to use libglide2x.so instead of glide2x.dll ... */
|
||||
{"glide2x", "so,native"},
|
||||
{"odbc32", "builtin"},
|
||||
{NULL,NULL},
|
||||
};
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ extern const BUILTIN32_DESCRIPTOR MSACMMAP_Descriptor;
|
|||
extern const BUILTIN32_DESCRIPTOR MSNET32_Descriptor;
|
||||
extern const BUILTIN32_DESCRIPTOR MSVFW32_Descriptor;
|
||||
extern const BUILTIN32_DESCRIPTOR NTDLL_Descriptor;
|
||||
extern const BUILTIN32_DESCRIPTOR ODBC32_Descriptor;
|
||||
extern const BUILTIN32_DESCRIPTOR OLE32_Descriptor;
|
||||
extern const BUILTIN32_DESCRIPTOR OLEAUT32_Descriptor;
|
||||
extern const BUILTIN32_DESCRIPTOR OLECLI32_Descriptor;
|
||||
|
@ -134,6 +135,7 @@ static BUILTIN32_DLL BuiltinDLLs[] =
|
|||
{ &MSNET32_Descriptor, 0, 0, NULL },
|
||||
{ &MSVFW32_Descriptor, 0, 0, NULL },
|
||||
{ &NTDLL_Descriptor, 0, 0, NULL },
|
||||
{ &ODBC32_Descriptor, 0, 0, NULL },
|
||||
{ &OLE32_Descriptor, 0, 0, NULL },
|
||||
{ &OLEAUT32_Descriptor, 0, 0, NULL },
|
||||
{ &OLECLI32_Descriptor, 0, 0, NULL },
|
||||
|
|
Loading…
Reference in New Issue