1 #ifndef _PROXYMANAGER_H
2 #define _PROXYMANAGER_H
6 #define ERROR_SQLERROR 1
7 #define ERROR_LIBRARY_NOT_FOUND 2
8 #define ERROR_FUNCTIONS_NOT_LOADED 3
10 #define ODBCVER 0x0351
12 typedef struct dm_func
/* driver manager functions */
20 typedef struct proxyhandle
22 void *dmHandle
; /* driver manager handle */
23 BOOL isWindowsDriver
; /* is driver a Windows version*/
24 BOOL bCallbackReady
; /* procs taken from Windows driver placed in driver manager as callbacks */
27 DM_FUNC functions
[NUM_SQLFUNC
]; /* entry point for driver manager functions */
28 char driverLibName
[200]; /* ODBC driver SO name */
29 char dmLibName
[200]; /* driver manager library name */
30 char ServerName
[200]; /* keep server name */
31 char UserName
[50]; /* keep username */
34 BOOL
ODBC_LoadDriverManager();
35 BOOL
ODBC_LoadDMFunctions();
37 #define /* 00 */ SQLAPI_INDEX_SQLALLOCCONNECT 0
38 #define /* 01 */ SQLAPI_INDEX_SQLALLOCENV 1
39 #define /* 02 */ SQLAPI_INDEX_SQLALLOCHANDLE 2
40 #define /* 03 */ SQLAPI_INDEX_SQLALLOCSTMT 3
41 #define /* 04 */ SQLAPI_INDEX_SQLALLOCHANDLESTD 4
42 #define /* 05 */ SQLAPI_INDEX_SQLBINDCOL 5
43 #define /* 06 */ SQLAPI_INDEX_SQLBINDPARAM 6
44 #define /* 07 */ SQLAPI_INDEX_SQLBINDPARAMETER 7
45 #define /* 08 */ SQLAPI_INDEX_SQLBROWSECONNECT 8
46 #define /* 09 */ SQLAPI_INDEX_SQLBULKOPERATIONS 9
47 #define /* 10 */ SQLAPI_INDEX_SQLCANCEL 10
48 #define /* 11 */ SQLAPI_INDEX_SQLCLOSECURSOR 11
49 #define /* 12 */ SQLAPI_INDEX_SQLCOLATTRIBUTE 12
50 #define /* 13 */ SQLAPI_INDEX_SQLCOLATTRIBUTES 13
51 #define /* 14 */ SQLAPI_INDEX_SQLCOLUMNPRIVILEGES 14
52 #define /* 15 */ SQLAPI_INDEX_SQLCOLUMNS 15
53 #define /* 16 */ SQLAPI_INDEX_SQLCONNECT 16
54 #define /* 17 */ SQLAPI_INDEX_SQLCOPYDESC 17
55 #define /* 18 */ SQLAPI_INDEX_SQLDATASOURCES 18
56 #define /* 19 */ SQLAPI_INDEX_SQLDESCRIBECOL 19
57 #define /* 20 */ SQLAPI_INDEX_SQLDESCRIBEPARAM 20
58 #define /* 21 */ SQLAPI_INDEX_SQLDISCONNECT 21
59 #define /* 22 */ SQLAPI_INDEX_SQLDRIVERCONNECT 22
60 #define /* 23 */ SQLAPI_INDEX_SQLDRIVERS 23
61 #define /* 24 */ SQLAPI_INDEX_SQLENDTRAN 24
62 #define /* 25 */ SQLAPI_INDEX_SQLERROR 25
63 #define /* 26 */ SQLAPI_INDEX_SQLEXECDIRECT 26
64 #define /* 27 */ SQLAPI_INDEX_SQLEXECUTE 27
65 #define /* 28 */ SQLAPI_INDEX_SQLEXTENDEDFETCH 28
66 #define /* 29 */ SQLAPI_INDEX_SQLFETCH 29
67 #define /* 30 */ SQLAPI_INDEX_SQLFETCHSCROLL 30
68 #define /* 31 */ SQLAPI_INDEX_SQLFOREIGNKEYS 31
69 #define /* 32 */ SQLAPI_INDEX_SQLFREEENV 32
70 #define /* 33 */ SQLAPI_INDEX_SQLFREEHANDLE 33
71 #define /* 34 */ SQLAPI_INDEX_SQLFREESTMT 34
72 #define /* 35 */ SQLAPI_INDEX_SQLFREECONNECT 35
73 #define /* 36 */ SQLAPI_INDEX_SQLGETCONNECTATTR 36
74 #define /* 37 */ SQLAPI_INDEX_SQLGETCONNECTOPTION 37
75 #define /* 38 */ SQLAPI_INDEX_SQLGETCURSORNAME 38
76 #define /* 39 */ SQLAPI_INDEX_SQLGETDATA 39
77 #define /* 40 */ SQLAPI_INDEX_SQLGETDESCFIELD 40
78 #define /* 41 */ SQLAPI_INDEX_SQLGETDESCREC 41
79 #define /* 42 */ SQLAPI_INDEX_SQLGETDIAGFIELD 42
80 #define /* 43 */ SQLAPI_INDEX_SQLGETENVATTR 43
81 #define /* 44 */ SQLAPI_INDEX_SQLGETFUNCTIONS 44
82 #define /* 45 */ SQLAPI_INDEX_SQLGETINFO 45
83 #define /* 46 */ SQLAPI_INDEX_SQLGETSTMTATTR 46
84 #define /* 47 */ SQLAPI_INDEX_SQLGETSTMTOPTION 47
85 #define /* 48 */ SQLAPI_INDEX_SQLGETTYPEINFO 48
86 #define /* 49 */ SQLAPI_INDEX_SQLMORERESULTS 49
87 #define /* 50 */ SQLAPI_INDEX_SQLNATIVESQL 50
88 #define /* 51 */ SQLAPI_INDEX_SQLNUMPARAMS 51
89 #define /* 52 */ SQLAPI_INDEX_SQLNUMRESULTCOLS 52
90 #define /* 53 */ SQLAPI_INDEX_SQLPARAMDATA 53
91 #define /* 54 */ SQLAPI_INDEX_SQLPARAMOPTIONS 54
92 #define /* 55 */ SQLAPI_INDEX_SQLPREPARE 55
93 #define /* 56 */ SQLAPI_INDEX_SQLPRIMARYKEYS 56
94 #define /* 57 */ SQLAPI_INDEX_SQLPROCEDURECOLUMNS 57
95 #define /* 58 */ SQLAPI_INDEX_SQLPROCEDURES 58
96 #define /* 59 */ SQLAPI_INDEX_SQLPUTDATA 59
97 #define /* 60 */ SQLAPI_INDEX_SQLROWCOUNT 60
98 #define /* 61 */ SQLAPI_INDEX_SQLSETCONNECTATTR 61
99 #define /* 62 */ SQLAPI_INDEX_SQLSETCONNECTOPTION 62
100 #define /* 63 */ SQLAPI_INDEX_SQLSETCURSORNAME 63
101 #define /* 64 */ SQLAPI_INDEX_SQLSETDESCFIELD 64
102 #define /* 65 */ SQLAPI_INDEX_SQLSETDESCREC 65
103 #define /* 66 */ SQLAPI_INDEX_SQLSETENVATTR 66
104 #define /* 67 */ SQLAPI_INDEX_SQLSETPARAM 67
105 #define /* 68 */ SQLAPI_INDEX_SQLSETPOS 68
106 #define /* 69 */ SQLAPI_INDEX_SQLSETSCROLLOPTIONS 69
107 #define /* 70 */ SQLAPI_INDEX_SQLSETSTMTATTR 70
108 #define /* 71 */ SQLAPI_INDEX_SQLSETSTMTOPTION 71
109 #define /* 72 */ SQLAPI_INDEX_SQLSPECIALCOLUMNS 72
110 #define /* 73 */ SQLAPI_INDEX_SQLSTATISTICS 73
111 #define /* 74 */ SQLAPI_INDEX_SQLTABLEPRIVILEGES 74
112 #define /* 75 */ SQLAPI_INDEX_SQLTABLES 75
113 #define /* 76 */ SQLAPI_INDEX_SQLTRANSACT 76
114 #define /* 77 */ SQLAPI_INDEX_SQLGETDIAGREC 77