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 													SQLINTEGER			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  *T3SQLNativeSql) (	SQLHDBC				ConnectionHandle,
251 													SQLCHAR *			InStatementText,
252 													SQLINTEGER			TextLength1,
253 													SQLCHAR *			utStatementText,
254 													SQLINTEGER			BufferLength,
255 													SQLINTEGER *		TextLength2Ptr);
256 
257 	#define N3SQLNativeSql(a,b,c,d,e,f) (*(T3SQLNativeSql)getOdbcFunction(ODBC3SQLNativeSql))(a,b,c,d,e,f)*/
258 
259 	typedef SQLRETURN (SQL_API  *T3SQLDescribeParam) (SQLHSTMT			StatementHandle,
260 													SQLUSMALLINT		ParameterNumber,
261 													SQLSMALLINT *		DataTypePtr,
262 													SQLULEN *			ParameterSizePtr,
263 													SQLSMALLINT *		DecimalDigitsPtr,
264 													SQLSMALLINT *		NullablePtr);
265 
266 	#define N3SQLDescribeParam(a,b,c,d,e,f) (*(T3SQLDescribeParam)getOdbcFunction(ODBC3SQLDescribeParam))(a,b,c,d,e,f)
267 
268 	typedef SQLRETURN  (SQL_API  *T3SQLNumParams) (	SQLHSTMT			StatementHandle,
269 													SQLSMALLINT *		ParameterCountPtr);
270 
271 	#define N3SQLNumParams(a,b) (*(T3SQLNumParams)getOdbcFunction(ODBC3SQLNumParams))(a,b)
272 
273 	typedef SQLRETURN  (SQL_API  *T3SQLParamData) (	SQLHSTMT			StatementHandle,
274 													SQLPOINTER *		ValuePtrPtr);
275 
276 	#define N3SQLParamData(a,b) (*(T3SQLParamData)getOdbcFunction(ODBC3SQLParamData))(a,b)
277 
278 	typedef SQLRETURN  (SQL_API  *T3SQLPutData) (		SQLHSTMT			StatementHandle,
279 													SQLPOINTER			DataPtr,
280 													SQLLEN				StrLen_or_Ind);
281 
282 	#define N3SQLPutData(a,b,c) (*(T3SQLPutData)getOdbcFunction(ODBC3SQLPutData))(a,b,c)
283 
284 	// Retrieving results and information about results
285 	typedef SQLRETURN  (SQL_API  *T3SQLRowCount) (	SQLHSTMT			StatementHandle,
286 													SQLLEN *			RowCountPtr);
287 
288 	#define N3SQLRowCount(a,b) (*(T3SQLRowCount)getOdbcFunction(ODBC3SQLRowCount))(a,b)
289 
290 	typedef SQLRETURN  (SQL_API  *T3SQLNumResultCols) (SQLHSTMT			StatementHandle,
291 													SQLSMALLINT *		ColumnCountPtr);
292 
293 	#define N3SQLNumResultCols(a,b) (*(T3SQLNumResultCols)getOdbcFunction(ODBC3SQLNumResultCols))(a,b)
294 
295 	typedef SQLRETURN  (SQL_API  *T3SQLDescribeCol) (	SQLHSTMT			StatementHandle,
296 													SQLUSMALLINT		ColumnNumber,
297 													SQLCHAR *			ColumnName,
298 													SQLSMALLINT			BufferLength,
299 													SQLSMALLINT *		NameLengthPtr,
300 													SQLSMALLINT *		DataTypePtr,
301 													SQLULEN *			ColumnSizePtr,
302 													SQLSMALLINT *		DecimalDigitsPtr,
303 													SQLSMALLINT *		NullablePtr);
304 
305 	#define N3SQLDescribeCol(a,b,c,d,e,f,g,h,i) (*(T3SQLDescribeCol)getOdbcFunction(ODBC3SQLDescribeCol))(a,b,c,d,e,f,g,h,i)
306 
307 	typedef SQLRETURN  (SQL_API  *T3SQLColAttribute) (SQLHSTMT			StatementHandle,
308 													SQLUSMALLINT		ColumnNumber,
309 													SQLUSMALLINT		FieldIdentifier,
310 													SQLPOINTER			CharacterAttributePtr,
311 													SQLSMALLINT			BufferLength,
312 													SQLSMALLINT *		StringLengthPtr,
313 													SQLLEN *			NumericAttributePtr);
314 
315 	#define N3SQLColAttribute(a,b,c,d,e,f,g) (*(T3SQLColAttribute)getOdbcFunction(ODBC3SQLColAttribute))(a,b,c,d,e,f,g)
316 
317 	typedef SQLRETURN  (SQL_API  *T3SQLBindCol) (		SQLHSTMT			StatementHandle,
318 													SQLUSMALLINT		ColumnNumber,
319 													SQLSMALLINT			TargetType,
320 													SQLPOINTER			TargetValuePtr,
321 													SQLLEN				BufferLength,
322 													SQLLEN *			StrLen_or_IndPtr);
323 
324 	#define N3SQLBindCol(a,b,c,d,e,f) (*(T3SQLBindCol)getOdbcFunction(ODBC3SQLBindCol))(a,b,c,d,e,f)
325 
326 	typedef SQLRETURN  (SQL_API  *T3SQLFetch) (		SQLHSTMT			StatementHandle);
327 
328 	#define N3SQLFetch(a) (*(T3SQLFetch)getOdbcFunction(ODBC3SQLFetch))(a)
329 
330 	typedef SQLRETURN  (SQL_API  *T3SQLFetchScroll) (	SQLHSTMT			StatementHandle,
331 													SQLSMALLINT			FetchOrientation,
332 													SQLLEN				FetchOffset);
333 
334 	#define N3SQLFetchScroll(a,b,c) (*(T3SQLFetchScroll)getOdbcFunction(ODBC3SQLFetchScroll))(a,b,c)
335 
336 	typedef SQLRETURN  (SQL_API  *T3SQLGetData) (		SQLHSTMT			StatementHandle,
337 													SQLUSMALLINT		ColumnNumber,
338 													SQLSMALLINT			TargetType,
339 													SQLPOINTER			TargetValuePtr,
340 													SQLLEN				BufferLength,
341 													SQLLEN *			StrLen_or_IndPtr);
342 
343 	#define N3SQLGetData(a,b,c,d,e,f) (*(T3SQLGetData)getOdbcFunction(ODBC3SQLGetData))(a,b,c,d,e,f)
344 
345 	typedef SQLRETURN  (SQL_API  *T3SQLSetPos) (		SQLHSTMT			StatementHandle,
346 													SQLSETPOSIROW		RowNumber,
347 													SQLUSMALLINT		Operation,
348 													SQLUSMALLINT		LockType);
349 
350 	#define N3SQLSetPos(a,b,c,d) (*(T3SQLSetPos)getOdbcFunction(ODBC3SQLSetPos))(a,b,c,d)
351 
352 	typedef SQLRETURN  (SQL_API  *T3SQLBulkOperations) (	SQLHSTMT		StatementHandle,
353 														SQLSMALLINT	Operation);
354 
355 	#define N3SQLBulkOperations(a,b) (*(T3SQLBulkOperations)getOdbcFunction(ODBC3SQLBulkOperations))(a,b)
356 
357 	typedef SQLRETURN  (SQL_API  *T3SQLMoreResults) (	SQLHSTMT			StatementHandle);
358 
359 	#define N3SQLMoreResults(a) (*(T3SQLMoreResults)getOdbcFunction(ODBC3SQLMoreResults))(a)
360 
361 	/*typedef SQLRETURN  (SQL_API  *T3SQLGetDiagField) (SQLSMALLINT			HandleType,
362 													SQLHANDLE			Handle,
363 													SQLSMALLINT			RecNumber,
364 													SQLSMALLINT			DiagIdentifier,
365 													SQLPOINTER			DiagInfoPtr,
366 													SQLSMALLINT			BufferLength,
367 													SQLSMALLINT *		StringLengthPtr);
368 
369 	#define N3SQLGetDiagField(a,b,c,d,e,f,g) (*(T3SQLGetDiagField)getOdbcFunction(ODBC3SQLGetDiagField))(a,b,c,d,e,f,g)*/
370 
371 	typedef SQLRETURN  (SQL_API  *T3SQLGetDiagRec) (	SQLSMALLINT			HandleType,
372 													SQLHANDLE			Handle,
373 													SQLSMALLINT			RecNumber,
374 													SQLCHAR *			Sqlstate,
375 													SQLINTEGER *		NativeErrorPtr,
376 													SQLCHAR *			MessageText,
377 													SQLSMALLINT			BufferLength,
378 													SQLSMALLINT *		TextLengthPtr);
379 
380 
381 	#define N3SQLGetDiagRec(a,b,c,d,e,f,g,h) (*(T3SQLGetDiagRec)getOdbcFunction(ODBC3SQLGetDiagRec))(a,b,c,d,e,f,g,h)
382 
383     // Obtaining information about the data source's system tables (catalog functions)
384 	typedef SQLRETURN  (SQL_API  *T3SQLColumnPrivileges) (SQLHSTMT		StatementHandle,
385 													SQLCHAR *			CatalogName,
386 													SQLSMALLINT			NameLength1,
387 													SQLCHAR *			SchemaName,
388 													SQLSMALLINT			NameLength2,
389 													SQLCHAR *			TableName,
390 													SQLSMALLINT			NameLength3,
391 													SQLCHAR *			ColumnName,
392 													SQLSMALLINT			NameLength4);
393 
394 	#define N3SQLColumnPrivileges(a,b,c,d,e,f,g,h,i) (*(T3SQLColumnPrivileges)getOdbcFunction(ODBC3SQLColumnPrivileges))(a,b,c,d,e,f,g,h,i)
395 
396 	typedef SQLRETURN  (SQL_API  *T3SQLColumns) (		SQLHSTMT			StatementHandle,
397 													SQLCHAR *			CatalogName,
398 													SQLSMALLINT			NameLength1,
399 													SQLCHAR *			SchemaName,
400 													SQLSMALLINT			NameLength2,
401 													SQLCHAR *			TableName,
402 													SQLSMALLINT			NameLength3,
403 													SQLCHAR *			ColumnName,
404 													SQLSMALLINT			NameLength4);
405 
406 	#define N3SQLColumns(a,b,c,d,e,f,g,h,i) (*(T3SQLColumns)getOdbcFunction(ODBC3SQLColumns))(a,b,c,d,e,f,g,h,i)
407 
408 	typedef SQLRETURN  (SQL_API  *T3SQLForeignKeys) (	SQLHSTMT			StatementHandle,
409 													SQLCHAR *			PKCatalogName,
410 													SQLSMALLINT			NameLength1,
411 													SQLCHAR *			PKSchemaName,
412 													SQLSMALLINT			NameLength2,
413 													SQLCHAR *			PKTableName,
414 													SQLSMALLINT			NameLength3,
415 													SQLCHAR *			FKCatalogName,
416 													SQLSMALLINT			NameLength4,
417 													SQLCHAR *			FKSchemaName,
418 													SQLSMALLINT			NameLength5,
419 													SQLCHAR *			FKTableName,
420 													SQLSMALLINT			NameLength6);
421 
422 	#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)
423 
424 	typedef SQLRETURN  (SQL_API  *T3SQLPrimaryKeys) (	SQLHSTMT			StatementHandle,
425 													SQLCHAR *			CatalogName,
426 													SQLSMALLINT			NameLength1,
427 													SQLCHAR *			SchemaName,
428 													SQLSMALLINT			NameLength2,
429 													SQLCHAR *			TableName,
430 													SQLSMALLINT			NameLength3);
431 
432 	#define N3SQLPrimaryKeys(a,b,c,d,e,f,g) (*(T3SQLPrimaryKeys)getOdbcFunction(ODBC3SQLPrimaryKeys))(a,b,c,d,e,f,g)
433 
434 	typedef SQLRETURN  (SQL_API  *T3SQLProcedureColumns) (SQLHSTMT		StatementHandle,
435 													SQLCHAR *			CatalogName,
436 													SQLSMALLINT			NameLength1,
437 													SQLCHAR *			SchemaName,
438 													SQLSMALLINT			NameLength2,
439 													SQLCHAR *			ProcName,
440 													SQLSMALLINT			NameLength3,
441 													SQLCHAR *			ColumnName,
442 													SQLSMALLINT			NameLength4);
443 
444 	#define N3SQLProcedureColumns(a,b,c,d,e,f,g,h,i) (*(T3SQLProcedureColumns)getOdbcFunction(ODBC3SQLProcedureColumns))(a,b,c,d,e,f,g,h,i)
445 
446 	typedef SQLRETURN  (SQL_API  *T3SQLProcedures) (	SQLHSTMT			StatementHandle,
447 													SQLCHAR *			CatalogName,
448 													SQLSMALLINT			NameLength1,
449 													SQLCHAR *			SchemaName,
450 													SQLSMALLINT			NameLength2,
451 													SQLCHAR *			ProcName,
452 													SQLSMALLINT			NameLength3);
453 
454 	#define N3SQLProcedures(a,b,c,d,e,f,g) (*(T3SQLProcedures)getOdbcFunction(ODBC3SQLProcedures))(a,b,c,d,e,f,g)
455 
456 	typedef SQLRETURN  (SQL_API  *T3SQLSpecialColumns) (SQLHSTMT			StatementHandle,
457 													SQLUSMALLINT		IdentifierType,
458 													SQLCHAR *			CatalogName,
459 													SQLSMALLINT			NameLength1,
460 													SQLCHAR *			SchemaName,
461 													SQLSMALLINT			NameLength2,
462 													SQLCHAR *			TableName,
463 													SQLSMALLINT			NameLength3,
464 													SQLUSMALLINT		Scope,
465 													SQLUSMALLINT		Nullable);
466 
467 	#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)
468 
469 	typedef SQLRETURN  (SQL_API  *T3SQLStatistics) (	SQLHSTMT			StatementHandle,
470 													SQLCHAR *			CatalogName,
471 													SQLSMALLINT			NameLength1,
472 													SQLCHAR *			SchemaName,
473 													SQLSMALLINT			NameLength2,
474 													SQLCHAR *			TableName,
475 													SQLSMALLINT			NameLength3,
476 													SQLUSMALLINT		Unique,
477 													SQLUSMALLINT		Reserved);
478 
479 	#define N3SQLStatistics(a,b,c,d,e,f,g,h,i) (*(T3SQLStatistics)getOdbcFunction(ODBC3SQLStatistics))(a,b,c,d,e,f,g,h,i)
480 
481 	typedef SQLRETURN  (SQL_API  *T3SQLTablePrivileges) (SQLHSTMT			StatementHandle,
482 													SQLCHAR *			CatalogName,
483 													SQLSMALLINT			NameLength1,
484 													SQLCHAR *			SchemaName,
485 													SQLSMALLINT			NameLength2,
486 													SQLCHAR *			TableName,
487 													SQLSMALLINT			NameLength3);
488 
489 	#define N3SQLTablePrivileges(a,b,c,d,e,f,g) (*(T3SQLTablePrivileges)getOdbcFunction(ODBC3SQLTablePrivileges))(a,b,c,d,e,f,g)
490 
491 	typedef SQLRETURN  (SQL_API  *T3SQLTables) (	SQLHSTMT				StatementHandle,
492 													SQLCHAR *				CatalogName,
493 													SQLSMALLINT				NameLength1,
494 													SQLCHAR *				SchemaName,
495 													SQLSMALLINT				NameLength2,
496 													SQLCHAR *				TableName,
497 													SQLSMALLINT				NameLength3,
498 													SQLCHAR *				TableType,
499 													SQLSMALLINT				NameLength4);
500 
501 	#define N3SQLTables(a,b,c,d,e,f,g,h,i) (*(T3SQLTables)getOdbcFunction(ODBC3SQLTables))(a,b,c,d,e,f,g,h,i)
502 
503 	// Terminating a statement
504 	typedef SQLRETURN  (SQL_API  *T3SQLFreeStmt) (	SQLHSTMT				StatementHandle,
505 													SQLUSMALLINT			Option);
506 
507 	#define N3SQLFreeStmt(a,b) (*(T3SQLFreeStmt)getOdbcFunction(ODBC3SQLFreeStmt))(a,b)
508 
509 	typedef SQLRETURN  (SQL_API  *T3SQLCloseCursor) (SQLHSTMT			StatementHandle);
510 
511 	#define N3SQLCloseCursor(a) (*(T3SQLCloseCursor)getOdbcFunction(ODBC3SQLCloseCursor))(a)
512 
513 	typedef SQLRETURN  (SQL_API  *T3SQLCancel) (	SQLHSTMT				StatementHandle);
514 
515 	#define N3SQLCancel(a) (*(T3SQLCancel)getOdbcFunction(ODBC3SQLCancel))(a)
516 
517 	typedef SQLRETURN  (SQL_API  *T3SQLEndTran) (	SQLSMALLINT				HandleType,
518 													SQLHANDLE				Handle,
519 													SQLSMALLINT				CompletionType);
520 
521 	#define N3SQLEndTran(a,b,c) (*(T3SQLEndTran)getOdbcFunction(ODBC3SQLEndTran))(a,b,c)
522 
523 	// Terminating a connection
524 	typedef SQLRETURN  (SQL_API  *T3SQLDisconnect) (SQLHDBC	ConnectionHandle);
525 
526 	#define N3SQLDisconnect(a) (*(T3SQLDisconnect)getOdbcFunction(ODBC3SQLDisconnect))(a)
527 
528 	typedef SQLRETURN  (SQL_API  *T3SQLFreeHandle) (SQLSMALLINT				HandleType,
529 													SQLHANDLE				Handle);
530 
531 	#define N3SQLFreeHandle(a,b) (*(T3SQLFreeHandle)getOdbcFunction(ODBC3SQLFreeHandle))(a,b)
532 
533 	typedef SQLRETURN  (SQL_API  *T3SQLGetCursorName) (	SQLHSTMT			StatementHandle,
534 														SQLCHAR *			CursorName,
535 														SQLSMALLINT			BufferLength,
536 														SQLSMALLINT*		NameLength2);
537 
538 	#define N3SQLGetCursorName(a,b,c,d) (*(T3SQLGetCursorName)getOdbcFunction(ODBC3SQLGetCursorName))(a,b,c,d)
539 
540 	typedef SQLRETURN  (SQL_API  *T3SQLNativeSql) (	SQLHSTMT				ConnectionHandle,
541 													SQLCHAR *				InStatementText,
542 													SQLINTEGER				TextLength1,
543 													SQLCHAR *				OutStatementText,
544 													SQLINTEGER				BufferLength,
545 													SQLINTEGER *			TextLength2Ptr);
546 
547 	#define N3SQLNativeSql(a,b,c,d,e,f) (*(T3SQLNativeSql)getOdbcFunction(ODBC3SQLNativeSql))(a,b,c,d,e,f)
548 }
549 
550 #endif // _CONNECTIVITY_ODBC_OFUNCTIONS_HXX_
551 
552 
553