1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONS_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONS_HXX
23 #include <connectivity/odbc.hxx>
24 #include <rtl/ustring.hxx>
25 #include <osl/module.h>
27 namespace connectivity
30 // sal_Bool LoadFunctions(oslModule pODBCso, sal_Bool _bDS=sal_True);
31 bool LoadLibrary_ODBC3(OUString
&_rPath
);
32 // sal_Bool LoadLibrary_ADABAS(OUString &_rPath);
34 // Connecting to a data source
35 typedef SQLRETURN (SQL_API
*T3SQLAllocHandle
) (SQLSMALLINT HandleType
,SQLHANDLE InputHandle
,SQLHANDLE
* OutputHandlePtr
);
37 #define N3SQLAllocHandle(a,b,c) (*reinterpret_cast<T3SQLAllocHandle>(getOdbcFunction(ODBC3SQLAllocHandle)))(a,b,c)
39 typedef SQLRETURN (SQL_API
*T3SQLConnect
) (SQLHDBC ConnectionHandle
,SQLCHAR
*ServerName
,SQLSMALLINT NameLength1
,SQLCHAR
*UserName
,SQLSMALLINT NameLength2
,SQLCHAR
*Authentication
,SQLSMALLINT NameLength3
);
41 #define N3SQLConnect(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLConnect>(getOdbcFunction(ODBC3SQLConnect)))(a,b,c,d,e,f,g)
43 typedef SQLRETURN (SQL_API
*T3SQLDriverConnect
) ( SQLHDBC ConnectionHandle
,
45 SQLCHAR
* InConnectionString
,
46 SQLSMALLINT StringLength1
,
47 SQLCHAR
* OutConnectionString
,
48 SQLSMALLINT BufferLength
,
49 SQLSMALLINT
* StringLength2Ptr
,
50 SQLUSMALLINT DriverCompletion
);
52 #define N3SQLDriverConnect(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLDriverConnect>(getOdbcFunction(ODBC3SQLDriverConnect)))(a,b,c,d,e,f,g,h)
54 typedef SQLRETURN (SQL_API
*T3SQLBrowseConnect
) ( SQLHDBC ConnectionHandle
,
55 SQLCHAR
* InConnectionString
,
56 SQLSMALLINT StringLength1
,
57 SQLCHAR
* OutConnectionString
,
58 SQLSMALLINT BufferLength
,
59 SQLSMALLINT
* StringLength2Ptr
);
61 #define N3SQLBrowseConnect(a,b,c,d,e,f) (*reinterpret_cast<T3SQLBrowseConnect>(getOdbcFunction(ODBC3SQLBrowseConnect)))(a,b,c,d,e,f)
63 // Obtaining information about a driver and data source
64 typedef SQLRETURN (SQL_API
*T3SQLDataSources
) ( SQLHENV EnvironmentHandle
,
65 SQLUSMALLINT Direction
,
67 SQLSMALLINT BufferLength1
,
68 SQLSMALLINT
* NameLength1Ptr
,
69 SQLCHAR
* Description
,
70 SQLSMALLINT BufferLength2
,
71 SQLSMALLINT
* NameLength2Ptr
);
73 #define N3SQLDataSources(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLDataSources>(getOdbcFunction(ODBC3SQLDataSources)))(a,b,c,d,e,f,g,h)
75 typedef SQLRETURN (SQL_API
*T3SQLDrivers
) ( SQLHENV EnvironmentHandle
,
76 SQLUSMALLINT Direction
,
77 SQLCHAR
* DriverDescription
,
78 SQLSMALLINT BufferLength1
,
79 SQLSMALLINT
* DescriptionLengthPtr
,
80 SQLCHAR
* DriverAttributes
,
81 SQLSMALLINT BufferLength2
,
82 SQLSMALLINT
* AttributesLengthPtr
);
84 #define N3SQLDrivers(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLDrivers>(getOdbcFunction(ODBC3SQLDrivers)))(a,b,c,d,e,f,g,h)
86 typedef SQLRETURN (SQL_API
*T3SQLGetInfo
) ( SQLHDBC ConnectionHandle
,
87 SQLUSMALLINT InfoType
,
88 SQLPOINTER InfoValuePtr
,
89 SQLSMALLINT BufferLength
,
90 SQLSMALLINT
* StringLengthPtr
);
92 #define N3SQLGetInfo(a,b,c,d,e) (*reinterpret_cast<T3SQLGetInfo>(getOdbcFunction(ODBC3SQLGetInfo)))(a,b,c,d,e)
94 typedef SQLRETURN (SQL_API
*T3SQLGetFunctions
) (SQLHDBC ConnectionHandle
,
95 SQLUSMALLINT FunctionId
,
96 SQLUSMALLINT
* SupportedPtr
);
98 #define N3SQLGetFunctions(a,b,c) (*reinterpret_cast<T3SQLGetFunctions>(getOdbcFunction(ODBC3SQLGetFunctions)))(a,b,c)
100 typedef SQLRETURN (SQL_API
*T3SQLGetTypeInfo
) ( SQLHSTMT StatementHandle
,
101 SQLSMALLINT DataType
);
103 #define N3SQLGetTypeInfo(a,b) (*reinterpret_cast<T3SQLGetTypeInfo>(getOdbcFunction(ODBC3SQLGetTypeInfo)))(a,b)
105 // Setting and retrieving driver attributes
106 typedef SQLRETURN (SQL_API
*T3SQLSetConnectAttr
)(SQLHDBC ConnectionHandle
,
107 SQLINTEGER Attribute
,
109 SQLINTEGER StringLength
);
111 #define N3SQLSetConnectAttr(a,b,c,d) (*reinterpret_cast<T3SQLSetConnectAttr>(getOdbcFunction(ODBC3SQLSetConnectAttr)))(a,b,c,d)
113 typedef SQLRETURN (SQL_API
*T3SQLGetConnectAttr
) (SQLHDBC ConnectionHandle
,
114 SQLINTEGER Attribute
,
116 SQLINTEGER BufferLength
,
117 SQLINTEGER
* StringLength
);
119 #define N3SQLGetConnectAttr(a,b,c,d,e) (*reinterpret_cast<T3SQLGetConnectAttr>(getOdbcFunction(ODBC3SQLGetConnectAttr)))(a,b,c,d,e)
122 typedef SQLRETURN (SQL_API
*T3SQLSetEnvAttr
) ( SQLHENV EnvironmentHandle
,
123 SQLINTEGER Attribute
,
125 SQLINTEGER StringLength
);
127 #define N3SQLSetEnvAttr(a,b,c,d) (*reinterpret_cast<T3SQLSetEnvAttr>(getOdbcFunction(ODBC3SQLSetEnvAttr)))(a,b,c,d)
129 typedef SQLRETURN (SQL_API
*T3SQLGetEnvAttr
) ( SQLHENV EnvironmentHandle
,
130 SQLINTEGER Attribute
,
132 SQLINTEGER BufferLength
,
133 SQLINTEGER
* StringLength
);
135 #define N3SQLGetEnvAttr(a,b,c,d,e) (*reinterpret_cast<T3SQLGetEnvAttr>(getOdbcFunction(ODBC3SQLGetEnvAttr)))(a,b,c,d,e)
138 typedef SQLRETURN (SQL_API
*T3SQLSetStmtAttr
) ( SQLHSTMT StatementHandle
,
139 SQLINTEGER Attribute
,
141 SQLINTEGER StringLength
);
143 #define N3SQLSetStmtAttr(a,b,c,d) (*reinterpret_cast<T3SQLSetStmtAttr>(getOdbcFunction(ODBC3SQLSetStmtAttr)))(a,b,c,d)
145 typedef SQLRETURN (SQL_API
*T3SQLGetStmtAttr
) ( SQLHSTMT StatementHandle
,
146 SQLINTEGER Attribute
,
148 SQLINTEGER BufferLength
,
149 SQLINTEGER
* StringLength
);
151 #define N3SQLGetStmtAttr(a,b,c,d,e) (*reinterpret_cast<T3SQLGetStmtAttr>(getOdbcFunction(ODBC3SQLGetStmtAttr)))(a,b,c,d,e)
153 // Setting and retrieving descriptor fields
154 /*typedef SQLRETURN (SQL_API *T3SQLSetDescField) (SQLHDESC DescriptorHandle,
155 SQLSMALLINT RecNumber,
156 SQLSMALLINT FieldIdentifier,
158 SQLINTEGER BufferLength);
160 #define N3SQLSetDescField(a,b,c,d,e) (*reinterpret_cast<T3SQLSetDescField>(getOdbcFunction(ODBC3SQLSetDescField)))(a,b,c,d,e)
162 typedef SQLRETURN (SQL_API *T3SQLGetDescField) ( SQLHDESC DescriptorHandle,
163 SQLSMALLINT RecNumber,
164 SQLSMALLINT FieldIdentifier,
166 SQLINTEGER BufferLength,
167 SQLINTEGER * StringLengthPtr);
169 #define N3SQLGetDescField(a,b,c,d,e,f) (*reinterpret_cast<T3SQLGetDescField>(getOdbcFunction(ODBC3SQLGetDescField)))(a,b,c,d,e,f)
172 typedef SQLRETURN (SQL_API *T3SQLGetDescRec) ( SQLHDESC DescriptorHandle,
173 SQLSMALLINT RecNumber,
175 SQLSMALLINT BufferLength,
176 SQLSMALLINT * StringLengthPtr,
177 SQLSMALLINT * TypePtr,
178 SQLSMALLINT * SubTypePtr,
180 SQLSMALLINT * PrecisionPtr,
181 SQLSMALLINT * ScalePtr,
182 SQLSMALLINT * NullablePtr);
184 #define N3SQLGetDescRec(a,b,c,d,e,f,g,h,i,j,k) (*reinterpret_cast<T3SQLGetDescRec>(getOdbcFunction(ODBC3SQLGetDescRec)))(a,b,c,d,e,f,g,h,i,j,k)
187 typedef SQLRETURN (SQL_API *T3SQLSetDescRec) ( SQLHDESC DescriptorHandle,
188 SQLSMALLINT RecNumber,
192 SQLSMALLINT Precision,
195 SQLLEN * StringLengthPtr,
196 SQLLEN * IndicatorPtr);
198 #define N3SQLSetDescRec(a,b,c,d,e,f,g,h,i,j) (*reinterpret_cast<T3SQLSetDescRec>(getOdbcFunction(ODBC3SQLSetDescRec)))(a,b,c,d,e,f,g,h,i,j)
201 // Preparing SQL requests
202 typedef SQLRETURN (SQL_API
*T3SQLPrepare
) ( SQLHSTMT StatementHandle
,
203 SQLCHAR
* StatementText
,
204 SQLINTEGER TextLength
);
206 #define N3SQLPrepare(a,b,c) (*reinterpret_cast<T3SQLPrepare>(getOdbcFunction(ODBC3SQLPrepare)))(a,b,c)
208 typedef SQLRETURN (SQL_API
*T3SQLBindParameter
) (SQLHSTMT StatementHandle
,
209 SQLUSMALLINT ParameterNumber
,
210 SQLSMALLINT InputOutputType
,
211 SQLSMALLINT ValueType
,
212 SQLSMALLINT ParameterType
,
214 SQLSMALLINT DecimalDigits
,
215 SQLPOINTER ParameterValuePtr
,
217 SQLLEN
* StrLen_or_IndPtr
);
219 #define N3SQLBindParameter(a,b,c,d,e,f,g,h,i,j) (*reinterpret_cast<T3SQLBindParameter>(getOdbcFunction(ODBC3SQLBindParameter)))(a,b,c,d,e,f,g,h,i,j)
221 /*typedef SQLRETURN (SQL_API *T3SQLGetCursorName) (SQLHSTMT StatementHandle,
222 SQLCHAR * CursorName,
223 SQLSMALLINT BufferLength,
224 SQLSMALLINT * NameLengthPtr);
226 #define N3SQLGetCursorName(a,b,c,d) (*reinterpret_cast<T3SQLGetCursorName>(getOdbcFunction(ODBC3SQLGetCursorName)))(a,b,c,d)
229 typedef SQLRETURN (SQL_API
*T3SQLSetCursorName
) (SQLHSTMT StatementHandle
,
230 SQLCHAR
* CursorName
,
231 SQLSMALLINT NameLength
);
233 #define N3SQLSetCursorName(a,b,c) (*reinterpret_cast<T3SQLSetCursorName>(getOdbcFunction(ODBC3SQLSetCursorName)))(a,b,c)
235 // Submitting requests
236 typedef SQLRETURN (SQL_API
*T3SQLExecute
) ( SQLHSTMT StatementHandle
);
238 #define N3SQLExecute(a) (*reinterpret_cast<T3SQLExecute>(getOdbcFunction(ODBC3SQLExecute)))(a)
240 typedef SQLRETURN (SQL_API
*T3SQLExecDirect
) ( SQLHSTMT StatementHandle
,
241 SQLCHAR
* StatementText
,
242 SQLINTEGER TextLength
);
244 #define N3SQLExecDirect(a,b,c) (*reinterpret_cast<T3SQLExecDirect>(getOdbcFunction(ODBC3SQLExecDirect)))(a,b,c)
246 /*typedef SQLRETURN (SQL_API *T3SQLNativeSql) ( SQLHDBC ConnectionHandle,
247 SQLCHAR * InStatementText,
248 SQLINTEGER TextLength1,
249 SQLCHAR * utStatementText,
250 SQLINTEGER BufferLength,
251 SQLINTEGER * TextLength2Ptr);
253 #define N3SQLNativeSql(a,b,c,d,e,f) (*reinterpret_cast<T3SQLNativeSql>(getOdbcFunction(ODBC3SQLNativeSql)))(a,b,c,d,e,f)*/
255 typedef SQLRETURN (SQL_API
*T3SQLDescribeParam
) (SQLHSTMT StatementHandle
,
256 SQLUSMALLINT ParameterNumber
,
257 SQLSMALLINT
* DataTypePtr
,
258 SQLULEN
* ParameterSizePtr
,
259 SQLSMALLINT
* DecimalDigitsPtr
,
260 SQLSMALLINT
* NullablePtr
);
262 #define N3SQLDescribeParam(a,b,c,d,e,f) (*reinterpret_cast<T3SQLDescribeParam>(getOdbcFunction(ODBC3SQLDescribeParam)))(a,b,c,d,e,f)
264 typedef SQLRETURN (SQL_API
*T3SQLNumParams
) ( SQLHSTMT StatementHandle
,
265 SQLSMALLINT
* ParameterCountPtr
);
267 #define N3SQLNumParams(a,b) (*reinterpret_cast<T3SQLNumParams>(getOdbcFunction(ODBC3SQLNumParams)))(a,b)
269 typedef SQLRETURN (SQL_API
*T3SQLParamData
) ( SQLHSTMT StatementHandle
,
270 SQLPOINTER
* ValuePtrPtr
);
272 #define N3SQLParamData(a,b) (*reinterpret_cast<T3SQLParamData>(getOdbcFunction(ODBC3SQLParamData)))(a,b)
274 typedef SQLRETURN (SQL_API
*T3SQLPutData
) ( SQLHSTMT StatementHandle
,
276 SQLLEN StrLen_or_Ind
);
278 #define N3SQLPutData(a,b,c) (*reinterpret_cast<T3SQLPutData>(getOdbcFunction(ODBC3SQLPutData)))(a,b,c)
280 // Retrieving results and information about results
281 typedef SQLRETURN (SQL_API
*T3SQLRowCount
) ( SQLHSTMT StatementHandle
,
282 SQLLEN
* RowCountPtr
);
284 #define N3SQLRowCount(a,b) (*reinterpret_cast<T3SQLRowCount>(getOdbcFunction(ODBC3SQLRowCount)))(a,b)
286 typedef SQLRETURN (SQL_API
*T3SQLNumResultCols
) (SQLHSTMT StatementHandle
,
287 SQLSMALLINT
* ColumnCountPtr
);
289 #define N3SQLNumResultCols(a,b) (*reinterpret_cast<T3SQLNumResultCols>(getOdbcFunction(ODBC3SQLNumResultCols)))(a,b)
291 typedef SQLRETURN (SQL_API
*T3SQLDescribeCol
) ( SQLHSTMT StatementHandle
,
292 SQLUSMALLINT ColumnNumber
,
293 SQLCHAR
* ColumnName
,
294 SQLSMALLINT BufferLength
,
295 SQLSMALLINT
* NameLengthPtr
,
296 SQLSMALLINT
* DataTypePtr
,
297 SQLULEN
* ColumnSizePtr
,
298 SQLSMALLINT
* DecimalDigitsPtr
,
299 SQLSMALLINT
* NullablePtr
);
301 #define N3SQLDescribeCol(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLDescribeCol>(getOdbcFunction(ODBC3SQLDescribeCol)))(a,b,c,d,e,f,g,h,i)
303 typedef SQLRETURN (SQL_API
*T3SQLColAttribute
) (SQLHSTMT StatementHandle
,
304 SQLUSMALLINT ColumnNumber
,
305 SQLUSMALLINT FieldIdentifier
,
306 SQLPOINTER CharacterAttributePtr
,
307 SQLSMALLINT BufferLength
,
308 SQLSMALLINT
* StringLengthPtr
,
309 SQLLEN
* NumericAttributePtr
);
311 #define N3SQLColAttribute(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLColAttribute>(getOdbcFunction(ODBC3SQLColAttribute)))(a,b,c,d,e,f,g)
313 typedef SQLRETURN (SQL_API
*T3SQLBindCol
) ( SQLHSTMT StatementHandle
,
314 SQLUSMALLINT ColumnNumber
,
315 SQLSMALLINT TargetType
,
316 SQLPOINTER TargetValuePtr
,
318 SQLLEN
* StrLen_or_IndPtr
);
320 #define N3SQLBindCol(a,b,c,d,e,f) (*reinterpret_cast<T3SQLBindCol>(getOdbcFunction(ODBC3SQLBindCol)))(a,b,c,d,e,f)
322 typedef SQLRETURN (SQL_API
*T3SQLFetch
) ( SQLHSTMT StatementHandle
);
324 #define N3SQLFetch(a) (*reinterpret_cast<T3SQLFetch>(getOdbcFunction(ODBC3SQLFetch)))(a)
326 typedef SQLRETURN (SQL_API
*T3SQLFetchScroll
) ( SQLHSTMT StatementHandle
,
327 SQLSMALLINT FetchOrientation
,
330 #define N3SQLFetchScroll(a,b,c) (*reinterpret_cast<T3SQLFetchScroll>(getOdbcFunction(ODBC3SQLFetchScroll)))(a,b,c)
332 typedef SQLRETURN (SQL_API
*T3SQLGetData
) ( SQLHSTMT StatementHandle
,
333 SQLUSMALLINT ColumnNumber
,
334 SQLSMALLINT TargetType
,
335 SQLPOINTER TargetValuePtr
,
337 SQLLEN
* StrLen_or_IndPtr
);
339 #define N3SQLGetData(a,b,c,d,e,f) (*reinterpret_cast<T3SQLGetData>(getOdbcFunction(ODBC3SQLGetData)))(a,b,c,d,e,f)
341 typedef SQLRETURN (SQL_API
*T3SQLSetPos
) ( SQLHSTMT StatementHandle
,
342 SQLSETPOSIROW RowNumber
,
343 SQLUSMALLINT Operation
,
344 SQLUSMALLINT LockType
);
346 #define N3SQLSetPos(a,b,c,d) (*reinterpret_cast<T3SQLSetPos>(getOdbcFunction(ODBC3SQLSetPos)))(a,b,c,d)
348 typedef SQLRETURN (SQL_API
*T3SQLBulkOperations
) ( SQLHSTMT StatementHandle
,
349 SQLSMALLINT Operation
);
351 #define N3SQLBulkOperations(a,b) (*reinterpret_cast<T3SQLBulkOperations>(getOdbcFunction(ODBC3SQLBulkOperations)))(a,b)
353 typedef SQLRETURN (SQL_API
*T3SQLMoreResults
) ( SQLHSTMT StatementHandle
);
355 #define N3SQLMoreResults(a) (*reinterpret_cast<T3SQLMoreResults>(getOdbcFunction(ODBC3SQLMoreResults)))(a)
357 /*typedef SQLRETURN (SQL_API *T3SQLGetDiagField) (SQLSMALLINT HandleType,
359 SQLSMALLINT RecNumber,
360 SQLSMALLINT DiagIdentifier,
361 SQLPOINTER DiagInfoPtr,
362 SQLSMALLINT BufferLength,
363 SQLSMALLINT * StringLengthPtr);
365 #define N3SQLGetDiagField(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLGetDiagField>(getOdbcFunction(ODBC3SQLGetDiagField)))(a,b,c,d,e,f,g)*/
367 typedef SQLRETURN (SQL_API
*T3SQLGetDiagRec
) ( SQLSMALLINT HandleType
,
369 SQLSMALLINT RecNumber
,
371 SQLINTEGER
* NativeErrorPtr
,
372 SQLCHAR
* MessageText
,
373 SQLSMALLINT BufferLength
,
374 SQLSMALLINT
* TextLengthPtr
);
377 #define N3SQLGetDiagRec(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLGetDiagRec>(getOdbcFunction(ODBC3SQLGetDiagRec)))(a,b,c,d,e,f,g,h)
379 // Obtaining information about the data source's system tables (catalog functions)
380 typedef SQLRETURN (SQL_API
*T3SQLColumnPrivileges
) (SQLHSTMT StatementHandle
,
381 SQLCHAR
* CatalogName
,
382 SQLSMALLINT NameLength1
,
383 SQLCHAR
* SchemaName
,
384 SQLSMALLINT NameLength2
,
386 SQLSMALLINT NameLength3
,
387 SQLCHAR
* ColumnName
,
388 SQLSMALLINT NameLength4
);
390 #define N3SQLColumnPrivileges(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLColumnPrivileges>(getOdbcFunction(ODBC3SQLColumnPrivileges)))(a,b,c,d,e,f,g,h,i)
392 typedef SQLRETURN (SQL_API
*T3SQLColumns
) ( SQLHSTMT StatementHandle
,
393 SQLCHAR
* CatalogName
,
394 SQLSMALLINT NameLength1
,
395 SQLCHAR
* SchemaName
,
396 SQLSMALLINT NameLength2
,
398 SQLSMALLINT NameLength3
,
399 SQLCHAR
* ColumnName
,
400 SQLSMALLINT NameLength4
);
402 #define N3SQLColumns(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLColumns>(getOdbcFunction(ODBC3SQLColumns)))(a,b,c,d,e,f,g,h,i)
404 typedef SQLRETURN (SQL_API
*T3SQLForeignKeys
) ( SQLHSTMT StatementHandle
,
405 SQLCHAR
* PKCatalogName
,
406 SQLSMALLINT NameLength1
,
407 SQLCHAR
* PKSchemaName
,
408 SQLSMALLINT NameLength2
,
409 SQLCHAR
* PKTableName
,
410 SQLSMALLINT NameLength3
,
411 SQLCHAR
* FKCatalogName
,
412 SQLSMALLINT NameLength4
,
413 SQLCHAR
* FKSchemaName
,
414 SQLSMALLINT NameLength5
,
415 SQLCHAR
* FKTableName
,
416 SQLSMALLINT NameLength6
);
418 #define N3SQLForeignKeys(a,b,c,d,e,f,g,h,i,j,k,l,m) (*reinterpret_cast<T3SQLForeignKeys>(getOdbcFunction(ODBC3SQLForeignKeys)))(a,b,c,d,e,f,g,h,i,j,k,l,m)
420 typedef SQLRETURN (SQL_API
*T3SQLPrimaryKeys
) ( SQLHSTMT StatementHandle
,
421 SQLCHAR
* CatalogName
,
422 SQLSMALLINT NameLength1
,
423 SQLCHAR
* SchemaName
,
424 SQLSMALLINT NameLength2
,
426 SQLSMALLINT NameLength3
);
428 #define N3SQLPrimaryKeys(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLPrimaryKeys>(getOdbcFunction(ODBC3SQLPrimaryKeys)))(a,b,c,d,e,f,g)
430 typedef SQLRETURN (SQL_API
*T3SQLProcedureColumns
) (SQLHSTMT StatementHandle
,
431 SQLCHAR
* CatalogName
,
432 SQLSMALLINT NameLength1
,
433 SQLCHAR
* SchemaName
,
434 SQLSMALLINT NameLength2
,
436 SQLSMALLINT NameLength3
,
437 SQLCHAR
* ColumnName
,
438 SQLSMALLINT NameLength4
);
440 #define N3SQLProcedureColumns(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLProcedureColumns>(getOdbcFunction(ODBC3SQLProcedureColumns)))(a,b,c,d,e,f,g,h,i)
442 typedef SQLRETURN (SQL_API
*T3SQLProcedures
) ( SQLHSTMT StatementHandle
,
443 SQLCHAR
* CatalogName
,
444 SQLSMALLINT NameLength1
,
445 SQLCHAR
* SchemaName
,
446 SQLSMALLINT NameLength2
,
448 SQLSMALLINT NameLength3
);
450 #define N3SQLProcedures(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLProcedures>(getOdbcFunction(ODBC3SQLProcedures)))(a,b,c,d,e,f,g)
452 typedef SQLRETURN (SQL_API
*T3SQLSpecialColumns
) (SQLHSTMT StatementHandle
,
453 SQLUSMALLINT IdentifierType
,
454 SQLCHAR
* CatalogName
,
455 SQLSMALLINT NameLength1
,
456 SQLCHAR
* SchemaName
,
457 SQLSMALLINT NameLength2
,
459 SQLSMALLINT NameLength3
,
461 SQLUSMALLINT Nullable
);
463 #define N3SQLSpecialColumns(a,b,c,d,e,f,g,h,i,j) (*reinterpret_cast<T3SQLSpecialColumns>(getOdbcFunction(ODBC3SQLSpecialColumns)))(a,b,c,d,e,f,g,h,i,j)
465 typedef SQLRETURN (SQL_API
*T3SQLStatistics
) ( SQLHSTMT StatementHandle
,
466 SQLCHAR
* CatalogName
,
467 SQLSMALLINT NameLength1
,
468 SQLCHAR
* SchemaName
,
469 SQLSMALLINT NameLength2
,
471 SQLSMALLINT NameLength3
,
473 SQLUSMALLINT Reserved
);
475 #define N3SQLStatistics(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLStatistics>(getOdbcFunction(ODBC3SQLStatistics)))(a,b,c,d,e,f,g,h,i)
477 typedef SQLRETURN (SQL_API
*T3SQLTablePrivileges
) (SQLHSTMT StatementHandle
,
478 SQLCHAR
* CatalogName
,
479 SQLSMALLINT NameLength1
,
480 SQLCHAR
* SchemaName
,
481 SQLSMALLINT NameLength2
,
483 SQLSMALLINT NameLength3
);
485 #define N3SQLTablePrivileges(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLTablePrivileges>(getOdbcFunction(ODBC3SQLTablePrivileges)))(a,b,c,d,e,f,g)
487 typedef SQLRETURN (SQL_API
*T3SQLTables
) ( SQLHSTMT StatementHandle
,
488 SQLCHAR
* CatalogName
,
489 SQLSMALLINT NameLength1
,
490 SQLCHAR
* SchemaName
,
491 SQLSMALLINT NameLength2
,
493 SQLSMALLINT NameLength3
,
495 SQLSMALLINT NameLength4
);
497 #define N3SQLTables(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLTables>(getOdbcFunction(ODBC3SQLTables)))(a,b,c,d,e,f,g,h,i)
499 // Terminating a statement
500 typedef SQLRETURN (SQL_API
*T3SQLFreeStmt
) ( SQLHSTMT StatementHandle
,
501 SQLUSMALLINT Option
);
503 #define N3SQLFreeStmt(a,b) (*reinterpret_cast<T3SQLFreeStmt>(getOdbcFunction(ODBC3SQLFreeStmt)))(a,b)
505 typedef SQLRETURN (SQL_API
*T3SQLCloseCursor
) (SQLHSTMT StatementHandle
);
507 #define N3SQLCloseCursor(a) (*reinterpret_cast<T3SQLCloseCursor>(getOdbcFunction(ODBC3SQLCloseCursor)))(a)
509 typedef SQLRETURN (SQL_API
*T3SQLCancel
) ( SQLHSTMT StatementHandle
);
511 #define N3SQLCancel(a) (*reinterpret_cast<T3SQLCancel>(getOdbcFunction(ODBC3SQLCancel)))(a)
513 typedef SQLRETURN (SQL_API
*T3SQLEndTran
) ( SQLSMALLINT HandleType
,
515 SQLSMALLINT CompletionType
);
517 #define N3SQLEndTran(a,b,c) (*reinterpret_cast<T3SQLEndTran>(getOdbcFunction(ODBC3SQLEndTran)))(a,b,c)
519 // Terminating a connection
520 typedef SQLRETURN (SQL_API
*T3SQLDisconnect
) (SQLHDBC ConnectionHandle
);
522 #define N3SQLDisconnect(a) (*reinterpret_cast<T3SQLDisconnect>(getOdbcFunction(ODBC3SQLDisconnect)))(a)
524 typedef SQLRETURN (SQL_API
*T3SQLFreeHandle
) (SQLSMALLINT HandleType
,
527 #define N3SQLFreeHandle(a,b) (*reinterpret_cast<T3SQLFreeHandle>(getOdbcFunction(ODBC3SQLFreeHandle)))(a,b)
529 typedef SQLRETURN (SQL_API
*T3SQLGetCursorName
) ( SQLHSTMT StatementHandle
,
530 SQLCHAR
* CursorName
,
531 SQLSMALLINT BufferLength
,
532 SQLSMALLINT
* NameLength2
);
534 #define N3SQLGetCursorName(a,b,c,d) (*reinterpret_cast<T3SQLGetCursorName>(getOdbcFunction(ODBC3SQLGetCursorName)))(a,b,c,d)
536 typedef SQLRETURN (SQL_API
*T3SQLNativeSql
) ( SQLHSTMT ConnectionHandle
,
537 SQLCHAR
* InStatementText
,
538 SQLINTEGER TextLength1
,
539 SQLCHAR
* OutStatementText
,
540 SQLINTEGER BufferLength
,
541 SQLINTEGER
* TextLength2Ptr
);
543 #define N3SQLNativeSql(a,b,c,d,e,f) (*reinterpret_cast<T3SQLNativeSql>(getOdbcFunction(ODBC3SQLNativeSql)))(a,b,c,d,e,f)
546 #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONS_HXX
549 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */