1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #ifndef _CONNECTIVITY_ODBC_OFUNCTIONS_HXX_ 29*cdf0e10cSrcweir #define _CONNECTIVITY_ODBC_OFUNCTIONS_HXX_ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include "odbc/OFunctiondefs.hxx" 32*cdf0e10cSrcweir #include <rtl/ustring.hxx> 33*cdf0e10cSrcweir #include <osl/module.h> 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir namespace connectivity 36*cdf0e10cSrcweir { 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir // sal_Bool LoadFunctions(oslModule pODBCso, sal_Bool _bDS=sal_True); 39*cdf0e10cSrcweir // sal_Bool LoadLibrary_ODBC3(::rtl::OUString &_rPath); 40*cdf0e10cSrcweir // sal_Bool LoadLibrary_ADABAS(::rtl::OUString &_rPath); 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir // Connecting to a data source 43*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLAllocHandle) (SQLSMALLINT HandleType,SQLHANDLE InputHandle,SQLHANDLE * OutputHandlePtr); 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir #define N3SQLAllocHandle(a,b,c) (*(T3SQLAllocHandle)getOdbcFunction(ODBC3SQLAllocHandle))(a,b,c) 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLConnect) (SQLHDBC ConnectionHandle,SQLCHAR *ServerName,SQLSMALLINT NameLength1,SQLCHAR *UserName,SQLSMALLINT NameLength2,SQLCHAR *Authentication,SQLSMALLINT NameLength3); 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir #define N3SQLConnect(a,b,c,d,e,f,g) (*(T3SQLConnect)getOdbcFunction(ODBC3SQLConnect))(a,b,c,d,e,f,g) 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLDriverConnect) ( SQLHDBC ConnectionHandle, 52*cdf0e10cSrcweir HWND WindowHandle, 53*cdf0e10cSrcweir SQLCHAR * InConnectionString, 54*cdf0e10cSrcweir SQLSMALLINT StringLength1, 55*cdf0e10cSrcweir SQLCHAR * OutConnectionString, 56*cdf0e10cSrcweir SQLSMALLINT BufferLength, 57*cdf0e10cSrcweir SQLSMALLINT * StringLength2Ptr, 58*cdf0e10cSrcweir SQLUSMALLINT DriverCompletion); 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir #define N3SQLDriverConnect(a,b,c,d,e,f,g,h) (*(T3SQLDriverConnect)getOdbcFunction(ODBC3SQLDriverConnect))(a,b,c,d,e,f,g,h) 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLBrowseConnect) ( SQLHDBC ConnectionHandle, 63*cdf0e10cSrcweir SQLCHAR * InConnectionString, 64*cdf0e10cSrcweir SQLSMALLINT StringLength1, 65*cdf0e10cSrcweir SQLCHAR * OutConnectionString, 66*cdf0e10cSrcweir SQLSMALLINT BufferLength, 67*cdf0e10cSrcweir SQLSMALLINT * StringLength2Ptr); 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir #define N3SQLBrowseConnect(a,b,c,d,e,f) (*(T3SQLBrowseConnect)getOdbcFunction(ODBC3SQLBrowseConnect))(a,b,c,d,e,f) 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir // Obtaining information about a driver and data source 72*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLDataSources) ( SQLHENV EnvironmentHandle, 73*cdf0e10cSrcweir SQLUSMALLINT Direction, 74*cdf0e10cSrcweir SQLCHAR * ServerName, 75*cdf0e10cSrcweir SQLSMALLINT BufferLength1, 76*cdf0e10cSrcweir SQLSMALLINT * NameLength1Ptr, 77*cdf0e10cSrcweir SQLCHAR * Description, 78*cdf0e10cSrcweir SQLSMALLINT BufferLength2, 79*cdf0e10cSrcweir SQLSMALLINT * NameLength2Ptr); 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir #define N3SQLDataSources(a,b,c,d,e,f,g,h) (*(T3SQLDataSources)getOdbcFunction(ODBC3SQLDataSources))(a,b,c,d,e,f,g,h) 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLDrivers) ( SQLHENV EnvironmentHandle, 84*cdf0e10cSrcweir SQLUSMALLINT Direction, 85*cdf0e10cSrcweir SQLCHAR * DriverDescription, 86*cdf0e10cSrcweir SQLSMALLINT BufferLength1, 87*cdf0e10cSrcweir SQLSMALLINT * DescriptionLengthPtr, 88*cdf0e10cSrcweir SQLCHAR * DriverAttributes, 89*cdf0e10cSrcweir SQLSMALLINT BufferLength2, 90*cdf0e10cSrcweir SQLSMALLINT * AttributesLengthPtr); 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir #define N3SQLDrivers(a,b,c,d,e,f,g,h) (*(T3SQLDrivers)getOdbcFunction(ODBC3SQLDrivers))(a,b,c,d,e,f,g,h) 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetInfo) ( SQLHDBC ConnectionHandle, 95*cdf0e10cSrcweir SQLUSMALLINT InfoType, 96*cdf0e10cSrcweir SQLPOINTER InfoValuePtr, 97*cdf0e10cSrcweir SQLSMALLINT BufferLength, 98*cdf0e10cSrcweir SQLSMALLINT * StringLengthPtr); 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir #define N3SQLGetInfo(a,b,c,d,e) (*(T3SQLGetInfo)getOdbcFunction(ODBC3SQLGetInfo))(a,b,c,d,e) 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetFunctions) (SQLHDBC ConnectionHandle, 103*cdf0e10cSrcweir SQLUSMALLINT FunctionId, 104*cdf0e10cSrcweir SQLUSMALLINT * SupportedPtr); 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir #define N3SQLGetFunctions(a,b,c) (*(T3SQLGetFunctions)getOdbcFunction(ODBC3SQLGetFunctions))(a,b,c) 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetTypeInfo) ( SQLHSTMT StatementHandle, 109*cdf0e10cSrcweir SQLSMALLINT DataType); 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir #define N3SQLGetTypeInfo(a,b) (*(T3SQLGetTypeInfo)getOdbcFunction(ODBC3SQLGetTypeInfo))(a,b) 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir // Setting and retrieving driver attributes 114*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLSetConnectAttr)(SQLHDBC ConnectionHandle, 115*cdf0e10cSrcweir SQLINTEGER Attribute, 116*cdf0e10cSrcweir SQLPOINTER ValuePtr, 117*cdf0e10cSrcweir SQLINTEGER StringLength); 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir #define N3SQLSetConnectAttr(a,b,c,d) (*(T3SQLSetConnectAttr)getOdbcFunction(ODBC3SQLSetConnectAttr))(a,b,c,d) 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetConnectAttr) (SQLHDBC ConnectionHandle, 122*cdf0e10cSrcweir SQLINTEGER Attribute, 123*cdf0e10cSrcweir SQLPOINTER ValuePtr, 124*cdf0e10cSrcweir SQLINTEGER BufferLength, 125*cdf0e10cSrcweir SQLINTEGER* StringLength); 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir #define N3SQLGetConnectAttr(a,b,c,d,e) (*(T3SQLGetConnectAttr)getOdbcFunction(ODBC3SQLGetConnectAttr))(a,b,c,d,e) 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLSetEnvAttr) ( SQLHENV EnvironmentHandle, 131*cdf0e10cSrcweir SQLINTEGER Attribute, 132*cdf0e10cSrcweir SQLPOINTER ValuePtr, 133*cdf0e10cSrcweir SQLINTEGER StringLength); 134*cdf0e10cSrcweir 135*cdf0e10cSrcweir #define N3SQLSetEnvAttr(a,b,c,d) (*(T3SQLSetEnvAttr)getOdbcFunction(ODBC3SQLSetEnvAttr))(a,b,c,d) 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetEnvAttr) ( SQLHENV EnvironmentHandle, 138*cdf0e10cSrcweir SQLINTEGER Attribute, 139*cdf0e10cSrcweir SQLPOINTER ValuePtr, 140*cdf0e10cSrcweir SQLINTEGER BufferLength, 141*cdf0e10cSrcweir SQLINTEGER* StringLength); 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir #define N3SQLGetEnvAttr(a,b,c,d,e) (*(T3SQLGetEnvAttr)getOdbcFunction(ODBC3SQLGetEnvAttr))(a,b,c,d,e) 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir 146*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLSetStmtAttr) ( SQLHSTMT StatementHandle, 147*cdf0e10cSrcweir SQLINTEGER Attribute, 148*cdf0e10cSrcweir SQLPOINTER ValuePtr, 149*cdf0e10cSrcweir SQLINTEGER StringLength); 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir #define N3SQLSetStmtAttr(a,b,c,d) (*(T3SQLSetStmtAttr)getOdbcFunction(ODBC3SQLSetStmtAttr))(a,b,c,d) 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetStmtAttr) ( SQLHSTMT StatementHandle, 154*cdf0e10cSrcweir SQLINTEGER Attribute, 155*cdf0e10cSrcweir SQLPOINTER ValuePtr, 156*cdf0e10cSrcweir SQLINTEGER BufferLength, 157*cdf0e10cSrcweir SQLINTEGER* StringLength); 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir #define N3SQLGetStmtAttr(a,b,c,d,e) (*(T3SQLGetStmtAttr)getOdbcFunction(ODBC3SQLGetStmtAttr))(a,b,c,d,e) 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir // Setting and retrieving descriptor fields 162*cdf0e10cSrcweir /*typedef SQLRETURN (SQL_API *T3SQLSetDescField) (SQLHDESC DescriptorHandle, 163*cdf0e10cSrcweir SQLSMALLINT RecNumber, 164*cdf0e10cSrcweir SQLSMALLINT FieldIdentifier, 165*cdf0e10cSrcweir SQLPOINTER ValuePtr, 166*cdf0e10cSrcweir SQLINTEGER BufferLength); 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir #define N3SQLSetDescField(a,b,c,d,e) (*(T3SQLSetDescField)getOdbcFunction(ODBC3SQLSetDescField))(a,b,c,d,e) 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetDescField) ( SQLHDESC DescriptorHandle, 171*cdf0e10cSrcweir SQLSMALLINT RecNumber, 172*cdf0e10cSrcweir SQLSMALLINT FieldIdentifier, 173*cdf0e10cSrcweir SQLPOINTER ValuePtr, 174*cdf0e10cSrcweir SQLINTEGER BufferLength, 175*cdf0e10cSrcweir SQLINTEGER * StringLengthPtr); 176*cdf0e10cSrcweir 177*cdf0e10cSrcweir #define N3SQLGetDescField(a,b,c,d,e,f) (*(T3SQLGetDescField)getOdbcFunction(ODBC3SQLGetDescField))(a,b,c,d,e,f) 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetDescRec) ( SQLHDESC DescriptorHandle, 181*cdf0e10cSrcweir SQLSMALLINT RecNumber, 182*cdf0e10cSrcweir SQLCHAR * Name, 183*cdf0e10cSrcweir SQLSMALLINT BufferLength, 184*cdf0e10cSrcweir SQLSMALLINT * StringLengthPtr, 185*cdf0e10cSrcweir SQLSMALLINT * TypePtr, 186*cdf0e10cSrcweir SQLSMALLINT * SubTypePtr, 187*cdf0e10cSrcweir SQLLEN * LengthPtr, 188*cdf0e10cSrcweir SQLSMALLINT * PrecisionPtr, 189*cdf0e10cSrcweir SQLSMALLINT * ScalePtr, 190*cdf0e10cSrcweir SQLSMALLINT * NullablePtr); 191*cdf0e10cSrcweir 192*cdf0e10cSrcweir #define N3SQLGetDescRec(a,b,c,d,e,f,g,h,i,j,k) (*(T3SQLGetDescRec)getOdbcFunction(ODBC3SQLGetDescRec))(a,b,c,d,e,f,g,h,i,j,k) 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLSetDescRec) ( SQLHDESC DescriptorHandle, 196*cdf0e10cSrcweir SQLSMALLINT RecNumber, 197*cdf0e10cSrcweir SQLSMALLINT Type, 198*cdf0e10cSrcweir SQLSMALLINT SubType, 199*cdf0e10cSrcweir SQLINTEGER Length, 200*cdf0e10cSrcweir SQLSMALLINT Precision, 201*cdf0e10cSrcweir SQLSMALLINT Scale, 202*cdf0e10cSrcweir SQLPOINTER DataPtr, 203*cdf0e10cSrcweir SQLLEN * StringLengthPtr, 204*cdf0e10cSrcweir SQLLEN * IndicatorPtr); 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir #define N3SQLSetDescRec(a,b,c,d,e,f,g,h,i,j) (*(T3SQLSetDescRec)getOdbcFunction(ODBC3SQLSetDescRec))(a,b,c,d,e,f,g,h,i,j) 207*cdf0e10cSrcweir */ 208*cdf0e10cSrcweir 209*cdf0e10cSrcweir // Preparing SQL requests 210*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLPrepare) ( SQLHSTMT StatementHandle, 211*cdf0e10cSrcweir SQLCHAR * StatementText, 212*cdf0e10cSrcweir SQLINTEGER TextLength); 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir #define N3SQLPrepare(a,b,c) (*(T3SQLPrepare)getOdbcFunction(ODBC3SQLPrepare))(a,b,c) 215*cdf0e10cSrcweir 216*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLBindParameter) (SQLHSTMT StatementHandle, 217*cdf0e10cSrcweir SQLUSMALLINT ParameterNumber, 218*cdf0e10cSrcweir SQLSMALLINT InputOutputType, 219*cdf0e10cSrcweir SQLSMALLINT ValueType, 220*cdf0e10cSrcweir SQLSMALLINT ParameterType, 221*cdf0e10cSrcweir SQLULEN ColumnSize, 222*cdf0e10cSrcweir SQLSMALLINT DecimalDigits, 223*cdf0e10cSrcweir SQLPOINTER ParameterValuePtr, 224*cdf0e10cSrcweir SQLLEN BufferLength, 225*cdf0e10cSrcweir SQLLEN * StrLen_or_IndPtr); 226*cdf0e10cSrcweir 227*cdf0e10cSrcweir #define N3SQLBindParameter(a,b,c,d,e,f,g,h,i,j) (*(T3SQLBindParameter)getOdbcFunction(ODBC3SQLBindParameter))(a,b,c,d,e,f,g,h,i,j) 228*cdf0e10cSrcweir 229*cdf0e10cSrcweir /*typedef SQLRETURN (SQL_API *T3SQLGetCursorName) (SQLHSTMT StatementHandle, 230*cdf0e10cSrcweir SQLCHAR * CursorName, 231*cdf0e10cSrcweir SQLSMALLINT BufferLength, 232*cdf0e10cSrcweir SQLSMALLINT * NameLengthPtr); 233*cdf0e10cSrcweir 234*cdf0e10cSrcweir #define N3SQLGetCursorName(a,b,c,d) (*(T3SQLGetCursorName)getOdbcFunction(ODBC3SQLGetCursorName))(a,b,c,d) 235*cdf0e10cSrcweir */ 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLSetCursorName) (SQLHSTMT StatementHandle, 238*cdf0e10cSrcweir SQLCHAR * CursorName, 239*cdf0e10cSrcweir SQLSMALLINT NameLength); 240*cdf0e10cSrcweir 241*cdf0e10cSrcweir #define N3SQLSetCursorName(a,b,c) (*(T3SQLSetCursorName)getOdbcFunction(ODBC3SQLSetCursorName))(a,b,c) 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir // Submitting requests 244*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLExecute) ( SQLHSTMT StatementHandle); 245*cdf0e10cSrcweir 246*cdf0e10cSrcweir #define N3SQLExecute(a) (*(T3SQLExecute)getOdbcFunction(ODBC3SQLExecute))(a) 247*cdf0e10cSrcweir 248*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLExecDirect) ( SQLHSTMT StatementHandle, 249*cdf0e10cSrcweir SQLCHAR * StatementText, 250*cdf0e10cSrcweir SQLINTEGER TextLength); 251*cdf0e10cSrcweir 252*cdf0e10cSrcweir #define N3SQLExecDirect(a,b,c) (*(T3SQLExecDirect)getOdbcFunction(ODBC3SQLExecDirect))(a,b,c) 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir /*typedef SQLRETURN (SQL_API *T3SQLNativeSql) ( SQLHDBC ConnectionHandle, 255*cdf0e10cSrcweir SQLCHAR * InStatementText, 256*cdf0e10cSrcweir SQLINTEGER TextLength1, 257*cdf0e10cSrcweir SQLCHAR * utStatementText, 258*cdf0e10cSrcweir SQLINTEGER BufferLength, 259*cdf0e10cSrcweir SQLINTEGER * TextLength2Ptr); 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir #define N3SQLNativeSql(a,b,c,d,e,f) (*(T3SQLNativeSql)getOdbcFunction(ODBC3SQLNativeSql))(a,b,c,d,e,f)*/ 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLDescribeParam) (SQLHSTMT StatementHandle, 264*cdf0e10cSrcweir SQLUSMALLINT ParameterNumber, 265*cdf0e10cSrcweir SQLSMALLINT * DataTypePtr, 266*cdf0e10cSrcweir SQLULEN * ParameterSizePtr, 267*cdf0e10cSrcweir SQLSMALLINT * DecimalDigitsPtr, 268*cdf0e10cSrcweir SQLSMALLINT * NullablePtr); 269*cdf0e10cSrcweir 270*cdf0e10cSrcweir #define N3SQLDescribeParam(a,b,c,d,e,f) (*(T3SQLDescribeParam)getOdbcFunction(ODBC3SQLDescribeParam))(a,b,c,d,e,f) 271*cdf0e10cSrcweir 272*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLNumParams) ( SQLHSTMT StatementHandle, 273*cdf0e10cSrcweir SQLSMALLINT * ParameterCountPtr); 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir #define N3SQLNumParams(a,b) (*(T3SQLNumParams)getOdbcFunction(ODBC3SQLNumParams))(a,b) 276*cdf0e10cSrcweir 277*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLParamData) ( SQLHSTMT StatementHandle, 278*cdf0e10cSrcweir SQLPOINTER * ValuePtrPtr); 279*cdf0e10cSrcweir 280*cdf0e10cSrcweir #define N3SQLParamData(a,b) (*(T3SQLParamData)getOdbcFunction(ODBC3SQLParamData))(a,b) 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLPutData) ( SQLHSTMT StatementHandle, 283*cdf0e10cSrcweir SQLPOINTER DataPtr, 284*cdf0e10cSrcweir SQLLEN StrLen_or_Ind); 285*cdf0e10cSrcweir 286*cdf0e10cSrcweir #define N3SQLPutData(a,b,c) (*(T3SQLPutData)getOdbcFunction(ODBC3SQLPutData))(a,b,c) 287*cdf0e10cSrcweir 288*cdf0e10cSrcweir // Retrieving results and information about results 289*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLRowCount) ( SQLHSTMT StatementHandle, 290*cdf0e10cSrcweir SQLLEN * RowCountPtr); 291*cdf0e10cSrcweir 292*cdf0e10cSrcweir #define N3SQLRowCount(a,b) (*(T3SQLRowCount)getOdbcFunction(ODBC3SQLRowCount))(a,b) 293*cdf0e10cSrcweir 294*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLNumResultCols) (SQLHSTMT StatementHandle, 295*cdf0e10cSrcweir SQLSMALLINT * ColumnCountPtr); 296*cdf0e10cSrcweir 297*cdf0e10cSrcweir #define N3SQLNumResultCols(a,b) (*(T3SQLNumResultCols)getOdbcFunction(ODBC3SQLNumResultCols))(a,b) 298*cdf0e10cSrcweir 299*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLDescribeCol) ( SQLHSTMT StatementHandle, 300*cdf0e10cSrcweir SQLUSMALLINT ColumnNumber, 301*cdf0e10cSrcweir SQLCHAR * ColumnName, 302*cdf0e10cSrcweir SQLSMALLINT BufferLength, 303*cdf0e10cSrcweir SQLSMALLINT * NameLengthPtr, 304*cdf0e10cSrcweir SQLSMALLINT * DataTypePtr, 305*cdf0e10cSrcweir SQLULEN * ColumnSizePtr, 306*cdf0e10cSrcweir SQLSMALLINT * DecimalDigitsPtr, 307*cdf0e10cSrcweir SQLSMALLINT * NullablePtr); 308*cdf0e10cSrcweir 309*cdf0e10cSrcweir #define N3SQLDescribeCol(a,b,c,d,e,f,g,h,i) (*(T3SQLDescribeCol)getOdbcFunction(ODBC3SQLDescribeCol))(a,b,c,d,e,f,g,h,i) 310*cdf0e10cSrcweir 311*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLColAttribute) (SQLHSTMT StatementHandle, 312*cdf0e10cSrcweir SQLUSMALLINT ColumnNumber, 313*cdf0e10cSrcweir SQLUSMALLINT FieldIdentifier, 314*cdf0e10cSrcweir SQLPOINTER CharacterAttributePtr, 315*cdf0e10cSrcweir SQLSMALLINT BufferLength, 316*cdf0e10cSrcweir SQLSMALLINT * StringLengthPtr, 317*cdf0e10cSrcweir SQLLEN * NumericAttributePtr); 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir #define N3SQLColAttribute(a,b,c,d,e,f,g) (*(T3SQLColAttribute)getOdbcFunction(ODBC3SQLColAttribute))(a,b,c,d,e,f,g) 320*cdf0e10cSrcweir 321*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLBindCol) ( SQLHSTMT StatementHandle, 322*cdf0e10cSrcweir SQLUSMALLINT ColumnNumber, 323*cdf0e10cSrcweir SQLSMALLINT TargetType, 324*cdf0e10cSrcweir SQLPOINTER TargetValuePtr, 325*cdf0e10cSrcweir SQLLEN BufferLength, 326*cdf0e10cSrcweir SQLLEN * StrLen_or_IndPtr); 327*cdf0e10cSrcweir 328*cdf0e10cSrcweir #define N3SQLBindCol(a,b,c,d,e,f) (*(T3SQLBindCol)getOdbcFunction(ODBC3SQLBindCol))(a,b,c,d,e,f) 329*cdf0e10cSrcweir 330*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLFetch) ( SQLHSTMT StatementHandle); 331*cdf0e10cSrcweir 332*cdf0e10cSrcweir #define N3SQLFetch(a) (*(T3SQLFetch)getOdbcFunction(ODBC3SQLFetch))(a) 333*cdf0e10cSrcweir 334*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLFetchScroll) ( SQLHSTMT StatementHandle, 335*cdf0e10cSrcweir SQLSMALLINT FetchOrientation, 336*cdf0e10cSrcweir SQLLEN FetchOffset); 337*cdf0e10cSrcweir 338*cdf0e10cSrcweir #define N3SQLFetchScroll(a,b,c) (*(T3SQLFetchScroll)getOdbcFunction(ODBC3SQLFetchScroll))(a,b,c) 339*cdf0e10cSrcweir 340*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetData) ( SQLHSTMT StatementHandle, 341*cdf0e10cSrcweir SQLUSMALLINT ColumnNumber, 342*cdf0e10cSrcweir SQLSMALLINT TargetType, 343*cdf0e10cSrcweir SQLPOINTER TargetValuePtr, 344*cdf0e10cSrcweir SQLLEN BufferLength, 345*cdf0e10cSrcweir SQLLEN * StrLen_or_IndPtr); 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir #define N3SQLGetData(a,b,c,d,e,f) (*(T3SQLGetData)getOdbcFunction(ODBC3SQLGetData))(a,b,c,d,e,f) 348*cdf0e10cSrcweir 349*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLSetPos) ( SQLHSTMT StatementHandle, 350*cdf0e10cSrcweir SQLSETPOSIROW RowNumber, 351*cdf0e10cSrcweir SQLUSMALLINT Operation, 352*cdf0e10cSrcweir SQLUSMALLINT LockType); 353*cdf0e10cSrcweir 354*cdf0e10cSrcweir #define N3SQLSetPos(a,b,c,d) (*(T3SQLSetPos)getOdbcFunction(ODBC3SQLSetPos))(a,b,c,d) 355*cdf0e10cSrcweir 356*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLBulkOperations) ( SQLHSTMT StatementHandle, 357*cdf0e10cSrcweir SQLSMALLINT Operation); 358*cdf0e10cSrcweir 359*cdf0e10cSrcweir #define N3SQLBulkOperations(a,b) (*(T3SQLBulkOperations)getOdbcFunction(ODBC3SQLBulkOperations))(a,b) 360*cdf0e10cSrcweir 361*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLMoreResults) ( SQLHSTMT StatementHandle); 362*cdf0e10cSrcweir 363*cdf0e10cSrcweir #define N3SQLMoreResults(a) (*(T3SQLMoreResults)getOdbcFunction(ODBC3SQLMoreResults))(a) 364*cdf0e10cSrcweir 365*cdf0e10cSrcweir /*typedef SQLRETURN (SQL_API *T3SQLGetDiagField) (SQLSMALLINT HandleType, 366*cdf0e10cSrcweir SQLHANDLE Handle, 367*cdf0e10cSrcweir SQLSMALLINT RecNumber, 368*cdf0e10cSrcweir SQLSMALLINT DiagIdentifier, 369*cdf0e10cSrcweir SQLPOINTER DiagInfoPtr, 370*cdf0e10cSrcweir SQLSMALLINT BufferLength, 371*cdf0e10cSrcweir SQLSMALLINT * StringLengthPtr); 372*cdf0e10cSrcweir 373*cdf0e10cSrcweir #define N3SQLGetDiagField(a,b,c,d,e,f,g) (*(T3SQLGetDiagField)getOdbcFunction(ODBC3SQLGetDiagField))(a,b,c,d,e,f,g)*/ 374*cdf0e10cSrcweir 375*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetDiagRec) ( SQLSMALLINT HandleType, 376*cdf0e10cSrcweir SQLHANDLE Handle, 377*cdf0e10cSrcweir SQLSMALLINT RecNumber, 378*cdf0e10cSrcweir SQLCHAR * Sqlstate, 379*cdf0e10cSrcweir SQLINTEGER * NativeErrorPtr, 380*cdf0e10cSrcweir SQLCHAR * MessageText, 381*cdf0e10cSrcweir SQLSMALLINT BufferLength, 382*cdf0e10cSrcweir SQLSMALLINT * TextLengthPtr); 383*cdf0e10cSrcweir 384*cdf0e10cSrcweir 385*cdf0e10cSrcweir #define N3SQLGetDiagRec(a,b,c,d,e,f,g,h) (*(T3SQLGetDiagRec)getOdbcFunction(ODBC3SQLGetDiagRec))(a,b,c,d,e,f,g,h) 386*cdf0e10cSrcweir 387*cdf0e10cSrcweir // Obtaining information about the data source's system tables (catalog functions) 388*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLColumnPrivileges) (SQLHSTMT StatementHandle, 389*cdf0e10cSrcweir SQLCHAR * CatalogName, 390*cdf0e10cSrcweir SQLSMALLINT NameLength1, 391*cdf0e10cSrcweir SQLCHAR * SchemaName, 392*cdf0e10cSrcweir SQLSMALLINT NameLength2, 393*cdf0e10cSrcweir SQLCHAR * TableName, 394*cdf0e10cSrcweir SQLSMALLINT NameLength3, 395*cdf0e10cSrcweir SQLCHAR * ColumnName, 396*cdf0e10cSrcweir SQLSMALLINT NameLength4); 397*cdf0e10cSrcweir 398*cdf0e10cSrcweir #define N3SQLColumnPrivileges(a,b,c,d,e,f,g,h,i) (*(T3SQLColumnPrivileges)getOdbcFunction(ODBC3SQLColumnPrivileges))(a,b,c,d,e,f,g,h,i) 399*cdf0e10cSrcweir 400*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLColumns) ( SQLHSTMT StatementHandle, 401*cdf0e10cSrcweir SQLCHAR * CatalogName, 402*cdf0e10cSrcweir SQLSMALLINT NameLength1, 403*cdf0e10cSrcweir SQLCHAR * SchemaName, 404*cdf0e10cSrcweir SQLSMALLINT NameLength2, 405*cdf0e10cSrcweir SQLCHAR * TableName, 406*cdf0e10cSrcweir SQLSMALLINT NameLength3, 407*cdf0e10cSrcweir SQLCHAR * ColumnName, 408*cdf0e10cSrcweir SQLSMALLINT NameLength4); 409*cdf0e10cSrcweir 410*cdf0e10cSrcweir #define N3SQLColumns(a,b,c,d,e,f,g,h,i) (*(T3SQLColumns)getOdbcFunction(ODBC3SQLColumns))(a,b,c,d,e,f,g,h,i) 411*cdf0e10cSrcweir 412*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLForeignKeys) ( SQLHSTMT StatementHandle, 413*cdf0e10cSrcweir SQLCHAR * PKCatalogName, 414*cdf0e10cSrcweir SQLSMALLINT NameLength1, 415*cdf0e10cSrcweir SQLCHAR * PKSchemaName, 416*cdf0e10cSrcweir SQLSMALLINT NameLength2, 417*cdf0e10cSrcweir SQLCHAR * PKTableName, 418*cdf0e10cSrcweir SQLSMALLINT NameLength3, 419*cdf0e10cSrcweir SQLCHAR * FKCatalogName, 420*cdf0e10cSrcweir SQLSMALLINT NameLength4, 421*cdf0e10cSrcweir SQLCHAR * FKSchemaName, 422*cdf0e10cSrcweir SQLSMALLINT NameLength5, 423*cdf0e10cSrcweir SQLCHAR * FKTableName, 424*cdf0e10cSrcweir SQLSMALLINT NameLength6); 425*cdf0e10cSrcweir 426*cdf0e10cSrcweir #define N3SQLForeignKeys(a,b,c,d,e,f,g,h,i,j,k,l,m) (*(T3SQLForeignKeys)getOdbcFunction(ODBC3SQLForeignKeys))(a,b,c,d,e,f,g,h,i,j,k,l,m) 427*cdf0e10cSrcweir 428*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLPrimaryKeys) ( SQLHSTMT StatementHandle, 429*cdf0e10cSrcweir SQLCHAR * CatalogName, 430*cdf0e10cSrcweir SQLSMALLINT NameLength1, 431*cdf0e10cSrcweir SQLCHAR * SchemaName, 432*cdf0e10cSrcweir SQLSMALLINT NameLength2, 433*cdf0e10cSrcweir SQLCHAR * TableName, 434*cdf0e10cSrcweir SQLSMALLINT NameLength3); 435*cdf0e10cSrcweir 436*cdf0e10cSrcweir #define N3SQLPrimaryKeys(a,b,c,d,e,f,g) (*(T3SQLPrimaryKeys)getOdbcFunction(ODBC3SQLPrimaryKeys))(a,b,c,d,e,f,g) 437*cdf0e10cSrcweir 438*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLProcedureColumns) (SQLHSTMT StatementHandle, 439*cdf0e10cSrcweir SQLCHAR * CatalogName, 440*cdf0e10cSrcweir SQLSMALLINT NameLength1, 441*cdf0e10cSrcweir SQLCHAR * SchemaName, 442*cdf0e10cSrcweir SQLSMALLINT NameLength2, 443*cdf0e10cSrcweir SQLCHAR * ProcName, 444*cdf0e10cSrcweir SQLSMALLINT NameLength3, 445*cdf0e10cSrcweir SQLCHAR * ColumnName, 446*cdf0e10cSrcweir SQLSMALLINT NameLength4); 447*cdf0e10cSrcweir 448*cdf0e10cSrcweir #define N3SQLProcedureColumns(a,b,c,d,e,f,g,h,i) (*(T3SQLProcedureColumns)getOdbcFunction(ODBC3SQLProcedureColumns))(a,b,c,d,e,f,g,h,i) 449*cdf0e10cSrcweir 450*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLProcedures) ( SQLHSTMT StatementHandle, 451*cdf0e10cSrcweir SQLCHAR * CatalogName, 452*cdf0e10cSrcweir SQLSMALLINT NameLength1, 453*cdf0e10cSrcweir SQLCHAR * SchemaName, 454*cdf0e10cSrcweir SQLSMALLINT NameLength2, 455*cdf0e10cSrcweir SQLCHAR * ProcName, 456*cdf0e10cSrcweir SQLSMALLINT NameLength3); 457*cdf0e10cSrcweir 458*cdf0e10cSrcweir #define N3SQLProcedures(a,b,c,d,e,f,g) (*(T3SQLProcedures)getOdbcFunction(ODBC3SQLProcedures))(a,b,c,d,e,f,g) 459*cdf0e10cSrcweir 460*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLSpecialColumns) (SQLHSTMT StatementHandle, 461*cdf0e10cSrcweir SQLUSMALLINT IdentifierType, 462*cdf0e10cSrcweir SQLCHAR * CatalogName, 463*cdf0e10cSrcweir SQLSMALLINT NameLength1, 464*cdf0e10cSrcweir SQLCHAR * SchemaName, 465*cdf0e10cSrcweir SQLSMALLINT NameLength2, 466*cdf0e10cSrcweir SQLCHAR * TableName, 467*cdf0e10cSrcweir SQLSMALLINT NameLength3, 468*cdf0e10cSrcweir SQLUSMALLINT Scope, 469*cdf0e10cSrcweir SQLUSMALLINT Nullable); 470*cdf0e10cSrcweir 471*cdf0e10cSrcweir #define N3SQLSpecialColumns(a,b,c,d,e,f,g,h,i,j) (*(T3SQLSpecialColumns)getOdbcFunction(ODBC3SQLSpecialColumns))(a,b,c,d,e,f,g,h,i,j) 472*cdf0e10cSrcweir 473*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLStatistics) ( SQLHSTMT StatementHandle, 474*cdf0e10cSrcweir SQLCHAR * CatalogName, 475*cdf0e10cSrcweir SQLSMALLINT NameLength1, 476*cdf0e10cSrcweir SQLCHAR * SchemaName, 477*cdf0e10cSrcweir SQLSMALLINT NameLength2, 478*cdf0e10cSrcweir SQLCHAR * TableName, 479*cdf0e10cSrcweir SQLSMALLINT NameLength3, 480*cdf0e10cSrcweir SQLUSMALLINT Unique, 481*cdf0e10cSrcweir SQLUSMALLINT Reserved); 482*cdf0e10cSrcweir 483*cdf0e10cSrcweir #define N3SQLStatistics(a,b,c,d,e,f,g,h,i) (*(T3SQLStatistics)getOdbcFunction(ODBC3SQLStatistics))(a,b,c,d,e,f,g,h,i) 484*cdf0e10cSrcweir 485*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLTablePrivileges) (SQLHSTMT StatementHandle, 486*cdf0e10cSrcweir SQLCHAR * CatalogName, 487*cdf0e10cSrcweir SQLSMALLINT NameLength1, 488*cdf0e10cSrcweir SQLCHAR * SchemaName, 489*cdf0e10cSrcweir SQLSMALLINT NameLength2, 490*cdf0e10cSrcweir SQLCHAR * TableName, 491*cdf0e10cSrcweir SQLSMALLINT NameLength3); 492*cdf0e10cSrcweir 493*cdf0e10cSrcweir #define N3SQLTablePrivileges(a,b,c,d,e,f,g) (*(T3SQLTablePrivileges)getOdbcFunction(ODBC3SQLTablePrivileges))(a,b,c,d,e,f,g) 494*cdf0e10cSrcweir 495*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLTables) ( SQLHSTMT StatementHandle, 496*cdf0e10cSrcweir SQLCHAR * CatalogName, 497*cdf0e10cSrcweir SQLSMALLINT NameLength1, 498*cdf0e10cSrcweir SQLCHAR * SchemaName, 499*cdf0e10cSrcweir SQLSMALLINT NameLength2, 500*cdf0e10cSrcweir SQLCHAR * TableName, 501*cdf0e10cSrcweir SQLSMALLINT NameLength3, 502*cdf0e10cSrcweir SQLCHAR * TableType, 503*cdf0e10cSrcweir SQLSMALLINT NameLength4); 504*cdf0e10cSrcweir 505*cdf0e10cSrcweir #define N3SQLTables(a,b,c,d,e,f,g,h,i) (*(T3SQLTables)getOdbcFunction(ODBC3SQLTables))(a,b,c,d,e,f,g,h,i) 506*cdf0e10cSrcweir 507*cdf0e10cSrcweir // Terminating a statement 508*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLFreeStmt) ( SQLHSTMT StatementHandle, 509*cdf0e10cSrcweir SQLUSMALLINT Option); 510*cdf0e10cSrcweir 511*cdf0e10cSrcweir #define N3SQLFreeStmt(a,b) (*(T3SQLFreeStmt)getOdbcFunction(ODBC3SQLFreeStmt))(a,b) 512*cdf0e10cSrcweir 513*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLCloseCursor) (SQLHSTMT StatementHandle); 514*cdf0e10cSrcweir 515*cdf0e10cSrcweir #define N3SQLCloseCursor(a) (*(T3SQLCloseCursor)getOdbcFunction(ODBC3SQLCloseCursor))(a) 516*cdf0e10cSrcweir 517*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLCancel) ( SQLHSTMT StatementHandle); 518*cdf0e10cSrcweir 519*cdf0e10cSrcweir #define N3SQLCancel(a) (*(T3SQLCancel)getOdbcFunction(ODBC3SQLCancel))(a) 520*cdf0e10cSrcweir 521*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLEndTran) ( SQLSMALLINT HandleType, 522*cdf0e10cSrcweir SQLHANDLE Handle, 523*cdf0e10cSrcweir SQLSMALLINT CompletionType); 524*cdf0e10cSrcweir 525*cdf0e10cSrcweir #define N3SQLEndTran(a,b,c) (*(T3SQLEndTran)getOdbcFunction(ODBC3SQLEndTran))(a,b,c) 526*cdf0e10cSrcweir 527*cdf0e10cSrcweir // Terminating a connection 528*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLDisconnect) (SQLHDBC ConnectionHandle); 529*cdf0e10cSrcweir 530*cdf0e10cSrcweir #define N3SQLDisconnect(a) (*(T3SQLDisconnect)getOdbcFunction(ODBC3SQLDisconnect))(a) 531*cdf0e10cSrcweir 532*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLFreeHandle) (SQLSMALLINT HandleType, 533*cdf0e10cSrcweir SQLHANDLE Handle); 534*cdf0e10cSrcweir 535*cdf0e10cSrcweir #define N3SQLFreeHandle(a,b) (*(T3SQLFreeHandle)getOdbcFunction(ODBC3SQLFreeHandle))(a,b) 536*cdf0e10cSrcweir 537*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLGetCursorName) ( SQLHSTMT StatementHandle, 538*cdf0e10cSrcweir SQLCHAR * CursorName, 539*cdf0e10cSrcweir SQLSMALLINT BufferLength, 540*cdf0e10cSrcweir SQLSMALLINT* NameLength2); 541*cdf0e10cSrcweir 542*cdf0e10cSrcweir #define N3SQLGetCursorName(a,b,c,d) (*(T3SQLGetCursorName)getOdbcFunction(ODBC3SQLGetCursorName))(a,b,c,d) 543*cdf0e10cSrcweir 544*cdf0e10cSrcweir typedef SQLRETURN (SQL_API *T3SQLNativeSql) ( SQLHSTMT ConnectionHandle, 545*cdf0e10cSrcweir SQLCHAR * InStatementText, 546*cdf0e10cSrcweir SQLINTEGER TextLength1, 547*cdf0e10cSrcweir SQLCHAR * OutStatementText, 548*cdf0e10cSrcweir SQLINTEGER BufferLength, 549*cdf0e10cSrcweir SQLINTEGER * TextLength2Ptr); 550*cdf0e10cSrcweir 551*cdf0e10cSrcweir #define N3SQLNativeSql(a,b,c,d,e,f) (*(T3SQLNativeSql)getOdbcFunction(ODBC3SQLNativeSql))(a,b,c,d,e,f) 552*cdf0e10cSrcweir } 553*cdf0e10cSrcweir 554*cdf0e10cSrcweir #endif // _CONNECTIVITY_ODBC_OFUNCTIONS_HXX_ 555*cdf0e10cSrcweir 556*cdf0e10cSrcweir 557