|
|
@ -25,89 +25,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
DEFAULT_DEBUG_CHANNEL(odbc);
|
|
|
|
DEFAULT_DEBUG_CHANNEL(odbc);
|
|
|
|
|
|
|
|
|
|
|
|
static DM_FUNC template_func[] =
|
|
|
|
static const DM_FUNC template_func[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* 00 */ { SQL_API_SQLALLOCCONNECT, "SQLAllocConnect", SQLAllocConnect },
|
|
|
|
/* 00 */ { SQL_API_SQLALLOCCONNECT, "SQLAllocConnect", SQLAllocConnect, NULL },
|
|
|
|
/* 01 */ { SQL_API_SQLALLOCENV, "SQLAllocEnv", SQLAllocEnv },
|
|
|
|
/* 01 */ { SQL_API_SQLALLOCENV, "SQLAllocEnv", SQLAllocEnv, NULL },
|
|
|
|
/* 02 */ { SQL_API_SQLALLOCHANDLE, "SQLAllocHandle", SQLAllocHandle },
|
|
|
|
/* 02 */ { SQL_API_SQLALLOCHANDLE, "SQLAllocHandle", SQLAllocHandle, NULL },
|
|
|
|
/* 03 */ { SQL_API_SQLALLOCSTMT, "SQLAllocStmt", SQLAllocStmt },
|
|
|
|
/* 03 */ { SQL_API_SQLALLOCSTMT, "SQLAllocStmt", SQLAllocStmt, NULL },
|
|
|
|
/* 04 */ { SQL_API_SQLALLOCHANDLESTD, "SQLAllocHandleStd", SQLAllocHandleStd },
|
|
|
|
/* 04 */ { SQL_API_SQLALLOCHANDLESTD, "SQLAllocHandleStd", SQLAllocHandleStd, NULL },
|
|
|
|
/* 05 */ { SQL_API_SQLBINDCOL, "SQLBindCol", SQLBindCol },
|
|
|
|
/* 05 */ { SQL_API_SQLBINDCOL, "SQLBindCol", SQLBindCol, NULL },
|
|
|
|
/* 06 */ { SQL_API_SQLBINDPARAM, "SQLBindParam", SQLBindParam },
|
|
|
|
/* 06 */ { SQL_API_SQLBINDPARAM, "SQLBindParam", SQLBindParam, NULL },
|
|
|
|
/* 07 */ { SQL_API_SQLBINDPARAMETER, "SQLBindParameter", SQLBindParameter },
|
|
|
|
/* 07 */ { SQL_API_SQLBINDPARAMETER, "SQLBindParameter", SQLBindParameter, NULL },
|
|
|
|
/* 08 */ { SQL_API_SQLBROWSECONNECT, "SQLBrowseConnect", SQLBrowseConnect },
|
|
|
|
/* 08 */ { SQL_API_SQLBROWSECONNECT, "SQLBrowseConnect", SQLBrowseConnect, NULL },
|
|
|
|
/* 09 */ { SQL_API_SQLBULKOPERATIONS, "SQLBulkOperations", SQLBulkOperations },
|
|
|
|
/* 09 */ { SQL_API_SQLBULKOPERATIONS, "SQLBulkOperations", SQLBulkOperations, NULL },
|
|
|
|
/* 10 */ { SQL_API_SQLCANCEL, "SQLCancel", SQLCancel },
|
|
|
|
/* 10 */ { SQL_API_SQLCANCEL, "SQLCancel", SQLCancel, NULL },
|
|
|
|
/* 11 */ { SQL_API_SQLCLOSECURSOR, "SQLCloseCursor", SQLCloseCursor },
|
|
|
|
/* 11 */ { SQL_API_SQLCLOSECURSOR, "SQLCloseCursor", SQLCloseCursor, NULL },
|
|
|
|
/* 12 */ { SQL_API_SQLCOLATTRIBUTE, "SQLColAttribute", SQLColAttribute },
|
|
|
|
/* 12 */ { SQL_API_SQLCOLATTRIBUTE, "SQLColAttribute", SQLColAttribute, NULL },
|
|
|
|
/* 13 */ { SQL_API_SQLCOLATTRIBUTES, "SQLColAttributes", SQLColAttributes },
|
|
|
|
/* 13 */ { SQL_API_SQLCOLATTRIBUTES, "SQLColAttributes", SQLColAttributes, NULL },
|
|
|
|
/* 14 */ { SQL_API_SQLCOLUMNPRIVILEGES, "SQLColumnPrivileges", SQLColumnPrivileges },
|
|
|
|
/* 14 */ { SQL_API_SQLCOLUMNPRIVILEGES, "SQLColumnPrivileges", SQLColumnPrivileges, NULL },
|
|
|
|
/* 15 */ { SQL_API_SQLCOLUMNS, "SQLColumns", SQLColumns },
|
|
|
|
/* 15 */ { SQL_API_SQLCOLUMNS, "SQLColumns", SQLColumns, NULL },
|
|
|
|
/* 16 */ { SQL_API_SQLCONNECT, "SQLConnect", SQLConnect },
|
|
|
|
/* 16 */ { SQL_API_SQLCONNECT, "SQLConnect", SQLConnect, NULL },
|
|
|
|
/* 17 */ { SQL_API_SQLCOPYDESC, "SQLCopyDesc", SQLCopyDesc },
|
|
|
|
/* 17 */ { SQL_API_SQLCOPYDESC, "SQLCopyDesc", SQLCopyDesc, NULL },
|
|
|
|
/* 18 */ { SQL_API_SQLDATASOURCES, "SQLDataSources", SQLDataSources },
|
|
|
|
/* 18 */ { SQL_API_SQLDATASOURCES, "SQLDataSources", SQLDataSources, NULL },
|
|
|
|
/* 19 */ { SQL_API_SQLDESCRIBECOL, "SQLDescribeCol", SQLDescribeCol },
|
|
|
|
/* 19 */ { SQL_API_SQLDESCRIBECOL, "SQLDescribeCol", SQLDescribeCol, NULL },
|
|
|
|
/* 20 */ { SQL_API_SQLDESCRIBEPARAM, "SQLDescribeParam", SQLDescribeParam },
|
|
|
|
/* 20 */ { SQL_API_SQLDESCRIBEPARAM, "SQLDescribeParam", SQLDescribeParam, NULL },
|
|
|
|
/* 21 */ { SQL_API_SQLDISCONNECT, "SQLDisconnect", SQLDisconnect },
|
|
|
|
/* 21 */ { SQL_API_SQLDISCONNECT, "SQLDisconnect", SQLDisconnect, NULL },
|
|
|
|
/* 22 */ { SQL_API_SQLDRIVERCONNECT, "SQLDriverConnect", SQLDriverConnect },
|
|
|
|
/* 22 */ { SQL_API_SQLDRIVERCONNECT, "SQLDriverConnect", SQLDriverConnect, NULL },
|
|
|
|
/* 23 */ { SQL_API_SQLDRIVERS, "SQLDrivers", SQLDrivers },
|
|
|
|
/* 23 */ { SQL_API_SQLDRIVERS, "SQLDrivers", SQLDrivers, NULL },
|
|
|
|
/* 24 */ { SQL_API_SQLENDTRAN, "SQLEndTran", SQLEndTran },
|
|
|
|
/* 24 */ { SQL_API_SQLENDTRAN, "SQLEndTran", SQLEndTran, NULL },
|
|
|
|
/* 25 */ { SQL_API_SQLERROR, "SQLError", SQLError },
|
|
|
|
/* 25 */ { SQL_API_SQLERROR, "SQLError", SQLError, NULL },
|
|
|
|
/* 26 */ { SQL_API_SQLEXECDIRECT, "SQLExecDirect", SQLExecDirect },
|
|
|
|
/* 26 */ { SQL_API_SQLEXECDIRECT, "SQLExecDirect", SQLExecDirect, NULL },
|
|
|
|
/* 27 */ { SQL_API_SQLEXECUTE, "SQLExecute", SQLExecute },
|
|
|
|
/* 27 */ { SQL_API_SQLEXECUTE, "SQLExecute", SQLExecute, NULL },
|
|
|
|
/* 28 */ { SQL_API_SQLEXTENDEDFETCH, "SQLExtendedFetch", SQLExtendedFetch },
|
|
|
|
/* 28 */ { SQL_API_SQLEXTENDEDFETCH, "SQLExtendedFetch", SQLExtendedFetch, NULL },
|
|
|
|
/* 29 */ { SQL_API_SQLFETCH, "SQLFetch", SQLFetch },
|
|
|
|
/* 29 */ { SQL_API_SQLFETCH, "SQLFetch", SQLFetch, NULL },
|
|
|
|
/* 30 */ { SQL_API_SQLFETCHSCROLL, "SQLFetchScroll", SQLFetchScroll },
|
|
|
|
/* 30 */ { SQL_API_SQLFETCHSCROLL, "SQLFetchScroll", SQLFetchScroll, NULL },
|
|
|
|
/* 31 */ { SQL_API_SQLFOREIGNKEYS, "SQLForeignKeys", SQLForeignKeys },
|
|
|
|
/* 31 */ { SQL_API_SQLFOREIGNKEYS, "SQLForeignKeys", SQLForeignKeys, NULL },
|
|
|
|
/* 32 */ { SQL_API_SQLFREEENV, "SQLFreeEnv", SQLFreeEnv },
|
|
|
|
/* 32 */ { SQL_API_SQLFREEENV, "SQLFreeEnv", SQLFreeEnv, NULL },
|
|
|
|
/* 33 */ { SQL_API_SQLFREEHANDLE, "SQLFreeHandle", SQLFreeHandle },
|
|
|
|
/* 33 */ { SQL_API_SQLFREEHANDLE, "SQLFreeHandle", SQLFreeHandle, NULL },
|
|
|
|
/* 34 */ { SQL_API_SQLFREESTMT, "SQLFreeStmt", SQLFreeStmt },
|
|
|
|
/* 34 */ { SQL_API_SQLFREESTMT, "SQLFreeStmt", SQLFreeStmt, NULL },
|
|
|
|
/* 35 */ { SQL_API_SQLFREECONNECT, "SQLFreeConnect", SQLFreeConnect },
|
|
|
|
/* 35 */ { SQL_API_SQLFREECONNECT, "SQLFreeConnect", SQLFreeConnect, NULL },
|
|
|
|
/* 36 */ { SQL_API_SQLGETCONNECTATTR, "SQLGetConnectAttr", SQLGetConnectAttr },
|
|
|
|
/* 36 */ { SQL_API_SQLGETCONNECTATTR, "SQLGetConnectAttr", SQLGetConnectAttr, NULL },
|
|
|
|
/* 37 */ { SQL_API_SQLGETCONNECTOPTION, "SQLGetConnectOption", SQLGetConnectOption },
|
|
|
|
/* 37 */ { SQL_API_SQLGETCONNECTOPTION, "SQLGetConnectOption", SQLGetConnectOption, NULL },
|
|
|
|
/* 38 */ { SQL_API_SQLGETCURSORNAME, "SQLGetCursorName", SQLGetCursorName },
|
|
|
|
/* 38 */ { SQL_API_SQLGETCURSORNAME, "SQLGetCursorName", SQLGetCursorName, NULL },
|
|
|
|
/* 39 */ { SQL_API_SQLGETDATA, "SQLGetData", SQLGetData },
|
|
|
|
/* 39 */ { SQL_API_SQLGETDATA, "SQLGetData", SQLGetData, NULL },
|
|
|
|
/* 40 */ { SQL_API_SQLGETDESCFIELD, "SQLGetDescField", SQLGetDescField },
|
|
|
|
/* 40 */ { SQL_API_SQLGETDESCFIELD, "SQLGetDescField", SQLGetDescField, NULL },
|
|
|
|
/* 41 */ { SQL_API_SQLGETDESCREC, "SQLGetDescRec", SQLGetDescRec },
|
|
|
|
/* 41 */ { SQL_API_SQLGETDESCREC, "SQLGetDescRec", SQLGetDescRec, NULL },
|
|
|
|
/* 42 */ { SQL_API_SQLGETDIAGFIELD, "SQLGetDiagField", SQLGetDiagField },
|
|
|
|
/* 42 */ { SQL_API_SQLGETDIAGFIELD, "SQLGetDiagField", SQLGetDiagField, NULL },
|
|
|
|
/* 43 */ { SQL_API_SQLGETENVATTR, "SQLGetEnvAttr", SQLGetEnvAttr },
|
|
|
|
/* 43 */ { SQL_API_SQLGETENVATTR, "SQLGetEnvAttr", SQLGetEnvAttr, NULL },
|
|
|
|
/* 44 */ { SQL_API_SQLGETFUNCTIONS, "SQLGetFunctions", SQLGetFunctions },
|
|
|
|
/* 44 */ { SQL_API_SQLGETFUNCTIONS, "SQLGetFunctions", SQLGetFunctions, NULL },
|
|
|
|
/* 45 */ { SQL_API_SQLGETINFO, "SQLGetInfo", SQLGetInfo },
|
|
|
|
/* 45 */ { SQL_API_SQLGETINFO, "SQLGetInfo", SQLGetInfo, NULL },
|
|
|
|
/* 46 */ { SQL_API_SQLGETSTMTATTR, "SQLGetStmtAttr", SQLGetStmtAttr },
|
|
|
|
/* 46 */ { SQL_API_SQLGETSTMTATTR, "SQLGetStmtAttr", SQLGetStmtAttr, NULL },
|
|
|
|
/* 47 */ { SQL_API_SQLGETSTMTOPTION, "SQLGetStmtOption", SQLGetStmtOption },
|
|
|
|
/* 47 */ { SQL_API_SQLGETSTMTOPTION, "SQLGetStmtOption", SQLGetStmtOption, NULL },
|
|
|
|
/* 48 */ { SQL_API_SQLGETTYPEINFO, "SQLGetTypeInfo", SQLGetTypeInfo },
|
|
|
|
/* 48 */ { SQL_API_SQLGETTYPEINFO, "SQLGetTypeInfo", SQLGetTypeInfo, NULL },
|
|
|
|
/* 49 */ { SQL_API_SQLMORERESULTS, "SQLMoreResults", SQLMoreResults },
|
|
|
|
/* 49 */ { SQL_API_SQLMORERESULTS, "SQLMoreResults", SQLMoreResults, NULL },
|
|
|
|
/* 50 */ { SQL_API_SQLNATIVESQL, "SQLNativeSql", SQLNativeSql },
|
|
|
|
/* 50 */ { SQL_API_SQLNATIVESQL, "SQLNativeSql", SQLNativeSql, NULL },
|
|
|
|
/* 51 */ { SQL_API_SQLNUMPARAMS, "SQLNumParams", SQLNumParams },
|
|
|
|
/* 51 */ { SQL_API_SQLNUMPARAMS, "SQLNumParams", SQLNumParams, NULL },
|
|
|
|
/* 52 */ { SQL_API_SQLNUMRESULTCOLS, "SQLNumResultCols", SQLNumResultCols },
|
|
|
|
/* 52 */ { SQL_API_SQLNUMRESULTCOLS, "SQLNumResultCols", SQLNumResultCols, NULL },
|
|
|
|
/* 53 */ { SQL_API_SQLPARAMDATA, "SQLParamData", SQLParamData },
|
|
|
|
/* 53 */ { SQL_API_SQLPARAMDATA, "SQLParamData", SQLParamData, NULL },
|
|
|
|
/* 54 */ { SQL_API_SQLPARAMOPTIONS, "SQLParamOptions", SQLParamOptions },
|
|
|
|
/* 54 */ { SQL_API_SQLPARAMOPTIONS, "SQLParamOptions", SQLParamOptions, NULL },
|
|
|
|
/* 55 */ { SQL_API_SQLPREPARE, "SQLPrepare", SQLPrepare },
|
|
|
|
/* 55 */ { SQL_API_SQLPREPARE, "SQLPrepare", SQLPrepare, NULL },
|
|
|
|
/* 56 */ { SQL_API_SQLPRIMARYKEYS, "SQLPrimaryKeys", SQLPrimaryKeys },
|
|
|
|
/* 56 */ { SQL_API_SQLPRIMARYKEYS, "SQLPrimaryKeys", SQLPrimaryKeys, NULL },
|
|
|
|
/* 57 */ { SQL_API_SQLPROCEDURECOLUMNS, "SQLProcedureColumns", SQLProcedureColumns },
|
|
|
|
/* 57 */ { SQL_API_SQLPROCEDURECOLUMNS, "SQLProcedureColumns", SQLProcedureColumns, NULL },
|
|
|
|
/* 58 */ { SQL_API_SQLPROCEDURES, "SQLProcedures", SQLProcedures },
|
|
|
|
/* 58 */ { SQL_API_SQLPROCEDURES, "SQLProcedures", SQLProcedures, NULL },
|
|
|
|
/* 59 */ { SQL_API_SQLPUTDATA, "SQLPutData", SQLPutData },
|
|
|
|
/* 59 */ { SQL_API_SQLPUTDATA, "SQLPutData", SQLPutData, NULL },
|
|
|
|
/* 60 */ { SQL_API_SQLROWCOUNT, "SQLRowCount", SQLRowCount },
|
|
|
|
/* 60 */ { SQL_API_SQLROWCOUNT, "SQLRowCount", SQLRowCount, NULL },
|
|
|
|
/* 61 */ { SQL_API_SQLSETCONNECTATTR, "SQLSetConnectAttr", SQLSetConnectAttr },
|
|
|
|
/* 61 */ { SQL_API_SQLSETCONNECTATTR, "SQLSetConnectAttr", SQLSetConnectAttr, NULL },
|
|
|
|
/* 62 */ { SQL_API_SQLSETCONNECTOPTION, "SQLSetConnectOption", SQLSetConnectOption },
|
|
|
|
/* 62 */ { SQL_API_SQLSETCONNECTOPTION, "SQLSetConnectOption", SQLSetConnectOption, NULL },
|
|
|
|
/* 63 */ { SQL_API_SQLSETCURSORNAME, "SQLSetCursorName", SQLSetCursorName },
|
|
|
|
/* 63 */ { SQL_API_SQLSETCURSORNAME, "SQLSetCursorName", SQLSetCursorName, NULL },
|
|
|
|
/* 64 */ { SQL_API_SQLSETDESCFIELD, "SQLSetDescField", SQLSetDescField },
|
|
|
|
/* 64 */ { SQL_API_SQLSETDESCFIELD, "SQLSetDescField", SQLSetDescField, NULL },
|
|
|
|
/* 65 */ { SQL_API_SQLSETDESCREC, "SQLSetDescRec", SQLSetDescRec },
|
|
|
|
/* 65 */ { SQL_API_SQLSETDESCREC, "SQLSetDescRec", SQLSetDescRec, NULL },
|
|
|
|
/* 66 */ { SQL_API_SQLSETENVATTR, "SQLSetEnvAttr", SQLSetEnvAttr },
|
|
|
|
/* 66 */ { SQL_API_SQLSETENVATTR, "SQLSetEnvAttr", SQLSetEnvAttr, NULL },
|
|
|
|
/* 67 */ { SQL_API_SQLSETPARAM, "SQLSetParam", SQLSetParam },
|
|
|
|
/* 67 */ { SQL_API_SQLSETPARAM, "SQLSetParam", SQLSetParam, NULL },
|
|
|
|
/* 68 */ { SQL_API_SQLSETPOS, "SQLSetPos", SQLSetPos },
|
|
|
|
/* 68 */ { SQL_API_SQLSETPOS, "SQLSetPos", SQLSetPos, NULL },
|
|
|
|
/* 69 */ { SQL_API_SQLSETSCROLLOPTIONS, "SQLSetScrollOptions", SQLSetScrollOptions },
|
|
|
|
/* 69 */ { SQL_API_SQLSETSCROLLOPTIONS, "SQLSetScrollOptions", SQLSetScrollOptions, NULL },
|
|
|
|
/* 70 */ { SQL_API_SQLSETSTMTATTR, "SQLSetStmtAttr", SQLSetStmtAttr },
|
|
|
|
/* 70 */ { SQL_API_SQLSETSTMTATTR, "SQLSetStmtAttr", SQLSetStmtAttr, NULL },
|
|
|
|
/* 71 */ { SQL_API_SQLSETSTMTOPTION, "SQLSetStmtOption", SQLSetStmtOption },
|
|
|
|
/* 71 */ { SQL_API_SQLSETSTMTOPTION, "SQLSetStmtOption", SQLSetStmtOption, NULL },
|
|
|
|
/* 72 */ { SQL_API_SQLSPECIALCOLUMNS, "SQLSpecialColumns", SQLSpecialColumns },
|
|
|
|
/* 72 */ { SQL_API_SQLSPECIALCOLUMNS, "SQLSpecialColumns", SQLSpecialColumns, NULL },
|
|
|
|
/* 73 */ { SQL_API_SQLSTATISTICS, "SQLStatistics", SQLStatistics },
|
|
|
|
/* 73 */ { SQL_API_SQLSTATISTICS, "SQLStatistics", SQLStatistics, NULL },
|
|
|
|
/* 74 */ { SQL_API_SQLTABLEPRIVILEGES, "SQLTablePrivileges", SQLTablePrivileges },
|
|
|
|
/* 74 */ { SQL_API_SQLTABLEPRIVILEGES, "SQLTablePrivileges", SQLTablePrivileges, NULL },
|
|
|
|
/* 75 */ { SQL_API_SQLTABLES, "SQLTables", SQLTables },
|
|
|
|
/* 75 */ { SQL_API_SQLTABLES, "SQLTables", SQLTables, NULL },
|
|
|
|
/* 76 */ { SQL_API_SQLTRANSACT, "SQLTransact", SQLTransact },
|
|
|
|
/* 76 */ { SQL_API_SQLTRANSACT, "SQLTransact", SQLTransact, NULL },
|
|
|
|
/* 77 */ { SQL_API_SQLGETDIAGREC, "SQLGetDiagRec", SQLGetDiagRec },
|
|
|
|
/* 77 */ { SQL_API_SQLGETDIAGREC, "SQLGetDiagRec", SQLGetDiagRec, NULL },
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static PROXYHANDLE gProxyHandle = {NULL, FALSE, FALSE, FALSE, ERROR_LIBRARY_NOT_FOUND};
|
|
|
|
static PROXYHANDLE gProxyHandle = {
|
|
|
|
|
|
|
|
NULL,
|
|
|
|
|
|
|
|
FALSE,
|
|
|
|
|
|
|
|
FALSE,
|
|
|
|
|
|
|
|
FALSE,
|
|
|
|
|
|
|
|
ERROR_LIBRARY_NOT_FOUND,
|
|
|
|
|
|
|
|
{ },
|
|
|
|
|
|
|
|
"",
|
|
|
|
|
|
|
|
"",
|
|
|
|
|
|
|
|
"",
|
|
|
|
|
|
|
|
""
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
SQLRETURN SQLDummyFunc()
|
|
|
|
SQLRETURN SQLDummyFunc()
|
|
|
|
{
|
|
|
|
{
|
|
|
|