1999-12-12 00:56:46 +01:00
|
|
|
/*
|
|
|
|
* Win32 ODBC functions
|
2002-06-01 01:06:46 +02:00
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* Copyright 1999 Xiang Li, Corel Corporation
|
1999-12-12 00:56:46 +01:00
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2003-10-02 06:25:21 +02:00
|
|
|
*
|
|
|
|
* NOTES:
|
|
|
|
* Proxy ODBC driver manager. This manager delegates all ODBC
|
|
|
|
* calls to a real ODBC driver manager named by the environment
|
|
|
|
* variable LIB_ODBC_DRIVER_MANAGER, or to libodbc.so if the
|
|
|
|
* variable is not set.
|
|
|
|
*
|
1999-12-12 00:56:46 +01:00
|
|
|
*/
|
|
|
|
|
2001-11-06 21:57:11 +01:00
|
|
|
#include "config.h"
|
2001-10-14 18:25:47 +02:00
|
|
|
#include "wine/port.h"
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
1999-12-12 00:56:46 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2001-10-02 22:28:06 +02:00
|
|
|
#include <assert.h>
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "windef.h"
|
1999-12-12 00:56:46 +01:00
|
|
|
#include "winbase.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2002-04-26 21:05:15 +02:00
|
|
|
#include "wine/library.h"
|
1999-12-12 00:56:46 +01:00
|
|
|
|
|
|
|
#include "sql.h"
|
|
|
|
#include "sqltypes.h"
|
|
|
|
#include "sqlext.h"
|
|
|
|
|
|
|
|
#include "proxyodbc.h"
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
static BOOL ODBC_LoadDriverManager(void);
|
|
|
|
static BOOL ODBC_LoadDMFunctions(void);
|
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(odbc);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2000-10-24 04:22:16 +02:00
|
|
|
static const DM_FUNC template_func[] =
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2000-10-24 04:22:16 +02:00
|
|
|
/* 00 */ { SQL_API_SQLALLOCCONNECT, "SQLAllocConnect", SQLAllocConnect, NULL },
|
|
|
|
/* 01 */ { SQL_API_SQLALLOCENV, "SQLAllocEnv", SQLAllocEnv, NULL },
|
|
|
|
/* 02 */ { SQL_API_SQLALLOCHANDLE, "SQLAllocHandle", SQLAllocHandle, NULL },
|
|
|
|
/* 03 */ { SQL_API_SQLALLOCSTMT, "SQLAllocStmt", SQLAllocStmt, NULL },
|
|
|
|
/* 04 */ { SQL_API_SQLALLOCHANDLESTD, "SQLAllocHandleStd", SQLAllocHandleStd, NULL },
|
|
|
|
/* 05 */ { SQL_API_SQLBINDCOL, "SQLBindCol", SQLBindCol, NULL },
|
|
|
|
/* 06 */ { SQL_API_SQLBINDPARAM, "SQLBindParam", SQLBindParam, NULL },
|
|
|
|
/* 07 */ { SQL_API_SQLBINDPARAMETER, "SQLBindParameter", SQLBindParameter, NULL },
|
|
|
|
/* 08 */ { SQL_API_SQLBROWSECONNECT, "SQLBrowseConnect", SQLBrowseConnect, NULL },
|
|
|
|
/* 09 */ { SQL_API_SQLBULKOPERATIONS, "SQLBulkOperations", SQLBulkOperations, NULL },
|
|
|
|
/* 10 */ { SQL_API_SQLCANCEL, "SQLCancel", SQLCancel, NULL },
|
|
|
|
/* 11 */ { SQL_API_SQLCLOSECURSOR, "SQLCloseCursor", SQLCloseCursor, NULL },
|
|
|
|
/* 12 */ { SQL_API_SQLCOLATTRIBUTE, "SQLColAttribute", SQLColAttribute, NULL },
|
|
|
|
/* 13 */ { SQL_API_SQLCOLATTRIBUTES, "SQLColAttributes", SQLColAttributes, NULL },
|
|
|
|
/* 14 */ { SQL_API_SQLCOLUMNPRIVILEGES, "SQLColumnPrivileges", SQLColumnPrivileges, NULL },
|
|
|
|
/* 15 */ { SQL_API_SQLCOLUMNS, "SQLColumns", SQLColumns, NULL },
|
|
|
|
/* 16 */ { SQL_API_SQLCONNECT, "SQLConnect", SQLConnect, NULL },
|
|
|
|
/* 17 */ { SQL_API_SQLCOPYDESC, "SQLCopyDesc", SQLCopyDesc, NULL },
|
|
|
|
/* 18 */ { SQL_API_SQLDATASOURCES, "SQLDataSources", SQLDataSources, NULL },
|
|
|
|
/* 19 */ { SQL_API_SQLDESCRIBECOL, "SQLDescribeCol", SQLDescribeCol, NULL },
|
|
|
|
/* 20 */ { SQL_API_SQLDESCRIBEPARAM, "SQLDescribeParam", SQLDescribeParam, NULL },
|
|
|
|
/* 21 */ { SQL_API_SQLDISCONNECT, "SQLDisconnect", SQLDisconnect, NULL },
|
|
|
|
/* 22 */ { SQL_API_SQLDRIVERCONNECT, "SQLDriverConnect", SQLDriverConnect, NULL },
|
|
|
|
/* 23 */ { SQL_API_SQLDRIVERS, "SQLDrivers", SQLDrivers, NULL },
|
|
|
|
/* 24 */ { SQL_API_SQLENDTRAN, "SQLEndTran", SQLEndTran, NULL },
|
|
|
|
/* 25 */ { SQL_API_SQLERROR, "SQLError", SQLError, NULL },
|
|
|
|
/* 26 */ { SQL_API_SQLEXECDIRECT, "SQLExecDirect", SQLExecDirect, NULL },
|
|
|
|
/* 27 */ { SQL_API_SQLEXECUTE, "SQLExecute", SQLExecute, NULL },
|
|
|
|
/* 28 */ { SQL_API_SQLEXTENDEDFETCH, "SQLExtendedFetch", SQLExtendedFetch, NULL },
|
|
|
|
/* 29 */ { SQL_API_SQLFETCH, "SQLFetch", SQLFetch, NULL },
|
|
|
|
/* 30 */ { SQL_API_SQLFETCHSCROLL, "SQLFetchScroll", SQLFetchScroll, NULL },
|
|
|
|
/* 31 */ { SQL_API_SQLFOREIGNKEYS, "SQLForeignKeys", SQLForeignKeys, NULL },
|
|
|
|
/* 32 */ { SQL_API_SQLFREEENV, "SQLFreeEnv", SQLFreeEnv, NULL },
|
|
|
|
/* 33 */ { SQL_API_SQLFREEHANDLE, "SQLFreeHandle", SQLFreeHandle, NULL },
|
|
|
|
/* 34 */ { SQL_API_SQLFREESTMT, "SQLFreeStmt", SQLFreeStmt, NULL },
|
|
|
|
/* 35 */ { SQL_API_SQLFREECONNECT, "SQLFreeConnect", SQLFreeConnect, NULL },
|
|
|
|
/* 36 */ { SQL_API_SQLGETCONNECTATTR, "SQLGetConnectAttr", SQLGetConnectAttr, NULL },
|
|
|
|
/* 37 */ { SQL_API_SQLGETCONNECTOPTION, "SQLGetConnectOption", SQLGetConnectOption, NULL },
|
|
|
|
/* 38 */ { SQL_API_SQLGETCURSORNAME, "SQLGetCursorName", SQLGetCursorName, NULL },
|
|
|
|
/* 39 */ { SQL_API_SQLGETDATA, "SQLGetData", SQLGetData, NULL },
|
|
|
|
/* 40 */ { SQL_API_SQLGETDESCFIELD, "SQLGetDescField", SQLGetDescField, NULL },
|
|
|
|
/* 41 */ { SQL_API_SQLGETDESCREC, "SQLGetDescRec", SQLGetDescRec, NULL },
|
|
|
|
/* 42 */ { SQL_API_SQLGETDIAGFIELD, "SQLGetDiagField", SQLGetDiagField, NULL },
|
|
|
|
/* 43 */ { SQL_API_SQLGETENVATTR, "SQLGetEnvAttr", SQLGetEnvAttr, NULL },
|
|
|
|
/* 44 */ { SQL_API_SQLGETFUNCTIONS, "SQLGetFunctions", SQLGetFunctions, NULL },
|
|
|
|
/* 45 */ { SQL_API_SQLGETINFO, "SQLGetInfo", SQLGetInfo, NULL },
|
|
|
|
/* 46 */ { SQL_API_SQLGETSTMTATTR, "SQLGetStmtAttr", SQLGetStmtAttr, NULL },
|
|
|
|
/* 47 */ { SQL_API_SQLGETSTMTOPTION, "SQLGetStmtOption", SQLGetStmtOption, NULL },
|
|
|
|
/* 48 */ { SQL_API_SQLGETTYPEINFO, "SQLGetTypeInfo", SQLGetTypeInfo, NULL },
|
|
|
|
/* 49 */ { SQL_API_SQLMORERESULTS, "SQLMoreResults", SQLMoreResults, NULL },
|
|
|
|
/* 50 */ { SQL_API_SQLNATIVESQL, "SQLNativeSql", SQLNativeSql, NULL },
|
|
|
|
/* 51 */ { SQL_API_SQLNUMPARAMS, "SQLNumParams", SQLNumParams, NULL },
|
|
|
|
/* 52 */ { SQL_API_SQLNUMRESULTCOLS, "SQLNumResultCols", SQLNumResultCols, NULL },
|
|
|
|
/* 53 */ { SQL_API_SQLPARAMDATA, "SQLParamData", SQLParamData, NULL },
|
|
|
|
/* 54 */ { SQL_API_SQLPARAMOPTIONS, "SQLParamOptions", SQLParamOptions, NULL },
|
|
|
|
/* 55 */ { SQL_API_SQLPREPARE, "SQLPrepare", SQLPrepare, NULL },
|
|
|
|
/* 56 */ { SQL_API_SQLPRIMARYKEYS, "SQLPrimaryKeys", SQLPrimaryKeys, NULL },
|
|
|
|
/* 57 */ { SQL_API_SQLPROCEDURECOLUMNS, "SQLProcedureColumns", SQLProcedureColumns, NULL },
|
|
|
|
/* 58 */ { SQL_API_SQLPROCEDURES, "SQLProcedures", SQLProcedures, NULL },
|
|
|
|
/* 59 */ { SQL_API_SQLPUTDATA, "SQLPutData", SQLPutData, NULL },
|
|
|
|
/* 60 */ { SQL_API_SQLROWCOUNT, "SQLRowCount", SQLRowCount, NULL },
|
|
|
|
/* 61 */ { SQL_API_SQLSETCONNECTATTR, "SQLSetConnectAttr", SQLSetConnectAttr, NULL },
|
|
|
|
/* 62 */ { SQL_API_SQLSETCONNECTOPTION, "SQLSetConnectOption", SQLSetConnectOption, NULL },
|
|
|
|
/* 63 */ { SQL_API_SQLSETCURSORNAME, "SQLSetCursorName", SQLSetCursorName, NULL },
|
|
|
|
/* 64 */ { SQL_API_SQLSETDESCFIELD, "SQLSetDescField", SQLSetDescField, NULL },
|
|
|
|
/* 65 */ { SQL_API_SQLSETDESCREC, "SQLSetDescRec", SQLSetDescRec, NULL },
|
|
|
|
/* 66 */ { SQL_API_SQLSETENVATTR, "SQLSetEnvAttr", SQLSetEnvAttr, NULL },
|
|
|
|
/* 67 */ { SQL_API_SQLSETPARAM, "SQLSetParam", SQLSetParam, NULL },
|
|
|
|
/* 68 */ { SQL_API_SQLSETPOS, "SQLSetPos", SQLSetPos, NULL },
|
|
|
|
/* 69 */ { SQL_API_SQLSETSCROLLOPTIONS, "SQLSetScrollOptions", SQLSetScrollOptions, NULL },
|
|
|
|
/* 70 */ { SQL_API_SQLSETSTMTATTR, "SQLSetStmtAttr", SQLSetStmtAttr, NULL },
|
|
|
|
/* 71 */ { SQL_API_SQLSETSTMTOPTION, "SQLSetStmtOption", SQLSetStmtOption, NULL },
|
|
|
|
/* 72 */ { SQL_API_SQLSPECIALCOLUMNS, "SQLSpecialColumns", SQLSpecialColumns, NULL },
|
|
|
|
/* 73 */ { SQL_API_SQLSTATISTICS, "SQLStatistics", SQLStatistics, NULL },
|
|
|
|
/* 74 */ { SQL_API_SQLTABLEPRIVILEGES, "SQLTablePrivileges", SQLTablePrivileges, NULL },
|
|
|
|
/* 75 */ { SQL_API_SQLTABLES, "SQLTables", SQLTables, NULL },
|
|
|
|
/* 76 */ { SQL_API_SQLTRANSACT, "SQLTransact", SQLTransact, NULL },
|
|
|
|
/* 77 */ { SQL_API_SQLGETDIAGREC, "SQLGetDiagRec", SQLGetDiagRec, NULL },
|
1999-12-12 00:56:46 +01:00
|
|
|
};
|
|
|
|
|
2002-07-05 23:22:32 +02:00
|
|
|
static PROXYHANDLE gProxyHandle;
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
/* What is the difference between these two (dmHandle cf READY_AND_dmHandle)? When does one use one and when the other? */
|
|
|
|
|
|
|
|
#define CHECK_dmHandle() \
|
|
|
|
{ \
|
|
|
|
if (gProxyHandle.dmHandle == NULL) \
|
|
|
|
{ \
|
|
|
|
TRACE ("Not ready\n"); \
|
|
|
|
return SQL_ERROR; \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define CHECK_READY_AND_dmHandle() \
|
|
|
|
{ \
|
|
|
|
if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL) \
|
|
|
|
{ \
|
|
|
|
TRACE ("Not ready\n"); \
|
|
|
|
return SQL_ERROR; \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
1999-12-27 06:26:00 +01:00
|
|
|
SQLRETURN SQLDummyFunc()
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("SQLDummyFunc: \n");
|
|
|
|
return SQL_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-11-05 00:53:41 +01:00
|
|
|
* DllMain [Internal] Initializes the internal 'ODBC32.DLL'.
|
1999-12-12 00:56:46 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
2000-07-16 17:44:22 +02:00
|
|
|
* hinstDLL [I] handle to the DLL's instance
|
1999-12-12 00:56:46 +01:00
|
|
|
* fdwReason [I]
|
2000-07-16 17:44:22 +02:00
|
|
|
* lpvReserved [I] reserved, must be NULL
|
1999-12-12 00:56:46 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE
|
|
|
|
* Failure: FALSE
|
|
|
|
*/
|
|
|
|
|
2002-11-05 00:53:41 +01:00
|
|
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
int i;
|
2002-10-19 01:48:57 +02:00
|
|
|
TRACE("Initializing or Finalizing proxy ODBC: %p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
|
|
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
|
|
|
{
|
|
|
|
TRACE("Loading ODBC...\n");
|
2003-06-30 22:53:48 +02:00
|
|
|
DisableThreadLibraryCalls(hinstDLL);
|
1999-12-12 00:56:46 +01:00
|
|
|
if (ODBC_LoadDriverManager())
|
|
|
|
ODBC_LoadDMFunctions();
|
|
|
|
}
|
|
|
|
else if (fdwReason == DLL_PROCESS_DETACH)
|
|
|
|
{
|
|
|
|
TRACE("Unloading ODBC...\n");
|
|
|
|
if (gProxyHandle.bFunctionReady)
|
|
|
|
{
|
|
|
|
for ( i = 0; i < NUM_SQLFUNC; i ++ )
|
|
|
|
{
|
|
|
|
gProxyHandle.functions[i].func = SQLDummyFunc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (gProxyHandle.dmHandle)
|
|
|
|
{
|
2000-12-13 22:32:55 +01:00
|
|
|
wine_dlclose(gProxyHandle.dmHandle,NULL,0);
|
1999-12-12 00:56:46 +01:00
|
|
|
gProxyHandle.dmHandle = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* ODBC_LoadDriverManager [Internal] Load ODBC library.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE
|
|
|
|
* Failure: FALSE
|
|
|
|
*/
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
static BOOL ODBC_LoadDriverManager(void)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
const char *s = getenv("LIB_ODBC_DRIVER_MANAGER");
|
2000-12-13 22:32:55 +01:00
|
|
|
char error[256];
|
1999-12-12 00:56:46 +01:00
|
|
|
|
|
|
|
TRACE("\n");
|
|
|
|
|
|
|
|
gProxyHandle.bFunctionReady = FALSE;
|
2002-07-05 23:22:32 +02:00
|
|
|
gProxyHandle.nErrorType = ERROR_LIBRARY_NOT_FOUND;
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
if (s!= NULL && strlen (s) >= sizeof(gProxyHandle.dmLibName))
|
|
|
|
{
|
|
|
|
ERR("Driver name too long (%s)\n",s);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
if (s == NULL || strlen(s) == 0)
|
|
|
|
s = "libodbc.so";
|
|
|
|
strcpy(gProxyHandle.dmLibName, s);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2000-12-13 22:32:55 +01:00
|
|
|
gProxyHandle.dmHandle = wine_dlopen(gProxyHandle.dmLibName, RTLD_LAZY, error, sizeof(error));
|
1999-12-12 00:56:46 +01:00
|
|
|
|
|
|
|
if (gProxyHandle.dmHandle == NULL) /* fail to load unixODBC driver manager */
|
|
|
|
{
|
2000-12-13 22:32:55 +01:00
|
|
|
WARN("failed to open library %s: %s\n", gProxyHandle.dmLibName, error);
|
1999-12-12 00:56:46 +01:00
|
|
|
gProxyHandle.dmLibName[0] = '\0';
|
|
|
|
gProxyHandle.nErrorType = ERROR_LIBRARY_NOT_FOUND;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gProxyHandle.nErrorType = ERROR_FREE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* ODBC_LoadDMFunctions [Internal] Populate function table.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE
|
|
|
|
* Failure: FALSE
|
|
|
|
*/
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
static BOOL ODBC_LoadDMFunctions(void)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
int i;
|
2000-12-13 22:32:55 +01:00
|
|
|
char error[256];
|
1999-12-12 00:56:46 +01:00
|
|
|
|
|
|
|
if (gProxyHandle.dmHandle == NULL)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
for ( i = 0; i < NUM_SQLFUNC; i ++ )
|
|
|
|
{
|
|
|
|
gProxyHandle.functions[i] = template_func[i];
|
2000-12-13 22:32:55 +01:00
|
|
|
gProxyHandle.functions[i].func = wine_dlsym(gProxyHandle.dmHandle,
|
|
|
|
gProxyHandle.functions[i].name, error, sizeof(error));
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2000-12-13 22:32:55 +01:00
|
|
|
if (error[0])
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2001-05-09 19:31:31 +02:00
|
|
|
ERR("Failed to load function %s\n",gProxyHandle.functions[i].name);
|
1999-12-12 00:56:46 +01:00
|
|
|
gProxyHandle.functions[i].func = SQLDummyFunc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
gProxyHandle.bFunctionReady = TRUE;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLAllocConnect [ODBC32.001]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
SQLRETURN ret;
|
|
|
|
TRACE("Env=%lx\n",EnvironmentHandle);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
|
|
|
if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL)
|
|
|
|
{
|
|
|
|
*ConnectionHandle = SQL_NULL_HDBC;
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE("Not ready\n");
|
1999-12-12 00:56:46 +01:00
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert(gProxyHandle.functions[SQLAPI_INDEX_SQLALLOCCONNECT].func);
|
|
|
|
ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLALLOCCONNECT].func)
|
1999-12-12 00:56:46 +01:00
|
|
|
(EnvironmentHandle, ConnectionHandle);
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE("Returns ret=%d, Handle %lx\n",ret, *ConnectionHandle);
|
|
|
|
return ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLAllocEnv [ODBC32.002]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
SQLRETURN ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
TRACE("\n");
|
|
|
|
|
|
|
|
if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL)
|
|
|
|
{
|
|
|
|
*EnvironmentHandle = SQL_NULL_HENV;
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE("Not ready\n");
|
1999-12-12 00:56:46 +01:00
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert(gProxyHandle.functions[SQLAPI_INDEX_SQLALLOCENV].func);
|
|
|
|
ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLALLOCENV].func) (EnvironmentHandle);
|
|
|
|
TRACE("Returns ret=%d, Env=%lx\n",ret, *EnvironmentHandle);
|
|
|
|
return ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLAllocHandle [ODBC32.024]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
SQLRETURN ret;
|
|
|
|
TRACE("(Type=%d, Handle=%lx)\n",HandleType,InputHandle);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
|
|
|
if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL)
|
|
|
|
{
|
|
|
|
if (gProxyHandle.nErrorType == ERROR_LIBRARY_NOT_FOUND)
|
|
|
|
WARN("ProxyODBC: Can not load ODBC driver manager library.\n");
|
|
|
|
|
|
|
|
if (HandleType == SQL_HANDLE_ENV)
|
|
|
|
*OutputHandle = SQL_NULL_HENV;
|
|
|
|
else if (HandleType == SQL_HANDLE_DBC)
|
|
|
|
*OutputHandle = SQL_NULL_HDBC;
|
|
|
|
else if (HandleType == SQL_HANDLE_STMT)
|
|
|
|
*OutputHandle = SQL_NULL_HSTMT;
|
|
|
|
else if (HandleType == SQL_HANDLE_DESC)
|
|
|
|
*OutputHandle = SQL_NULL_HDESC;
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE ("Not ready\n");
|
1999-12-12 00:56:46 +01:00
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert(gProxyHandle.functions[SQLAPI_INDEX_SQLALLOCHANDLE].func);
|
|
|
|
ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLALLOCHANDLE].func)
|
1999-12-12 00:56:46 +01:00
|
|
|
(HandleType, InputHandle, OutputHandle);
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE("Returns ret=%d, Handle=%lx\n",ret, *OutputHandle);
|
|
|
|
return ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLAllocStmt [ODBC32.003]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
SQLRETURN ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE("(Connection=%lx)\n",ConnectionHandle);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
|
|
|
if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL)
|
|
|
|
{
|
|
|
|
*StatementHandle = SQL_NULL_HSTMT;
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE ("Not ready\n");
|
1999-12-12 00:56:46 +01:00
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLALLOCSTMT].func);
|
|
|
|
ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLALLOCSTMT].func)
|
1999-12-12 00:56:46 +01:00
|
|
|
(ConnectionHandle, StatementHandle);
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE ("Returns ret=%d, Handle=%lx\n", ret, *StatementHandle);
|
|
|
|
return ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLAllocHandleStd [ODBC32.077]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLAllocHandleStd( SQLSMALLINT HandleType,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
|
|
|
|
{
|
|
|
|
TRACE("ProxyODBC: SQLAllocHandelStd.\n");
|
|
|
|
|
|
|
|
if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL)
|
|
|
|
{
|
|
|
|
if (gProxyHandle.nErrorType == ERROR_LIBRARY_NOT_FOUND)
|
|
|
|
WARN("ProxyODBC: Can not load ODBC driver manager library.\n");
|
|
|
|
|
|
|
|
if (HandleType == SQL_HANDLE_ENV)
|
|
|
|
*OutputHandle = SQL_NULL_HENV;
|
|
|
|
else if (HandleType == SQL_HANDLE_DBC)
|
|
|
|
*OutputHandle = SQL_NULL_HDBC;
|
|
|
|
else if (HandleType == SQL_HANDLE_STMT)
|
|
|
|
*OutputHandle = SQL_NULL_HSTMT;
|
|
|
|
else if (HandleType == SQL_HANDLE_DESC)
|
|
|
|
*OutputHandle = SQL_NULL_HDESC;
|
|
|
|
|
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLALLOCHANDLESTD].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLALLOCHANDLESTD].func)
|
|
|
|
(HandleType, InputHandle, OutputHandle);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLBindCol [ODBC32.004]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLBindCol(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
|
|
|
|
SQLPOINTER TargetValue, SQLINTEGER BufferLength,
|
|
|
|
SQLINTEGER *StrLen_or_Ind)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
|
|
|
if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL)
|
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE ("Not ready\n");
|
1999-12-12 00:56:46 +01:00
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLBINDCOL].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLBINDCOL].func)
|
|
|
|
(StatementHandle, ColumnNumber, TargetType,
|
|
|
|
TargetValue, BufferLength, StrLen_or_Ind);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLBindParam [ODBC32.025]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
|
|
|
|
SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
|
|
|
|
SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
|
|
|
|
SQLINTEGER *StrLen_or_Ind)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLBINDPARAM].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLBINDPARAM].func)
|
|
|
|
(StatementHandle, ParameterNumber, ValueType,
|
|
|
|
ParameterScale, ParameterValue, StrLen_or_Ind);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLCancel [ODBC32.005]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLCANCEL].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLCANCEL].func) (StatementHandle);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLCloseCursor [ODBC32.026]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLCloseCursor(SQLHSTMT StatementHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
SQLRETURN ret;
|
|
|
|
TRACE("(Handle=%lx)\n",StatementHandle);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert(gProxyHandle.functions[SQLAPI_INDEX_SQLCLOSECURSOR].func);
|
|
|
|
ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLCLOSECURSOR].func) (StatementHandle);
|
|
|
|
TRACE("returns %d\n",ret);
|
|
|
|
return ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLColAttribute [ODBC32.027]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLColAttribute (SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier,
|
|
|
|
SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength,
|
|
|
|
SQLSMALLINT *StringLength, SQLPOINTER NumericAttribute)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLATTRIBUTE].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLATTRIBUTE].func)
|
|
|
|
(StatementHandle, ColumnNumber, FieldIdentifier,
|
|
|
|
CharacterAttribute, BufferLength, StringLength, NumericAttribute);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLColumns [ODBC32.040]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLColumns(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
|
|
|
|
SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
|
|
|
|
SQLCHAR *TableName, SQLSMALLINT NameLength3,
|
|
|
|
SQLCHAR *ColumnName, SQLSMALLINT NameLength4)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLUMNS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLUMNS].func)
|
|
|
|
(StatementHandle, CatalogName, NameLength1,
|
|
|
|
SchemaName, NameLength2, TableName, NameLength3, ColumnName, NameLength4);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLConnect [ODBC32.007]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLCHAR *ServerName, SQLSMALLINT NameLength1,
|
|
|
|
SQLCHAR *UserName, SQLSMALLINT NameLength2,
|
|
|
|
SQLCHAR *Authentication, SQLSMALLINT NameLength3)
|
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
SQLRETURN ret;
|
|
|
|
TRACE("(Server=%.*s)\n",NameLength1, ServerName);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
|
|
|
strcpy(gProxyHandle.ServerName, ServerName);
|
|
|
|
strcpy(gProxyHandle.UserName, UserName);
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert(gProxyHandle.functions[SQLAPI_INDEX_SQLCONNECT].func);
|
|
|
|
ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLCONNECT].func)
|
1999-12-12 00:56:46 +01:00
|
|
|
(ConnectionHandle, ServerName, NameLength1,
|
|
|
|
UserName, NameLength2, Authentication, NameLength3);
|
2001-10-02 22:28:06 +02:00
|
|
|
|
|
|
|
TRACE("returns %d\n",ret);
|
|
|
|
return ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLCopyDesc [ODBC32.028]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLCopyDesc(SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLCOPYDESC].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLCOPYDESC].func)
|
|
|
|
(SourceDescHandle, TargetDescHandle);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLDataSources [ODBC32.057]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLUSMALLINT Direction, SQLCHAR *ServerName,
|
|
|
|
SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1,
|
|
|
|
SQLCHAR *Description, SQLSMALLINT BufferLength2,
|
|
|
|
SQLSMALLINT *NameLength2)
|
|
|
|
{
|
|
|
|
SQLRETURN ret;
|
|
|
|
|
|
|
|
TRACE("EnvironmentHandle = %p\n", (LPVOID)EnvironmentHandle);
|
|
|
|
|
|
|
|
if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL)
|
|
|
|
{
|
|
|
|
ERR("Error: empty dm handle (gProxyHandle.dmHandle == NULL)\n");
|
|
|
|
return SQL_ERROR;
|
|
|
|
}
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert(gProxyHandle.functions[SQLAPI_INDEX_SQLDATASOURCES].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
ret = (gProxyHandle.functions[SQLAPI_INDEX_SQLDATASOURCES].func)
|
|
|
|
(EnvironmentHandle, Direction, ServerName,
|
|
|
|
BufferLength1, NameLength1, Description, BufferLength2, NameLength2);
|
|
|
|
|
|
|
|
if (TRACE_ON(odbc))
|
|
|
|
{
|
|
|
|
TRACE("returns: %d \t", ret);
|
|
|
|
if (*NameLength1 > 0)
|
2003-03-15 01:12:42 +01:00
|
|
|
TRACE("DataSource = %s,", ServerName);
|
1999-12-12 00:56:46 +01:00
|
|
|
if (*NameLength2 > 0)
|
2003-03-15 01:12:42 +01:00
|
|
|
TRACE(" Description = %s", Description);
|
|
|
|
TRACE("\n");
|
1999-12-12 00:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLDescribeCol [ODBC32.008]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName,
|
|
|
|
SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
|
|
|
|
SQLSMALLINT *DataType, SQLUINTEGER *ColumnSize,
|
|
|
|
SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLDESCRIBECOL].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLDESCRIBECOL].func)
|
|
|
|
(StatementHandle, ColumnNumber, ColumnName,
|
|
|
|
BufferLength, NameLength, DataType, ColumnSize, DecimalDigits, Nullable);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLDisconnect [ODBC32.009]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
SQLRETURN ret;
|
|
|
|
TRACE("(Handle=%lx)\n", ConnectionHandle);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
|
|
|
gProxyHandle.ServerName[0] = '\0';
|
|
|
|
gProxyHandle.UserName[0] = '\0';
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert(gProxyHandle.functions[SQLAPI_INDEX_SQLDISCONNECT].func);
|
|
|
|
ret = (gProxyHandle.functions[SQLAPI_INDEX_SQLDISCONNECT].func) (ConnectionHandle);
|
|
|
|
TRACE("returns %d\n",ret);
|
|
|
|
return ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLEndTran [ODBC32.029]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLENDTRAN].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLENDTRAN].func) (HandleType, Handle, CompletionType);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLError [ODBC32.010]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle,
|
|
|
|
SQLCHAR *Sqlstate, SQLINTEGER *NativeError,
|
|
|
|
SQLCHAR *MessageText, SQLSMALLINT BufferLength,
|
|
|
|
SQLSMALLINT *TextLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLERROR].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLERROR].func)
|
|
|
|
(EnvironmentHandle, ConnectionHandle, StatementHandle,
|
|
|
|
Sqlstate, NativeError, MessageText, BufferLength, TextLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLExecDirect [ODBC32.011]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLEXECDIRECT].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLEXECDIRECT].func)
|
|
|
|
(StatementHandle, StatementText, TextLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLExecute [ODBC32.012]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLExecute(SQLHSTMT StatementHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLEXECUTE].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLEXECUTE].func) (StatementHandle);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLFetch [ODBC32.013]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_READY_AND_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLFETCH].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLFETCH].func) (StatementHandle);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLFetchScroll [ODBC32.030]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLFETCHSCROLL].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLFETCHSCROLL].func)
|
|
|
|
(StatementHandle, FetchOrientation, FetchOffset);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLFreeConnect [ODBC32.014]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
SQLRETURN ret;
|
|
|
|
TRACE("(Handle=%lx)\n",ConnectionHandle);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLFREECONNECT].func);
|
|
|
|
ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLFREECONNECT].func) (ConnectionHandle);
|
|
|
|
TRACE("Returns %d\n",ret);
|
|
|
|
return ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLFreeEnv [ODBC32.015]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
SQLRETURN ret;
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE("(Env=%lx)\n",EnvironmentHandle);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLFREEENV].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
ret = (gProxyHandle.functions[SQLAPI_INDEX_SQLFREEENV].func) (EnvironmentHandle);
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE("Returns %d\n",ret);
|
1999-12-12 00:56:46 +01:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLFreeHandle [ODBC32.031]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
SQLRETURN ret;
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE("(Type=%d, Handle=%lx)\n",HandleType,Handle);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLFREEHANDLE].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
ret = (gProxyHandle.functions[SQLAPI_INDEX_SQLFREEHANDLE].func)
|
|
|
|
(HandleType, Handle);
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE ("Returns %d\n",ret);
|
1999-12-12 00:56:46 +01:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLFreeStmt [ODBC32.016]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
2001-10-02 22:28:06 +02:00
|
|
|
SQLRETURN ret;
|
|
|
|
TRACE("(Handle %lx, Option=%d)\n",StatementHandle, Option);
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLFREESTMT].func);
|
|
|
|
ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLFREESTMT].func)
|
1999-12-12 00:56:46 +01:00
|
|
|
(StatementHandle, Option);
|
2001-10-02 22:28:06 +02:00
|
|
|
TRACE("Returns %d\n",ret);
|
|
|
|
return ret;
|
1999-12-12 00:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetConnectAttr [ODBC32.032]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLINTEGER Attribute, SQLPOINTER Value,
|
|
|
|
SQLINTEGER BufferLength, SQLINTEGER *StringLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCONNECTATTR].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCONNECTATTR].func)
|
|
|
|
(ConnectionHandle, Attribute, Value,
|
|
|
|
BufferLength, StringLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetConnectOption [ODBC32.042]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCONNECTOPTION].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCONNECTOPTION].func)
|
|
|
|
(ConnectionHandle, Option, Value);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetCursorName [ODBC32.017]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLCHAR *CursorName, SQLSMALLINT BufferLength,
|
|
|
|
SQLSMALLINT *NameLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
1999-12-12 00:56:46 +01:00
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCURSORNAME].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCURSORNAME].func)
|
|
|
|
(StatementHandle, CursorName, BufferLength, NameLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetData [ODBC32.043]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
|
|
|
|
SQLPOINTER TargetValue, SQLINTEGER BufferLength,
|
|
|
|
SQLINTEGER *StrLen_or_Ind)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDATA].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDATA].func)
|
|
|
|
(StatementHandle, ColumnNumber, TargetType,
|
|
|
|
TargetValue, BufferLength, StrLen_or_Ind);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetDescField [ODBC32.033]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetDescField(SQLHDESC DescriptorHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
|
|
|
|
SQLPOINTER Value, SQLINTEGER BufferLength,
|
|
|
|
SQLINTEGER *StringLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDESCFIELD].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDESCFIELD].func)
|
|
|
|
(DescriptorHandle, RecNumber, FieldIdentifier,
|
|
|
|
Value, BufferLength, StringLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetDescRec [ODBC32.034]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetDescRec(SQLHDESC DescriptorHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLSMALLINT RecNumber, SQLCHAR *Name,
|
|
|
|
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
|
|
|
|
SQLSMALLINT *Type, SQLSMALLINT *SubType,
|
|
|
|
SQLINTEGER *Length, SQLSMALLINT *Precision,
|
|
|
|
SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDESCREC].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDESCREC].func)
|
|
|
|
(DescriptorHandle, RecNumber, Name, BufferLength,
|
|
|
|
StringLength, Type, SubType, Length, Precision, Scale, Nullable);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetDiagField [ODBC32.035]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier,
|
|
|
|
SQLPOINTER DiagInfo, SQLSMALLINT BufferLength,
|
|
|
|
SQLSMALLINT *StringLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDIAGFIELD].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDIAGFIELD].func)
|
|
|
|
(HandleType, Handle, RecNumber, DiagIdentifier,
|
|
|
|
DiagInfo, BufferLength, StringLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetDiagRec [ODBC32.036]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLSMALLINT RecNumber, SQLCHAR *Sqlstate,
|
|
|
|
SQLINTEGER *NativeError, SQLCHAR *MessageText,
|
|
|
|
SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDIAGREC].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDIAGREC].func)
|
|
|
|
(HandleType, Handle, RecNumber, Sqlstate, NativeError,
|
|
|
|
MessageText, BufferLength, TextLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetEnvAttr [ODBC32.037]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLINTEGER Attribute, SQLPOINTER Value,
|
|
|
|
SQLINTEGER BufferLength, SQLINTEGER *StringLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETENVATTR].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETENVATTR].func)
|
|
|
|
(EnvironmentHandle, Attribute, Value, BufferLength, StringLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetFunctions [ODBC32.044]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETFUNCTIONS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETFUNCTIONS].func)
|
|
|
|
(ConnectionHandle, FunctionId, Supported);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetInfo [ODBC32.045]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLUSMALLINT InfoType, SQLPOINTER InfoValue,
|
|
|
|
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETINFO].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETINFO].func)
|
|
|
|
(ConnectionHandle, InfoType, InfoValue, BufferLength, StringLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-03-24 21:46:04 +01:00
|
|
|
* SQLGetStmtAttr [ODBC32.038]
|
1999-12-12 00:56:46 +01:00
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLINTEGER Attribute, SQLPOINTER Value,
|
|
|
|
SQLINTEGER BufferLength, SQLINTEGER *StringLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETSTMTATTR].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETSTMTATTR].func)
|
|
|
|
(StatementHandle, Attribute, Value, BufferLength, StringLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLGetStmtOption [ODBC32.046]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLPOINTER Value)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETSTMTOPTION].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETSTMTOPTION].func)
|
|
|
|
(StatementHandle, Option, Value);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-03-24 21:46:04 +01:00
|
|
|
* SQLGetTypeInfo [ODBC32.047]
|
1999-12-12 00:56:46 +01:00
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETTYPEINFO].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETTYPEINFO].func)
|
|
|
|
(StatementHandle, DataType);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLNumResultCols [ODBC32.018]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLNUMRESULTCOLS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLNUMRESULTCOLS].func)
|
|
|
|
(StatementHandle, ColumnCount);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLParamData [ODBC32.048]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPARAMDATA].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLPARAMDATA].func)
|
|
|
|
(StatementHandle, Value);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLPrepare [ODBC32.019]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPREPARE].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLPREPARE].func)
|
|
|
|
(StatementHandle, StatementText, TextLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLPutData [ODBC32.049]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLINTEGER StrLen_or_Ind)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPUTDATA].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLPUTDATA].func)
|
|
|
|
(StatementHandle, Data, StrLen_or_Ind);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLRowCount [ODBC32.020]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLINTEGER *RowCount)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLROWCOUNT].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLROWCOUNT].func)
|
|
|
|
(StatementHandle, RowCount);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetConnectAttr [ODBC32.039]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLPOINTER Value, SQLINTEGER StringLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCONNECTATTR].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCONNECTATTR].func)
|
|
|
|
(ConnectionHandle, Attribute, Value, StringLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetConnectOption [ODBC32.050]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLUINTEGER Value)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCONNECTOPTION].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCONNECTOPTION].func)
|
|
|
|
(ConnectionHandle, Option, Value);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetCursorName [ODBC32.021]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT NameLength)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCURSORNAME].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCURSORNAME].func)
|
|
|
|
(StatementHandle, CursorName, NameLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetDescField [ODBC32.073]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetDescField(SQLHDESC DescriptorHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
|
|
|
|
SQLPOINTER Value, SQLINTEGER BufferLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETDESCFIELD].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETDESCFIELD].func)
|
|
|
|
(DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetDescRec [ODBC32.074]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLSMALLINT RecNumber, SQLSMALLINT Type,
|
|
|
|
SQLSMALLINT SubType, SQLINTEGER Length,
|
|
|
|
SQLSMALLINT Precision, SQLSMALLINT Scale,
|
|
|
|
SQLPOINTER Data, SQLINTEGER *StringLength,
|
|
|
|
SQLINTEGER *Indicator)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETDESCREC].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETDESCREC].func)
|
|
|
|
(DescriptorHandle, RecNumber, Type, SubType, Length,
|
|
|
|
Precision, Scale, Data, StringLength, Indicator);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetEnvAttr [ODBC32.075]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetEnvAttr(SQLHENV EnvironmentHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLINTEGER Attribute, SQLPOINTER Value,
|
|
|
|
SQLINTEGER StringLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETENVATTR].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETENVATTR].func)
|
|
|
|
(EnvironmentHandle, Attribute, Value, StringLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetParam [ODBC32.022]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
|
|
|
|
SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
|
|
|
|
SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
|
|
|
|
SQLINTEGER *StrLen_or_Ind)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETPARAM].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETPARAM].func)
|
|
|
|
(StatementHandle, ParameterNumber, ValueType, ParameterType, LengthPrecision,
|
|
|
|
ParameterScale, ParameterValue, StrLen_or_Ind);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetStmtAttr [ODBC32.076]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLINTEGER Attribute, SQLPOINTER Value,
|
|
|
|
SQLINTEGER StringLength)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETSTMTATTR].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETSTMTATTR].func)
|
|
|
|
(StatementHandle, Attribute, Value, StringLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetStmtOption [ODBC32.051]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLUINTEGER Value)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETSTMTOPTION].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETSTMTOPTION].func)
|
|
|
|
(StatementHandle, Option, Value);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSpecialColumns [ODBC32.052]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName,
|
|
|
|
SQLSMALLINT NameLength1, SQLCHAR *SchemaName,
|
|
|
|
SQLSMALLINT NameLength2, SQLCHAR *TableName,
|
|
|
|
SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
|
|
|
|
SQLUSMALLINT Nullable)
|
|
|
|
{
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSPECIALCOLUMNS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSPECIALCOLUMNS].func)
|
|
|
|
(StatementHandle, IdentifierType, CatalogName, NameLength1, SchemaName,
|
|
|
|
NameLength2, TableName, NameLength3, Scope, Nullable);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-03-24 21:46:04 +01:00
|
|
|
* SQLStatistics [ODBC32.053]
|
1999-12-12 00:56:46 +01:00
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
|
|
|
|
SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
|
|
|
|
SQLCHAR *TableName, SQLSMALLINT NameLength3,
|
|
|
|
SQLUSMALLINT Unique, SQLUSMALLINT Reserved)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSTATISTICS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSTATISTICS].func)
|
|
|
|
(StatementHandle, CatalogName, NameLength1, SchemaName, NameLength2,
|
|
|
|
TableName, NameLength3, Unique, Reserved);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLTables [ODBC32.054]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
|
|
|
|
SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
|
|
|
|
SQLCHAR *TableName, SQLSMALLINT NameLength3,
|
|
|
|
SQLCHAR *TableType, SQLSMALLINT NameLength4)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLTABLES].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLTABLES].func)
|
|
|
|
(StatementHandle, CatalogName, NameLength1,
|
|
|
|
SchemaName, NameLength2, TableName, NameLength3, TableType, NameLength4);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLTransact [ODBC32.023]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLTransact(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle,
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLUSMALLINT CompletionType)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLTRANSACT].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLTRANSACT].func)
|
|
|
|
(EnvironmentHandle, ConnectionHandle, CompletionType);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLBrowseConnect [ODBC32.055]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLBrowseConnect(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHDBC hdbc,
|
|
|
|
SQLCHAR *szConnStrIn,
|
|
|
|
SQLSMALLINT cbConnStrIn,
|
|
|
|
SQLCHAR *szConnStrOut,
|
|
|
|
SQLSMALLINT cbConnStrOutMax,
|
|
|
|
SQLSMALLINT *pcbConnStrOut)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLBROWSECONNECT].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLBROWSECONNECT].func)
|
|
|
|
(hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLBulkOperations [ODBC32.078]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLBulkOperations(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT StatementHandle,
|
|
|
|
SQLSMALLINT Operation)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLBULKOPERATIONS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLBULKOPERATIONS].func)
|
|
|
|
(StatementHandle, Operation);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLColAttributes [ODBC32.006]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLColAttributes(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLUSMALLINT icol,
|
|
|
|
SQLUSMALLINT fDescType,
|
|
|
|
SQLPOINTER rgbDesc,
|
|
|
|
SQLSMALLINT cbDescMax,
|
|
|
|
SQLSMALLINT *pcbDesc,
|
|
|
|
SQLINTEGER *pfDesc)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLATTRIBUTES].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLATTRIBUTES].func)
|
|
|
|
(hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLColumnPrivileges [ODBC32.056]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLColumnPrivileges(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLCHAR *szCatalogName,
|
|
|
|
SQLSMALLINT cbCatalogName,
|
|
|
|
SQLCHAR *szSchemaName,
|
|
|
|
SQLSMALLINT cbSchemaName,
|
|
|
|
SQLCHAR *szTableName,
|
|
|
|
SQLSMALLINT cbTableName,
|
|
|
|
SQLCHAR *szColumnName,
|
|
|
|
SQLSMALLINT cbColumnName)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLUMNPRIVILEGES].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLUMNPRIVILEGES].func)
|
|
|
|
(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
|
|
|
|
szTableName, cbTableName, szColumnName, cbColumnName);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLDescribeParam [ODBC32.058]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLDescribeParam(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLUSMALLINT ipar,
|
|
|
|
SQLSMALLINT *pfSqlType,
|
|
|
|
SQLUINTEGER *pcbParamDef,
|
|
|
|
SQLSMALLINT *pibScale,
|
|
|
|
SQLSMALLINT *pfNullable)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLDESCRIBEPARAM].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLDESCRIBEPARAM].func)
|
|
|
|
(hstmt, ipar, pfSqlType, pcbParamDef, pibScale, pfNullable);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLExtendedFetch [ODBC32.059]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLExtendedFetch(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLUSMALLINT fFetchType,
|
|
|
|
SQLINTEGER irow,
|
|
|
|
SQLUINTEGER *pcrow,
|
|
|
|
SQLUSMALLINT *rgfRowStatus)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLEXTENDEDFETCH].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLEXTENDEDFETCH].func)
|
|
|
|
(hstmt, fFetchType, irow, pcrow, rgfRowStatus);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLForeignKeys [ODBC32.060]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLForeignKeys(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLCHAR *szPkCatalogName,
|
|
|
|
SQLSMALLINT cbPkCatalogName,
|
|
|
|
SQLCHAR *szPkSchemaName,
|
|
|
|
SQLSMALLINT cbPkSchemaName,
|
|
|
|
SQLCHAR *szPkTableName,
|
|
|
|
SQLSMALLINT cbPkTableName,
|
|
|
|
SQLCHAR *szFkCatalogName,
|
|
|
|
SQLSMALLINT cbFkCatalogName,
|
|
|
|
SQLCHAR *szFkSchemaName,
|
|
|
|
SQLSMALLINT cbFkSchemaName,
|
|
|
|
SQLCHAR *szFkTableName,
|
|
|
|
SQLSMALLINT cbFkTableName)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLFOREIGNKEYS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLFOREIGNKEYS].func)
|
|
|
|
(hstmt, szPkCatalogName, cbPkCatalogName, szPkSchemaName, cbPkSchemaName,
|
|
|
|
szPkTableName, cbPkTableName, szFkCatalogName, cbFkCatalogName, szFkSchemaName,
|
|
|
|
cbFkSchemaName, szFkTableName, cbFkTableName);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLMoreResults [ODBC32.061]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLMoreResults(SQLHSTMT hstmt)
|
1999-12-12 00:56:46 +01:00
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLMORERESULTS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLMORERESULTS].func) (hstmt);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLNativeSql [ODBC32.062]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLNativeSql(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHDBC hdbc,
|
|
|
|
SQLCHAR *szSqlStrIn,
|
|
|
|
SQLINTEGER cbSqlStrIn,
|
|
|
|
SQLCHAR *szSqlStr,
|
|
|
|
SQLINTEGER cbSqlStrMax,
|
|
|
|
SQLINTEGER *pcbSqlStr)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLNATIVESQL].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLNATIVESQL].func)
|
|
|
|
(hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLNumParams [ODBC32.063]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLNumParams(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLSMALLINT *pcpar)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLNUMPARAMS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLNUMPARAMS].func) (hstmt, pcpar);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLParamOptions [ODBC32.064]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLParamOptions(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLUINTEGER crow,
|
|
|
|
SQLUINTEGER *pirow)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPARAMOPTIONS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLPARAMOPTIONS].func) (hstmt, crow, pirow);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLPrimaryKeys [ODBC32.065]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLPrimaryKeys(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLCHAR *szCatalogName,
|
|
|
|
SQLSMALLINT cbCatalogName,
|
|
|
|
SQLCHAR *szSchemaName,
|
|
|
|
SQLSMALLINT cbSchemaName,
|
|
|
|
SQLCHAR *szTableName,
|
|
|
|
SQLSMALLINT cbTableName)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPRIMARYKEYS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLPRIMARYKEYS].func)
|
|
|
|
(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
|
|
|
|
szTableName, cbTableName);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLProcedureColumns [ODBC32.066]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLProcedureColumns(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLCHAR *szCatalogName,
|
|
|
|
SQLSMALLINT cbCatalogName,
|
|
|
|
SQLCHAR *szSchemaName,
|
|
|
|
SQLSMALLINT cbSchemaName,
|
|
|
|
SQLCHAR *szProcName,
|
|
|
|
SQLSMALLINT cbProcName,
|
|
|
|
SQLCHAR *szColumnName,
|
|
|
|
SQLSMALLINT cbColumnName)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPROCEDURECOLUMNS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLPROCEDURECOLUMNS].func)
|
|
|
|
(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
|
|
|
|
szProcName, cbProcName, szColumnName, cbColumnName);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLProcedures [ODBC32.067]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLProcedures(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLCHAR *szCatalogName,
|
|
|
|
SQLSMALLINT cbCatalogName,
|
|
|
|
SQLCHAR *szSchemaName,
|
|
|
|
SQLSMALLINT cbSchemaName,
|
|
|
|
SQLCHAR *szProcName,
|
|
|
|
SQLSMALLINT cbProcName)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPROCEDURES].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLPROCEDURES].func)
|
|
|
|
(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
|
|
|
|
szProcName, cbProcName);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetPos [ODBC32.068]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetPos(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLUSMALLINT irow,
|
|
|
|
SQLUSMALLINT fOption,
|
|
|
|
SQLUSMALLINT fLock)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETPOS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETPOS].func)
|
|
|
|
(hstmt, irow, fOption, fLock);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLTablePrivileges [ODBC32.070]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLTablePrivileges(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLCHAR *szCatalogName,
|
|
|
|
SQLSMALLINT cbCatalogName,
|
|
|
|
SQLCHAR *szSchemaName,
|
|
|
|
SQLSMALLINT cbSchemaName,
|
|
|
|
SQLCHAR *szTableName,
|
|
|
|
SQLSMALLINT cbTableName)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLTABLEPRIVILEGES].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLTABLEPRIVILEGES].func)
|
|
|
|
(hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
|
|
|
|
szTableName, cbTableName);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLDrivers [ODBC32.071]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLDrivers(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHENV henv,
|
|
|
|
SQLUSMALLINT fDirection,
|
|
|
|
SQLCHAR *szDriverDesc,
|
|
|
|
SQLSMALLINT cbDriverDescMax,
|
|
|
|
SQLSMALLINT *pcbDriverDesc,
|
|
|
|
SQLCHAR *szDriverAttributes,
|
|
|
|
SQLSMALLINT cbDriverAttrMax,
|
|
|
|
SQLSMALLINT *pcbDriverAttr)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLDRIVERS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLDRIVERS].func)
|
|
|
|
(henv, fDirection, szDriverDesc, cbDriverDescMax, pcbDriverDesc,
|
|
|
|
szDriverAttributes, cbDriverAttrMax, pcbDriverAttr);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLBindParameter [ODBC32.072]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLBindParameter(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT hstmt,
|
|
|
|
SQLUSMALLINT ipar,
|
|
|
|
SQLSMALLINT fParamType,
|
|
|
|
SQLSMALLINT fCType,
|
|
|
|
SQLSMALLINT fSqlType,
|
|
|
|
SQLUINTEGER cbColDef,
|
|
|
|
SQLSMALLINT ibScale,
|
|
|
|
SQLPOINTER rgbValue,
|
|
|
|
SQLINTEGER cbValueMax,
|
|
|
|
SQLINTEGER *pcbValue)
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLBINDPARAMETER].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLBINDPARAMETER].func)
|
|
|
|
(hstmt, ipar, fParamType, fCType, fSqlType, cbColDef, ibScale,
|
|
|
|
rgbValue, cbValueMax, pcbValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLDriverConnect [ODBC32.041]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLDriverConnect(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHDBC hdbc,
|
|
|
|
SQLHWND hwnd,
|
|
|
|
SQLCHAR *conn_str_in,
|
|
|
|
SQLSMALLINT len_conn_str_in,
|
|
|
|
SQLCHAR *conn_str_out,
|
|
|
|
SQLSMALLINT conn_str_out_max,
|
|
|
|
SQLSMALLINT *ptr_conn_str_out,
|
|
|
|
SQLUSMALLINT driver_completion )
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLDRIVERCONNECT].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLDRIVERCONNECT].func)
|
|
|
|
(hdbc, hwnd, conn_str_in, len_conn_str_in, conn_str_out,
|
|
|
|
conn_str_out_max, ptr_conn_str_out, driver_completion);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SQLSetScrollOptions [ODBC32.069]
|
|
|
|
*/
|
2000-06-07 04:15:39 +02:00
|
|
|
SQLRETURN WINAPI SQLSetScrollOptions(
|
1999-12-12 00:56:46 +01:00
|
|
|
SQLHSTMT statement_handle,
|
|
|
|
SQLUSMALLINT f_concurrency,
|
|
|
|
SQLINTEGER crow_keyset,
|
|
|
|
SQLUSMALLINT crow_rowset )
|
|
|
|
{
|
|
|
|
TRACE("\n");
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
CHECK_dmHandle();
|
|
|
|
|
|
|
|
assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETSCROLLOPTIONS].func);
|
1999-12-12 00:56:46 +01:00
|
|
|
return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETSCROLLOPTIONS].func)
|
|
|
|
(statement_handle, f_concurrency, crow_keyset, crow_rowset);
|
|
|
|
}
|
|
|
|
|
2001-10-02 22:28:06 +02:00
|
|
|
/* End of file */
|