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(ODBC3SQLFunctionId::AllocHandle)))(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(ODBC3SQLFunctionId::Connect)))(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(ODBC3SQLFunctionId::DriverConnect)))(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(ODBC3SQLFunctionId::BrowseConnect)))(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(ODBC3SQLFunctionId::DataSources)))(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(ODBC3SQLFunctionId::Drivers)))(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(ODBC3SQLFunctionId::GetInfo)))(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(ODBC3SQLFunctionId::GetFunctions)))(a,b,c)
100 typedef SQLRETURN (SQL_API
*T3SQLGetTypeInfo
) ( SQLHSTMT StatementHandle
,
101 SQLSMALLINT DataType
);
103 #define N3SQLGetTypeInfo(a,b) (*reinterpret_cast<T3SQLGetTypeInfo>(getOdbcFunction(ODBC3SQLFunctionId::GetTypeInfo)))(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(ODBC3SQLFunctionId::SetConnectAttr)))(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(ODBC3SQLFunctionId::GetConnectAttr)))(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(ODBC3SQLFunctionId::SetEnvAttr)))(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(ODBC3SQLFunctionId::GetEnvAttr)))(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(ODBC3SQLFunctionId::SetStmtAttr)))(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(ODBC3SQLFunctionId::GetStmtAttr)))(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(ODBC3SQLFunctionId::SetDescField)))(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(ODBC3SQLFunctionId::GetDescField)))(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(ODBC3SQLFunctionId::GetDescRec)))(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(ODBC3SQLFunctionId::SetDescRec)))(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(ODBC3SQLFunctionId::Prepare)))(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(ODBC3SQLFunctionId::BindParameter)))(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(ODBC3SQLFunctionId::GetCursorName)))(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(ODBC3SQLFunctionId::SetCursorName)))(a,b,c)
235 // Submitting requests
236 typedef SQLRETURN (SQL_API
*T3SQLExecute
) ( SQLHSTMT StatementHandle
);
238 #define N3SQLExecute(a) (*reinterpret_cast<T3SQLExecute>(getOdbcFunction(ODBC3SQLFunctionId::Execute)))(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(ODBC3SQLFunctionId::ExecDirect)))(a,b,c)
246 typedef SQLRETURN (SQL_API
*T3SQLDescribeParam
) (SQLHSTMT StatementHandle
,
247 SQLUSMALLINT ParameterNumber
,
248 SQLSMALLINT
* DataTypePtr
,
249 SQLULEN
* ParameterSizePtr
,
250 SQLSMALLINT
* DecimalDigitsPtr
,
251 SQLSMALLINT
* NullablePtr
);
253 #define N3SQLDescribeParam(a,b,c,d,e,f) (*reinterpret_cast<T3SQLDescribeParam>(getOdbcFunction(ODBC3SQLFunctionId::DescribeParam)))(a,b,c,d,e,f)
255 typedef SQLRETURN (SQL_API
*T3SQLNumParams
) ( SQLHSTMT StatementHandle
,
256 SQLSMALLINT
* ParameterCountPtr
);
258 #define N3SQLNumParams(a,b) (*reinterpret_cast<T3SQLNumParams>(getOdbcFunction(ODBC3SQLFunctionId::NumParams)))(a,b)
260 typedef SQLRETURN (SQL_API
*T3SQLParamData
) ( SQLHSTMT StatementHandle
,
261 SQLPOINTER
* ValuePtrPtr
);
263 #define N3SQLParamData(a,b) (*reinterpret_cast<T3SQLParamData>(getOdbcFunction(ODBC3SQLFunctionId::ParamData)))(a,b)
265 typedef SQLRETURN (SQL_API
*T3SQLPutData
) ( SQLHSTMT StatementHandle
,
267 SQLLEN StrLen_or_Ind
);
269 #define N3SQLPutData(a,b,c) (*reinterpret_cast<T3SQLPutData>(getOdbcFunction(ODBC3SQLFunctionId::PutData)))(a,b,c)
271 // Retrieving results and information about results
272 typedef SQLRETURN (SQL_API
*T3SQLRowCount
) ( SQLHSTMT StatementHandle
,
273 SQLLEN
* RowCountPtr
);
275 #define N3SQLRowCount(a,b) (*reinterpret_cast<T3SQLRowCount>(getOdbcFunction(ODBC3SQLFunctionId::RowCount)))(a,b)
277 typedef SQLRETURN (SQL_API
*T3SQLNumResultCols
) (SQLHSTMT StatementHandle
,
278 SQLSMALLINT
* ColumnCountPtr
);
280 #define N3SQLNumResultCols(a,b) (*reinterpret_cast<T3SQLNumResultCols>(getOdbcFunction(ODBC3SQLFunctionId::NumResultCols)))(a,b)
282 typedef SQLRETURN (SQL_API
*T3SQLDescribeCol
) ( SQLHSTMT StatementHandle
,
283 SQLUSMALLINT ColumnNumber
,
284 SQLCHAR
* ColumnName
,
285 SQLSMALLINT BufferLength
,
286 SQLSMALLINT
* NameLengthPtr
,
287 SQLSMALLINT
* DataTypePtr
,
288 SQLULEN
* ColumnSizePtr
,
289 SQLSMALLINT
* DecimalDigitsPtr
,
290 SQLSMALLINT
* NullablePtr
);
292 #define N3SQLDescribeCol(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLDescribeCol>(getOdbcFunction(ODBC3SQLFunctionId::DescribeCol)))(a,b,c,d,e,f,g,h,i)
294 typedef SQLRETURN (SQL_API
*T3SQLColAttribute
) (SQLHSTMT StatementHandle
,
295 SQLUSMALLINT ColumnNumber
,
296 SQLUSMALLINT FieldIdentifier
,
297 SQLPOINTER CharacterAttributePtr
,
298 SQLSMALLINT BufferLength
,
299 SQLSMALLINT
* StringLengthPtr
,
300 SQLLEN
* NumericAttributePtr
);
302 #define N3SQLColAttribute(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLColAttribute>(getOdbcFunction(ODBC3SQLFunctionId::ColAttribute)))(a,b,c,d,e,f,g)
304 typedef SQLRETURN (SQL_API
*T3SQLBindCol
) ( SQLHSTMT StatementHandle
,
305 SQLUSMALLINT ColumnNumber
,
306 SQLSMALLINT TargetType
,
307 SQLPOINTER TargetValuePtr
,
309 SQLLEN
* StrLen_or_IndPtr
);
311 #define N3SQLBindCol(a,b,c,d,e,f) (*reinterpret_cast<T3SQLBindCol>(getOdbcFunction(ODBC3SQLFunctionId::BindCol)))(a,b,c,d,e,f)
313 typedef SQLRETURN (SQL_API
*T3SQLFetch
) ( SQLHSTMT StatementHandle
);
315 #define N3SQLFetch(a) (*reinterpret_cast<T3SQLFetch>(getOdbcFunction(ODBC3SQLFunctionId::Fetch)))(a)
317 typedef SQLRETURN (SQL_API
*T3SQLFetchScroll
) ( SQLHSTMT StatementHandle
,
318 SQLSMALLINT FetchOrientation
,
321 #define N3SQLFetchScroll(a,b,c) (*reinterpret_cast<T3SQLFetchScroll>(getOdbcFunction(ODBC3SQLFunctionId::FetchScroll)))(a,b,c)
323 typedef SQLRETURN (SQL_API
*T3SQLGetData
) ( SQLHSTMT StatementHandle
,
324 SQLUSMALLINT ColumnNumber
,
325 SQLSMALLINT TargetType
,
326 SQLPOINTER TargetValuePtr
,
328 SQLLEN
* StrLen_or_IndPtr
);
330 #define N3SQLGetData(a,b,c,d,e,f) (*reinterpret_cast<T3SQLGetData>(getOdbcFunction(ODBC3SQLFunctionId::GetData)))(a,b,c,d,e,f)
332 typedef SQLRETURN (SQL_API
*T3SQLSetPos
) ( SQLHSTMT StatementHandle
,
333 SQLSETPOSIROW RowNumber
,
334 SQLUSMALLINT Operation
,
335 SQLUSMALLINT LockType
);
337 #define N3SQLSetPos(a,b,c,d) (*reinterpret_cast<T3SQLSetPos>(getOdbcFunction(ODBC3SQLFunctionId::SetPos)))(a,b,c,d)
339 typedef SQLRETURN (SQL_API
*T3SQLBulkOperations
) ( SQLHSTMT StatementHandle
,
340 SQLSMALLINT Operation
);
342 #define N3SQLBulkOperations(a,b) (*reinterpret_cast<T3SQLBulkOperations>(getOdbcFunction(ODBC3SQLFunctionId::BulkOperations)))(a,b)
344 typedef SQLRETURN (SQL_API
*T3SQLMoreResults
) ( SQLHSTMT StatementHandle
);
346 #define N3SQLMoreResults(a) (*reinterpret_cast<T3SQLMoreResults>(getOdbcFunction(ODBC3SQLFunctionId::MoreResults)))(a)
348 /*typedef SQLRETURN (SQL_API *T3SQLGetDiagField) (SQLSMALLINT HandleType,
350 SQLSMALLINT RecNumber,
351 SQLSMALLINT DiagIdentifier,
352 SQLPOINTER DiagInfoPtr,
353 SQLSMALLINT BufferLength,
354 SQLSMALLINT * StringLengthPtr);
356 #define N3SQLGetDiagField(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLGetDiagField>(getOdbcFunction(ODBC3SQLFunctionId::GetDiagField)))(a,b,c,d,e,f,g)*/
358 typedef SQLRETURN (SQL_API
*T3SQLGetDiagRec
) ( SQLSMALLINT HandleType
,
360 SQLSMALLINT RecNumber
,
362 SQLINTEGER
* NativeErrorPtr
,
363 SQLCHAR
* MessageText
,
364 SQLSMALLINT BufferLength
,
365 SQLSMALLINT
* TextLengthPtr
);
368 #define N3SQLGetDiagRec(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLGetDiagRec>(getOdbcFunction(ODBC3SQLFunctionId::GetDiagRec)))(a,b,c,d,e,f,g,h)
370 // Obtaining information about the data source's system tables (catalog functions)
371 typedef SQLRETURN (SQL_API
*T3SQLColumnPrivileges
) (SQLHSTMT StatementHandle
,
372 SQLCHAR
* CatalogName
,
373 SQLSMALLINT NameLength1
,
374 SQLCHAR
* SchemaName
,
375 SQLSMALLINT NameLength2
,
377 SQLSMALLINT NameLength3
,
378 SQLCHAR
* ColumnName
,
379 SQLSMALLINT NameLength4
);
381 #define N3SQLColumnPrivileges(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLColumnPrivileges>(getOdbcFunction(ODBC3SQLFunctionId::ColumnPrivileges)))(a,b,c,d,e,f,g,h,i)
383 typedef SQLRETURN (SQL_API
*T3SQLColumns
) ( SQLHSTMT StatementHandle
,
384 SQLCHAR
* CatalogName
,
385 SQLSMALLINT NameLength1
,
386 SQLCHAR
* SchemaName
,
387 SQLSMALLINT NameLength2
,
389 SQLSMALLINT NameLength3
,
390 SQLCHAR
* ColumnName
,
391 SQLSMALLINT NameLength4
);
393 #define N3SQLColumns(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLColumns>(getOdbcFunction(ODBC3SQLFunctionId::Columns)))(a,b,c,d,e,f,g,h,i)
395 typedef SQLRETURN (SQL_API
*T3SQLForeignKeys
) ( SQLHSTMT StatementHandle
,
396 SQLCHAR
* PKCatalogName
,
397 SQLSMALLINT NameLength1
,
398 SQLCHAR
* PKSchemaName
,
399 SQLSMALLINT NameLength2
,
400 SQLCHAR
* PKTableName
,
401 SQLSMALLINT NameLength3
,
402 SQLCHAR
* FKCatalogName
,
403 SQLSMALLINT NameLength4
,
404 SQLCHAR
* FKSchemaName
,
405 SQLSMALLINT NameLength5
,
406 SQLCHAR
* FKTableName
,
407 SQLSMALLINT NameLength6
);
409 #define N3SQLForeignKeys(a,b,c,d,e,f,g,h,i,j,k,l,m) (*reinterpret_cast<T3SQLForeignKeys>(getOdbcFunction(ODBC3SQLFunctionId::ForeignKeys)))(a,b,c,d,e,f,g,h,i,j,k,l,m)
411 typedef SQLRETURN (SQL_API
*T3SQLPrimaryKeys
) ( SQLHSTMT StatementHandle
,
412 SQLCHAR
* CatalogName
,
413 SQLSMALLINT NameLength1
,
414 SQLCHAR
* SchemaName
,
415 SQLSMALLINT NameLength2
,
417 SQLSMALLINT NameLength3
);
419 #define N3SQLPrimaryKeys(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLPrimaryKeys>(getOdbcFunction(ODBC3SQLFunctionId::PrimaryKeys)))(a,b,c,d,e,f,g)
421 typedef SQLRETURN (SQL_API
*T3SQLProcedureColumns
) (SQLHSTMT StatementHandle
,
422 SQLCHAR
* CatalogName
,
423 SQLSMALLINT NameLength1
,
424 SQLCHAR
* SchemaName
,
425 SQLSMALLINT NameLength2
,
427 SQLSMALLINT NameLength3
,
428 SQLCHAR
* ColumnName
,
429 SQLSMALLINT NameLength4
);
431 #define N3SQLProcedureColumns(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLProcedureColumns>(getOdbcFunction(ODBC3SQLFunctionId::ProcedureColumns)))(a,b,c,d,e,f,g,h,i)
433 typedef SQLRETURN (SQL_API
*T3SQLProcedures
) ( SQLHSTMT StatementHandle
,
434 SQLCHAR
* CatalogName
,
435 SQLSMALLINT NameLength1
,
436 SQLCHAR
* SchemaName
,
437 SQLSMALLINT NameLength2
,
439 SQLSMALLINT NameLength3
);
441 #define N3SQLProcedures(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLProcedures>(getOdbcFunction(ODBC3SQLFunctionId::Procedures)))(a,b,c,d,e,f,g)
443 typedef SQLRETURN (SQL_API
*T3SQLSpecialColumns
) (SQLHSTMT StatementHandle
,
444 SQLUSMALLINT IdentifierType
,
445 SQLCHAR
* CatalogName
,
446 SQLSMALLINT NameLength1
,
447 SQLCHAR
* SchemaName
,
448 SQLSMALLINT NameLength2
,
450 SQLSMALLINT NameLength3
,
452 SQLUSMALLINT Nullable
);
454 #define N3SQLSpecialColumns(a,b,c,d,e,f,g,h,i,j) (*reinterpret_cast<T3SQLSpecialColumns>(getOdbcFunction(ODBC3SQLFunctionId::SpecialColumns)))(a,b,c,d,e,f,g,h,i,j)
456 typedef SQLRETURN (SQL_API
*T3SQLStatistics
) ( SQLHSTMT StatementHandle
,
457 SQLCHAR
* CatalogName
,
458 SQLSMALLINT NameLength1
,
459 SQLCHAR
* SchemaName
,
460 SQLSMALLINT NameLength2
,
462 SQLSMALLINT NameLength3
,
464 SQLUSMALLINT Reserved
);
466 #define N3SQLStatistics(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLStatistics>(getOdbcFunction(ODBC3SQLFunctionId::Statistics)))(a,b,c,d,e,f,g,h,i)
468 typedef SQLRETURN (SQL_API
*T3SQLTablePrivileges
) (SQLHSTMT StatementHandle
,
469 SQLCHAR
* CatalogName
,
470 SQLSMALLINT NameLength1
,
471 SQLCHAR
* SchemaName
,
472 SQLSMALLINT NameLength2
,
474 SQLSMALLINT NameLength3
);
476 #define N3SQLTablePrivileges(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLTablePrivileges>(getOdbcFunction(ODBC3SQLFunctionId::TablePrivileges)))(a,b,c,d,e,f,g)
478 typedef SQLRETURN (SQL_API
*T3SQLTables
) ( SQLHSTMT StatementHandle
,
479 SQLCHAR
* CatalogName
,
480 SQLSMALLINT NameLength1
,
481 SQLCHAR
* SchemaName
,
482 SQLSMALLINT NameLength2
,
484 SQLSMALLINT NameLength3
,
486 SQLSMALLINT NameLength4
);
488 #define N3SQLTables(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLTables>(getOdbcFunction(ODBC3SQLFunctionId::Tables)))(a,b,c,d,e,f,g,h,i)
490 // Terminating a statement
491 typedef SQLRETURN (SQL_API
*T3SQLFreeStmt
) ( SQLHSTMT StatementHandle
,
492 SQLUSMALLINT Option
);
494 #define N3SQLFreeStmt(a,b) (*reinterpret_cast<T3SQLFreeStmt>(getOdbcFunction(ODBC3SQLFunctionId::FreeStmt)))(a,b)
496 typedef SQLRETURN (SQL_API
*T3SQLCloseCursor
) (SQLHSTMT StatementHandle
);
498 #define N3SQLCloseCursor(a) (*reinterpret_cast<T3SQLCloseCursor>(getOdbcFunction(ODBC3SQLFunctionId::CloseCursor)))(a)
500 typedef SQLRETURN (SQL_API
*T3SQLCancel
) ( SQLHSTMT StatementHandle
);
502 #define N3SQLCancel(a) (*reinterpret_cast<T3SQLCancel>(getOdbcFunction(ODBC3SQLFunctionId::Cancel)))(a)
504 typedef SQLRETURN (SQL_API
*T3SQLEndTran
) ( SQLSMALLINT HandleType
,
506 SQLSMALLINT CompletionType
);
508 #define N3SQLEndTran(a,b,c) (*reinterpret_cast<T3SQLEndTran>(getOdbcFunction(ODBC3SQLFunctionId::EndTran)))(a,b,c)
510 // Terminating a connection
511 typedef SQLRETURN (SQL_API
*T3SQLDisconnect
) (SQLHDBC ConnectionHandle
);
513 #define N3SQLDisconnect(a) (*reinterpret_cast<T3SQLDisconnect>(getOdbcFunction(ODBC3SQLFunctionId::Disconnect)))(a)
515 typedef SQLRETURN (SQL_API
*T3SQLFreeHandle
) (SQLSMALLINT HandleType
,
518 #define N3SQLFreeHandle(a,b) (*reinterpret_cast<T3SQLFreeHandle>(getOdbcFunction(ODBC3SQLFunctionId::FreeHandle)))(a,b)
520 typedef SQLRETURN (SQL_API
*T3SQLGetCursorName
) ( SQLHSTMT StatementHandle
,
521 SQLCHAR
* CursorName
,
522 SQLSMALLINT BufferLength
,
523 SQLSMALLINT
* NameLength2
);
525 #define N3SQLGetCursorName(a,b,c,d) (*reinterpret_cast<T3SQLGetCursorName>(getOdbcFunction(ODBC3SQLFunctionId::GetCursorName)))(a,b,c,d)
527 typedef SQLRETURN (SQL_API
*T3SQLNativeSql
) ( SQLHSTMT ConnectionHandle
,
528 SQLCHAR
* InStatementText
,
529 SQLINTEGER TextLength1
,
530 SQLCHAR
* OutStatementText
,
531 SQLINTEGER BufferLength
,
532 SQLINTEGER
* TextLength2Ptr
);
534 #define N3SQLNativeSql(a,b,c,d,e,f) (*reinterpret_cast<T3SQLNativeSql>(getOdbcFunction(ODBC3SQLFunctionId::NativeSql)))(a,b,c,d,e,f)
536 // extern declaration of the function pointer
537 extern T3SQLAllocHandle pODBC3SQLAllocHandle
;
538 extern T3SQLConnect pODBC3SQLConnect
;
539 extern T3SQLDriverConnect pODBC3SQLDriverConnect
;
540 extern T3SQLBrowseConnect pODBC3SQLBrowseConnect
;
541 extern T3SQLDataSources pODBC3SQLDataSources
;
542 extern T3SQLDrivers pODBC3SQLDrivers
;
543 extern T3SQLGetInfo pODBC3SQLGetInfo
;
544 extern T3SQLGetFunctions pODBC3SQLGetFunctions
;
545 extern T3SQLGetTypeInfo pODBC3SQLGetTypeInfo
;
546 extern T3SQLSetConnectAttr pODBC3SQLSetConnectAttr
;
547 extern T3SQLGetConnectAttr pODBC3SQLGetConnectAttr
;
548 extern T3SQLSetEnvAttr pODBC3SQLSetEnvAttr
;
549 extern T3SQLGetEnvAttr pODBC3SQLGetEnvAttr
;
550 extern T3SQLSetStmtAttr pODBC3SQLSetStmtAttr
;
551 extern T3SQLGetStmtAttr pODBC3SQLGetStmtAttr
;
552 //extern T3SQLSetDescField pODBC3SQLSetDescField;
553 //extern T3SQLGetDescField pODBC3SQLGetDescField;
554 //extern T3SQLGetDescRec pODBC3SQLGetDescRec;
555 //extern T3SQLSetDescRec pODBC3SQLSetDescRec;
556 extern T3SQLPrepare pODBC3SQLPrepare
;
557 extern T3SQLBindParameter pODBC3SQLBindParameter
;
558 //extern T3SQLGetCursorName pODBC3SQLGetCursorName;
559 extern T3SQLSetCursorName pODBC3SQLSetCursorName
;
560 extern T3SQLExecute pODBC3SQLExecute
;
561 extern T3SQLExecDirect pODBC3SQLExecDirect
;
562 //extern T3SQLNativeSql pODBC3SQLNativeSql;
563 extern T3SQLDescribeParam pODBC3SQLDescribeParam
;
564 extern T3SQLNumParams pODBC3SQLNumParams
;
565 extern T3SQLParamData pODBC3SQLParamData
;
566 extern T3SQLPutData pODBC3SQLPutData
;
567 extern T3SQLRowCount pODBC3SQLRowCount
;
568 extern T3SQLNumResultCols pODBC3SQLNumResultCols
;
569 extern T3SQLDescribeCol pODBC3SQLDescribeCol
;
570 extern T3SQLColAttribute pODBC3SQLColAttribute
;
571 extern T3SQLBindCol pODBC3SQLBindCol
;
572 extern T3SQLFetch pODBC3SQLFetch
;
573 extern T3SQLFetchScroll pODBC3SQLFetchScroll
;
574 extern T3SQLGetData pODBC3SQLGetData
;
575 extern T3SQLSetPos pODBC3SQLSetPos
;
576 extern T3SQLBulkOperations pODBC3SQLBulkOperations
;
577 extern T3SQLMoreResults pODBC3SQLMoreResults
;
578 //extern T3SQLGetDiagField pODBC3SQLGetDiagField;
579 extern T3SQLGetDiagRec pODBC3SQLGetDiagRec
;
580 extern T3SQLColumnPrivileges pODBC3SQLColumnPrivileges
;
581 extern T3SQLColumns pODBC3SQLColumns
;
582 extern T3SQLForeignKeys pODBC3SQLForeignKeys
;
583 extern T3SQLPrimaryKeys pODBC3SQLPrimaryKeys
;
584 extern T3SQLProcedureColumns pODBC3SQLProcedureColumns
;
585 extern T3SQLProcedures pODBC3SQLProcedures
;
586 extern T3SQLSpecialColumns pODBC3SQLSpecialColumns
;
587 extern T3SQLStatistics pODBC3SQLStatistics
;
588 extern T3SQLTablePrivileges pODBC3SQLTablePrivileges
;
589 extern T3SQLTables pODBC3SQLTables
;
590 extern T3SQLFreeStmt pODBC3SQLFreeStmt
;
591 extern T3SQLCloseCursor pODBC3SQLCloseCursor
;
592 extern T3SQLCancel pODBC3SQLCancel
;
593 extern T3SQLEndTran pODBC3SQLEndTran
;
594 extern T3SQLDisconnect pODBC3SQLDisconnect
;
595 extern T3SQLFreeHandle pODBC3SQLFreeHandle
;
596 extern T3SQLGetCursorName pODBC3SQLGetCursorName
;
597 extern T3SQLNativeSql pODBC3SQLNativeSql
;
600 #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONS_HXX
603 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */