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