00001
00026 #ifndef INC_MI32_MODBC_H
00027 #define INC_MI32_MODBC_H
00028
00029 #ifndef INC_MI32_STDDEFNS_H
00030 #include <mi32/stddefns.h>
00031 #endif
00032
00033
00034 #ifdef RVCSYSDLL
00035 #define RVCSYSLIBEXPORT MI_DLLEXPORT
00036 #else
00037 #define RVCSYSLIBEXPORT MI_DLLIMPORT
00038 #endif
00039
00040 class MISTRING;
00041 class MISTRINGLIST;
00042
00043 #if defined(WIN32)
00044 #define ODBC 1 // For checking if we have ODBC at all
00045 #endif
00046
00047 #if (defined(X_NATIVE) || defined(WIN32_MFC))
00048
00050 int ModbcSelectSource (
00051 MDLGPARENT dlgparent,
00052 char *title,
00053 MISTRING& RetName
00054 );
00055
00057 int ModbcUsernamePasswordDialogOld (
00058 MDLGPARENT dlgparent,
00059 MIUNICODE *srcname,
00060 int maxlen,
00061 int *pKeep,
00062 int *pTimeoutInterval,
00063 UINT32 flags
00064 );
00065
00067 int ModbcUsernamePasswordDialog (
00068 MDLGPARENT dlgparent,
00069 MISTRING& srcname,
00070 bool *pKeep,
00071 int *pTimeoutInterval
00072 );
00073
00074 #endif
00075
00076
00077 extern "C" {
00078
00079
00081 RVCSYSLIBEXPORT void ModbcFreeStringList (
00082 MIUNICODE **NameList
00083 );
00084
00086 RVCSYSLIBEXPORT MIUNICODE *ModbcExtractConnectPart (
00087 const MIUNICODE*,
00088 char*
00089 );
00090
00092 RVCSYSLIBEXPORT int ModbcGetDataSourceList (
00093 MIUNICODE ***pNameList,
00094 MIUNICODE ***pDescList
00095 );
00096
00098 RVCSYSLIBEXPORT int ModbcGetDriverList (MIUNICODE ***pNameList,
00099 MIUNICODE ***pDescList
00100 );
00101
00103 RVCSYSLIBEXPORT int ModbcGetHENV (
00104 void **phenv
00105 );
00106
00108 RVCSYSLIBEXPORT int _ModbcGetLastError (
00109 void* hdbc,
00110 void* hstmt,
00111 char *rcsid,
00112 int linenum
00113 );
00114
00115 }
00116
00117 RVCSYSLIBEXPORT void ModbcExtractConnectPart (
00118 const MISTRING& fname,
00119 const char *part,
00120 MISTRING& retstr
00121 );
00122
00123 RVCSYSLIBEXPORT ERRVALUE ModbcGetDataSourceList (
00124 MISTRINGLIST& NameList,
00125 MISTRINGLIST& DescList
00126 );
00127
00128 RVCSYSLIBEXPORT ERRVALUE ModbcGetDriverList (
00129 MISTRINGLIST& NameList,
00130 MISTRINGLIST& DescList
00131 );
00132
00133 RVCSYSLIBEXPORT ERRVALUE ModbcGetENV (
00134 void*& ps_henv
00135 );
00136
00137 RVCSYSLIBEXPORT int ModbcGetLastError (
00138 int HandleType,
00139 void* handle,
00140 char *rcsid,
00141 int linenum,
00142 const MIUNICODE* QueryString = 0
00143 );
00144
00145
00146 #endif // INC_MI32_MODBC_H
00147