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