xref: /aoo4110/main/unixODBC/inc/sql.h (revision b1cdbd2c)
1 /*
2  *  sql.h
3  *
4  *  $Id: sql.h,v 1.11 2009/09/09 20:06:24 source Exp $
5  *
6  *  ODBC defines
7  *
8  *  The iODBC driver manager.
9  *
10  *  Copyright (C) 1995 by Ke Jin <kejin@empress.com>
11  *  Copyright (C) 1996-2009 by OpenLink Software <iodbc@openlinksw.com>
12  *  All Rights Reserved.
13  *
14  *  This software is released under the terms of either of the following
15  *  licenses:
16  *
17  *      - GNU Library General Public License (see LICENSE.LGPL)
18  *      - The BSD License (see LICENSE.BSD).
19  *
20  *  Note that the only valid version of the LGPL license as far as this
21  *  project is concerned is the original GNU Library General Public License
22  *  Version 2, dated June 1991.
23  *
24  *  While not mandated by the BSD license, any patches you make to the
25  *  iODBC source code may be contributed back into the iODBC project
26  *  at your discretion. Contributions will benefit the Open Source and
27  *  Data Access community as a whole. Submissions may be made at:
28  *
29  *      http://www.iodbc.org
30  *
31  *
32  *  GNU Library Generic Public License Version 2
33  *  ============================================
34  *  This library is free software; you can redistribute it and/or
35  *  modify it under the terms of the GNU Library General Public
36  *  License as published by the Free Software Foundation; only
37  *  Version 2 of the License dated June 1991.
38  *
39  *  This library is distributed in the hope that it will be useful,
40  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
41  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42  *  Library General Public License for more details.
43  *
44  *  You should have received a copy of the GNU Library General Public
45  *  License along with this library; if not, write to the Free
46  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
47  *
48  *
49  *  The BSD License
50  *  ===============
51  *  Redistribution and use in source and binary forms, with or without
52  *  modification, are permitted provided that the following conditions
53  *  are met:
54  *
55  *  1. Redistributions of source code must retain the above copyright
56  *     notice, this list of conditions and the following disclaimer.
57  *  2. Redistributions in binary form must reproduce the above copyright
58  *     notice, this list of conditions and the following disclaimer in
59  *     the documentation and/or other materials provided with the
60  *     distribution.
61  *  3. Neither the name of OpenLink Software Inc. nor the names of its
62  *     contributors may be used to endorse or promote products derived
63  *     from this software without specific prior written permission.
64  *
65  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
66  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
67  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
68  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR
69  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
70  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
71  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
72  *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
73  *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
74  *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
75  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
76  */
77 
78 #ifndef _SQL_H
79 #define _SQL_H
80 
81 /*
82  *  Set default specification to ODBC 3.51
83  */
84 #ifndef ODBCVER
85 #define ODBCVER		0x0351
86 #endif
87 
88 #ifndef _SQLTYPES_H
89 #include <odbc/sqltypes.h>
90 #endif
91 
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95 
96 /*
97  *  Useful Constants
98  */
99 #define SQL_MAX_MESSAGE_LENGTH			512
100 
101 
102 /*
103  *  Handle types
104  */
105 #if (ODBCVER >= 0x0300)
106 #define SQL_HANDLE_ENV				1
107 #define SQL_HANDLE_DBC				2
108 #define SQL_HANDLE_STMT				3
109 #define SQL_HANDLE_DESC				4
110 #endif	/* ODBCVER >= 0x0300 */
111 
112 
113 /*
114  *  Function return codes
115  */
116 #define SQL_SUCCESS				0
117 #define SQL_SUCCESS_WITH_INFO			1
118 #define SQL_STILL_EXECUTING			2
119 #define SQL_ERROR				(-1)
120 #define SQL_INVALID_HANDLE			(-2)
121 #define SQL_NEED_DATA				99
122 #if (ODBCVER >= 0x0300)
123 #define SQL_NO_DATA				100
124 #endif	/* ODBCVER >= 0x0300 */
125 
126 
127 /*
128  *  Test for SQL_SUCCESS or SQL_SUCCESS_WITH_INFO
129  */
130 #define SQL_SUCCEEDED(rc)			(((rc) & (~1)) == 0)
131 
132 
133 /*
134  *  Special length values
135  */
136 #define SQL_NULL_DATA				(-1)
137 #define SQL_DATA_AT_EXEC			(-2)
138 
139 
140 /*
141  *  Flags for null-terminated strings
142  */
143 #define SQL_NTS					(-3)
144 #define SQL_NTSL				(-3L)
145 
146 
147 /*
148  *  Standard SQL datatypes, using ANSI type numbering
149  */
150 #define SQL_UNKNOWN_TYPE			0
151 #define SQL_CHAR				1
152 #define SQL_NUMERIC				2
153 #define SQL_DECIMAL				3
154 #define SQL_INTEGER				4
155 #define SQL_SMALLINT				5
156 #define SQL_FLOAT				6
157 #define SQL_REAL				7
158 #define SQL_DOUBLE				8
159 #if (ODBCVER >= 0x0300)
160 #define SQL_DATETIME				9
161 #endif	/* ODBCVER >= 0x0300 */
162 #define SQL_VARCHAR				12
163 
164 
165 /*
166  *  SQLGetTypeInfo request for all data types
167  */
168 #define SQL_ALL_TYPES				0
169 
170 
171 /*
172  *  Statement attribute values for date/time data types
173  */
174 #if (ODBCVER >= 0x0300)
175 #define SQL_TYPE_DATE				91
176 #define SQL_TYPE_TIME				92
177 #define SQL_TYPE_TIMESTAMP			93
178 #endif	/* ODBCVER >= 0x0300 */
179 
180 
181 /*
182  *  Date/Time length constants
183  */
184 #if (ODBCVER >= 0x0300)
185 #define SQL_DATE_LEN				10
186 #define SQL_TIME_LEN				8	/* add P+1 if prec >0 */
187 #define SQL_TIMESTAMP_LEN			19	/* add P+1 if prec >0 */
188 #endif	/* ODBCVER >= 0x0300 */
189 
190 
191 /*
192  *  NULL status constants
193  */
194 #define SQL_NO_NULLS				0
195 #define SQL_NULLABLE				1
196 #define SQL_NULLABLE_UNKNOWN			2
197 
198 
199 /*
200  *  NULL Handles
201  */
202 #define SQL_NULL_HENV				0
203 #define SQL_NULL_HDBC				0
204 #define SQL_NULL_HSTMT				0
205 #if (ODBCVER >= 0x0300)
206 #define SQL_NULL_HDESC				0
207 #endif	/* ODBCVER >= 0x0300 */
208 
209 
210 /*
211  *  NULL handle for parent argument to SQLAllocHandle when allocating
212  *  a SQLHENV
213  */
214 #if (ODBCVER >= 0x0300)
215 #define SQL_NULL_HANDLE				0L
216 #endif	/* ODBCVER >= 0x0300 */
217 
218 
219 /*
220  *  CLI option values
221  */
222 #if (ODBCVER >= 0x0300)
223 #define SQL_FALSE				0
224 #define SQL_TRUE				1
225 #endif	/* ODBCVER >= 0x0300 */
226 
227 
228 /*
229  *  Default conversion code for SQLBindCol(), SQLBindParam() and SQLGetData()
230  */
231 #if (ODBCVER >= 0x0300)
232 #define SQL_DEFAULT				99
233 #endif	/* ODBCVER >= 0x0300 */
234 
235 
236 /*
237  *  SQLDataSources/SQLFetchScroll - FetchOrientation
238  */
239 #define SQL_FETCH_NEXT				1
240 #define SQL_FETCH_FIRST				2
241 
242 
243 /*
244  *  SQLFetchScroll - FetchOrientation
245  */
246 #define SQL_FETCH_LAST				3
247 #define SQL_FETCH_PRIOR				4
248 #define SQL_FETCH_ABSOLUTE			5
249 #define SQL_FETCH_RELATIVE			6
250 
251 
252 /*
253  *  SQLFreeStmt
254  */
255 #define SQL_CLOSE				0
256 #define SQL_DROP				1
257 #define SQL_UNBIND				2
258 #define SQL_RESET_PARAMS			3
259 
260 
261 /*
262  *  SQLGetConnectAttr - connection attributes
263  */
264 #if (ODBCVER >= 0x0300)
265 #define SQL_ATTR_AUTO_IPD			10001
266 #define SQL_ATTR_METADATA_ID			10014
267 #endif	/* ODBCVER >= 0x0300 */
268 
269 
270 /*
271  *   SQLGetData() code indicating that the application row descriptor
272  *   specifies the data type
273  */
274 #if (ODBCVER >= 0x0300)
275 #define SQL_ARD_TYPE				(-99)
276 #endif	/* ODBCVER >= 0x0300 */
277 
278 
279 /*
280  *  SQLGetDescField - identifiers of fields in the SQL descriptor
281  */
282 #if (ODBCVER >= 0x0300)
283 #define SQL_DESC_COUNT				1001
284 #define SQL_DESC_TYPE				1002
285 #define SQL_DESC_LENGTH				1003
286 #define SQL_DESC_OCTET_LENGTH_PTR		1004
287 #define SQL_DESC_PRECISION			1005
288 #define SQL_DESC_SCALE				1006
289 #define SQL_DESC_DATETIME_INTERVAL_CODE		1007
290 #define SQL_DESC_NULLABLE			1008
291 #define SQL_DESC_INDICATOR_PTR			1009
292 #define SQL_DESC_DATA_PTR			1010
293 #define SQL_DESC_NAME				1011
294 #define SQL_DESC_UNNAMED			1012
295 #define SQL_DESC_OCTET_LENGTH			1013
296 #define SQL_DESC_ALLOC_TYPE			1099
297 #endif	/* ODBCVER >= 0x0300 */
298 
299 
300 /*
301  *  SQLGetDescField - SQL_DESC_ALLOC_TYPE
302  */
303 #if (ODBCVER >= 0x0300)
304 #define SQL_DESC_ALLOC_AUTO			1
305 #define SQL_DESC_ALLOC_USER			2
306 #endif	/* ODBCVER >= 0x0300 */
307 
308 
309 /*
310  *  SQLGetDescField - SQL_DESC_DATETIME_INTERVAL_CODE
311  */
312 #if (ODBCVER >= 0x0300)
313 #define SQL_CODE_DATE				1
314 #define SQL_CODE_TIME				2
315 #define SQL_CODE_TIMESTAMP			3
316 #endif	/* ODBCVER >= 0x0300 */
317 
318 
319 /*
320  *  SQLGetDescField - SQL_DESC_UNNAMED
321  */
322 #if (ODBCVER >= 0x0300)
323 #define SQL_NAMED				0
324 #define SQL_UNNAMED				1
325 #endif	/* ODBCVER >= 0x0300 */
326 
327 
328 /*
329  *  SQLGetDiagField - identifiers of fields in the diagnostics area
330  */
331 #if (ODBCVER >= 0x0300)
332 #define SQL_DIAG_RETURNCODE			1
333 #define SQL_DIAG_NUMBER				2
334 #define SQL_DIAG_ROW_COUNT			3
335 #define SQL_DIAG_SQLSTATE			4
336 #define SQL_DIAG_NATIVE				5
337 #define SQL_DIAG_MESSAGE_TEXT			6
338 #define SQL_DIAG_DYNAMIC_FUNCTION		7
339 #define SQL_DIAG_CLASS_ORIGIN			8
340 #define SQL_DIAG_SUBCLASS_ORIGIN		9
341 #define SQL_DIAG_CONNECTION_NAME		10
342 #define SQL_DIAG_SERVER_NAME			11
343 #define SQL_DIAG_DYNAMIC_FUNCTION_CODE		12
344 #endif	/* ODBCVER >= 0x0300 */
345 
346 
347 /*
348  *  SQLGetDiagField - SQL_DIAG_DYNAMIC_FUNCTION_CODE
349  */
350 #if (ODBCVER >= 0x0300)
351 #define SQL_DIAG_ALTER_DOMAIN			3
352 #define SQL_DIAG_ALTER_TABLE			4
353 #define SQL_DIAG_CALL				7
354 #define SQL_DIAG_CREATE_ASSERTION		6
355 #define SQL_DIAG_CREATE_CHARACTER_SET		8
356 #define SQL_DIAG_CREATE_COLLATION		10
357 #define SQL_DIAG_CREATE_DOMAIN			23
358 #define SQL_DIAG_CREATE_INDEX			(-1)
359 #define SQL_DIAG_CREATE_SCHEMA			64
360 #define SQL_DIAG_CREATE_TABLE			77
361 #define SQL_DIAG_CREATE_TRANSLATION		79
362 #define SQL_DIAG_CREATE_VIEW			84
363 #define SQL_DIAG_DELETE_WHERE			19
364 #define	SQL_DIAG_DROP_ASSERTION			24
365 #define	SQL_DIAG_DROP_CHARACTER_SET		25
366 #define	SQL_DIAG_DROP_COLLATION			26
367 #define	SQL_DIAG_DROP_DOMAIN			27
368 #define SQL_DIAG_DROP_INDEX			(-2)
369 #define SQL_DIAG_DROP_SCHEMA			31
370 #define SQL_DIAG_DROP_TABLE			32
371 #define SQL_DIAG_DROP_TRANSLATION		33
372 #define SQL_DIAG_DROP_VIEW			36
373 #define SQL_DIAG_DYNAMIC_DELETE_CURSOR		38
374 #define SQL_DIAG_DYNAMIC_UPDATE_CURSOR		81
375 #define SQL_DIAG_GRANT				48
376 #define SQL_DIAG_INSERT				50
377 #define SQL_DIAG_REVOKE				59
378 #define SQL_DIAG_SELECT_CURSOR			85
379 #define SQL_DIAG_UNKNOWN_STATEMENT		0
380 #define SQL_DIAG_UPDATE_WHERE			82
381 #endif	/* ODBCVER >= 0x0300 */
382 
383 
384 /*
385  *  SQLGetEnvAttr - environment attribute
386  */
387 #if (ODBCVER >= 0x0300)
388 #define SQL_ATTR_OUTPUT_NTS			10001
389 #endif	/* ODBCVER >= 0x0300 */
390 
391 
392 /*
393  *  SQLGetFunctions
394  */
395 #define SQL_API_SQLALLOCCONNECT			1
396 #define SQL_API_SQLALLOCENV			2
397 #if (ODBCVER >= 0x0300)
398 #define SQL_API_SQLALLOCHANDLE			1001
399 #endif	/* ODBCVER >= 0x0300 */
400 #define SQL_API_SQLALLOCSTMT			3
401 #define SQL_API_SQLBINDCOL			4
402 #if (ODBCVER >= 0x0300)
403 #define SQL_API_SQLBINDPARAM			1002
404 #endif	/* ODBCVER >= 0x0300 */
405 #define SQL_API_SQLCANCEL			5
406 #if (ODBCVER >= 0x0300)
407 #define SQL_API_SQLCLOSECURSOR			1003
408 #define SQL_API_SQLCOLATTRIBUTE			6
409 #endif	/* ODBCVER >= 0x0300 */
410 #define SQL_API_SQLCOLUMNS			40
411 #define SQL_API_SQLCONNECT			7
412 #if (ODBCVER >= 0x0300)
413 #define SQL_API_SQLCOPYDESC			1004
414 #endif	/* ODBCVER >= 0x0300 */
415 #define SQL_API_SQLDATASOURCES			57
416 #define SQL_API_SQLDESCRIBECOL			8
417 #define SQL_API_SQLDISCONNECT			9
418 #if (ODBCVER >= 0x0300)
419 #define SQL_API_SQLENDTRAN			1005
420 #endif	/* ODBCVER >= 0x0300 */
421 #define SQL_API_SQLERROR			10
422 #define SQL_API_SQLEXECDIRECT			11
423 #define SQL_API_SQLEXECUTE			12
424 #define SQL_API_SQLFETCH			13
425 #if (ODBCVER >= 0x0300)
426 #define SQL_API_SQLFETCHSCROLL			1021
427 #endif	/* ODBCVER >= 0x0300 */
428 #define SQL_API_SQLFREECONNECT			14
429 #define SQL_API_SQLFREEENV			15
430 #if (ODBCVER >= 0x0300)
431 #define SQL_API_SQLFREEHANDLE			1006
432 #endif	/* ODBCVER >= 0x0300 */
433 #define SQL_API_SQLFREESTMT			16
434 #if (ODBCVER >= 0x0300)
435 #define SQL_API_SQLGETCONNECTATTR		1007
436 #endif	/* ODBCVER >= 0x0300 */
437 #define SQL_API_SQLGETCONNECTOPTION		42
438 #define SQL_API_SQLGETCURSORNAME		17
439 #define SQL_API_SQLGETDATA			43
440 #if (ODBCVER >= 0x0300)
441 #define SQL_API_SQLGETDESCFIELD			1008
442 #define SQL_API_SQLGETDESCREC			1009
443 #define SQL_API_SQLGETDIAGFIELD			1010
444 #define SQL_API_SQLGETDIAGREC			1011
445 #define SQL_API_SQLGETENVATTR			1012
446 #endif	/* ODBCVER >= 0x0300 */
447 #define SQL_API_SQLGETFUNCTIONS			44
448 #define SQL_API_SQLGETINFO			45
449 #if (ODBCVER >= 0x0300)
450 #define SQL_API_SQLGETSTMTATTR			1014
451 #endif	/* ODBCVER >= 0x0300 */
452 #define SQL_API_SQLGETSTMTOPTION		46
453 #define SQL_API_SQLGETTYPEINFO			47
454 #define SQL_API_SQLNUMRESULTCOLS		18
455 #define SQL_API_SQLPARAMDATA			48
456 #define SQL_API_SQLPREPARE			19
457 #define SQL_API_SQLPUTDATA			49
458 #define SQL_API_SQLROWCOUNT			20
459 #if (ODBCVER >= 0x0300)
460 #define SQL_API_SQLSETCONNECTATTR		1016
461 #endif	/* ODBCVER >= 0x0300 */
462 #define SQL_API_SQLSETCONNECTOPTION		50
463 #define SQL_API_SQLSETCURSORNAME		21
464 #if (ODBCVER >= 0x0300)
465 #define SQL_API_SQLSETDESCFIELD			1017
466 #define SQL_API_SQLSETDESCREC			1018
467 #define SQL_API_SQLSETENVATTR			1019
468 #endif	/* ODBCVER >= 0x0300 */
469 #define SQL_API_SQLSETPARAM			22
470 #if (ODBCVER >= 0x0300)
471 #define SQL_API_SQLSETSTMTATTR			1020
472 #endif	/* ODBCVER >= 0x0300 */
473 #define SQL_API_SQLSETSTMTOPTION		51
474 #define SQL_API_SQLSPECIALCOLUMNS		52
475 #define SQL_API_SQLSTATISTICS			53
476 #define SQL_API_SQLTABLES			54
477 #define SQL_API_SQLTRANSACT			23
478 
479 
480 /*
481  *  SQLGetInfo
482  */
483 #if (ODBCVER >= 0x0300)
484 #define SQL_MAX_DRIVER_CONNECTIONS		0
485 #define SQL_MAXIMUM_DRIVER_CONNECTIONS		SQL_MAX_DRIVER_CONNECTIONS
486 #define SQL_MAX_CONCURRENT_ACTIVITIES		1
487 #define SQL_MAXIMUM_CONCURRENT_ACTIVITIES	SQL_MAX_CONCURRENT_ACTIVITIES
488 #endif	/* ODBCVER >= 0x0300 */
489 #define SQL_DATA_SOURCE_NAME			2
490 #define SQL_FETCH_DIRECTION			8
491 #define SQL_SERVER_NAME				13
492 #define SQL_SEARCH_PATTERN_ESCAPE		14
493 #define SQL_DBMS_NAME				17
494 #define SQL_DBMS_VER				18
495 #define SQL_ACCESSIBLE_TABLES			19
496 #define SQL_ACCESSIBLE_PROCEDURES		20
497 #define SQL_CURSOR_COMMIT_BEHAVIOR		23
498 #define SQL_DATA_SOURCE_READ_ONLY		25
499 #define SQL_DEFAULT_TXN_ISOLATION		26
500 #define SQL_IDENTIFIER_CASE			28
501 #define SQL_IDENTIFIER_QUOTE_CHAR		29
502 #define SQL_MAX_COLUMN_NAME_LEN			30
503 #define SQL_MAXIMUM_COLUMN_NAME_LENGTH		SQL_MAX_COLUMN_NAME_LEN
504 #define SQL_MAX_CURSOR_NAME_LEN			31
505 #define SQL_MAXIMUM_CURSOR_NAME_LENGTH		SQL_MAX_CURSOR_NAME_LEN
506 #define SQL_MAX_SCHEMA_NAME_LEN			32
507 #define SQL_MAXIMUM_SCHEMA_NAME_LENGTH		SQL_MAX_SCHEMA_NAME_LEN
508 #define SQL_MAX_CATALOG_NAME_LEN		34
509 #define SQL_MAXIMUM_CATALOG_NAME_LENGTH		SQL_MAX_CATALOG_NAME_LEN
510 #define SQL_MAX_TABLE_NAME_LEN			35
511 #define SQL_SCROLL_CONCURRENCY			43
512 #define SQL_TXN_CAPABLE				46
513 #define SQL_TRANSACTION_CAPABLE			SQL_TXN_CAPABLE
514 #define SQL_USER_NAME				47
515 #define SQL_TXN_ISOLATION_OPTION		72
516 #define SQL_TRANSACTION_ISOLATION_OPTION	SQL_TXN_ISOLATION_OPTION
517 #define SQL_INTEGRITY				73
518 #define SQL_GETDATA_EXTENSIONS			81
519 #define SQL_NULL_COLLATION			85
520 #define SQL_ALTER_TABLE				86
521 #define SQL_ORDER_BY_COLUMNS_IN_SELECT		90
522 #define SQL_SPECIAL_CHARACTERS			94
523 #define SQL_MAX_COLUMNS_IN_GROUP_BY		97
524 #define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY		SQL_MAX_COLUMNS_IN_GROUP_BY
525 #define SQL_MAX_COLUMNS_IN_INDEX		98
526 #define SQL_MAXIMUM_COLUMNS_IN_INDEX		SQL_MAX_COLUMNS_IN_INDEX
527 #define SQL_MAX_COLUMNS_IN_ORDER_BY		99
528 #define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY		SQL_MAX_COLUMNS_IN_ORDER_BY
529 #define SQL_MAX_COLUMNS_IN_SELECT		100
530 #define SQL_MAXIMUM_COLUMNS_IN_SELECT		SQL_MAX_COLUMNS_IN_SELECT
531 #define SQL_MAX_COLUMNS_IN_TABLE		101
532 #define SQL_MAX_INDEX_SIZE			102
533 #define SQL_MAXIMUM_INDEX_SIZE			SQL_MAX_INDEX_SIZE
534 #define SQL_MAX_ROW_SIZE			104
535 #define SQL_MAXIMUM_ROW_SIZE			SQL_MAX_ROW_SIZE
536 #define SQL_MAX_STATEMENT_LEN			105
537 #define SQL_MAXIMUM_STATEMENT_LENGTH		SQL_MAX_STATEMENT_LEN
538 #define SQL_MAX_TABLES_IN_SELECT		106
539 #define SQL_MAXIMUM_TABLES_IN_SELECT		SQL_MAX_TABLES_IN_SELECT
540 #define SQL_MAX_USER_NAME_LEN			107
541 #define SQL_MAXIMUM_USER_NAME_LENGTH		SQL_MAX_USER_NAME_LEN
542 #if (ODBCVER >= 0x0300)
543 #define SQL_OJ_CAPABILITIES			115
544 #define SQL_OUTER_JOIN_CAPABILITIES		SQL_OJ_CAPABILITIES
545 #endif	/* ODBCVER >= 0x0300 */
546 
547 #if (ODBCVER >= 0x0300)
548 #define SQL_XOPEN_CLI_YEAR			10000
549 #define SQL_CURSOR_SENSITIVITY			10001
550 #define SQL_DESCRIBE_PARAMETER			10002
551 #define SQL_CATALOG_NAME			10003
552 #define SQL_COLLATION_SEQ			10004
553 #define SQL_MAX_IDENTIFIER_LEN			10005
554 #define SQL_MAXIMUM_IDENTIFIER_LENGTH		SQL_MAX_IDENTIFIER_LEN
555 #endif	/* ODBCVER >= 0x0300 */
556 
557 
558 /*
559  *  SQLGetInfo - SQL_ALTER_TABLE
560  */
561 #if (ODBCVER >= 0x0200)
562 #define SQL_AT_ADD_COLUMN			0x00000001L
563 #define SQL_AT_DROP_COLUMN			0x00000002L
564 #endif	/* ODBCVER >= 0x0300 */
565 
566 #if (ODBCVER >= 0x0300)
567 #define SQL_AT_ADD_CONSTRAINT			0x00000008L
568 /*
569  * The following bitmasks are ODBC extensions and defined in sqlext.h:
570  *
571  * #define SQL_AT_COLUMN_SINGLE				0x00000020L
572  * #define SQL_AT_ADD_COLUMN_DEFAULT			0x00000040L
573  * #define SQL_AT_ADD_COLUMN_COLLATION			0x00000080L
574  * #define SQL_AT_SET_COLUMN_DEFAULT			0x00000100L
575  * #define SQL_AT_DROP_COLUMN_DEFAULT			0x00000200L
576  * #define SQL_AT_DROP_COLUMN_CASCADE			0x00000400L
577  * #define SQL_AT_DROP_COLUMN_RESTRICT			0x00000800L
578  * #define SQL_AT_ADD_TABLE_CONSTRAINT			0x00001000L
579  * #define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE		0x00002000L
580  * #define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT	0x00004000L
581  * #define SQL_AT_CONSTRAINT_NAME_DEFINITION		0x00008000L
582  * #define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED		0x00010000L
583  * #define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE	0x00020000L
584  * #define SQL_AT_CONSTRAINT_DEFERRABLE			0x00040000L
585  * #define SQL_AT_CONSTRAINT_NON_DEFERRABLE		0x00080000L
586  */
587 #endif	/* ODBCVER >= 0x0300 */
588 
589 
590 /*
591  *  SQLGetInfo - SQL_ASYNC_MODE
592  */
593 #if (ODBCVER >= 0x0300)
594 #define SQL_AM_NONE				0
595 #define SQL_AM_CONNECTION			1
596 #define SQL_AM_STATEMENT			2
597 #endif	/* ODBCVER >= 0x0300 */
598 
599 
600 /*
601  *  SQLGetInfo - SQL_CURSOR_COMMIT_BEHAVIOR
602  */
603 #define SQL_CB_DELETE				0
604 #define SQL_CB_CLOSE				1
605 #define SQL_CB_PRESERVE				2
606 
607 
608 /*
609  *  SQLGetInfo - SQL_FETCH_DIRECTION
610  */
611 #define SQL_FD_FETCH_NEXT			0x00000001L
612 #define SQL_FD_FETCH_FIRST			0x00000002L
613 #define SQL_FD_FETCH_LAST			0x00000004L
614 #define SQL_FD_FETCH_PRIOR			0x00000008L
615 #define SQL_FD_FETCH_ABSOLUTE			0x00000010L
616 #define SQL_FD_FETCH_RELATIVE			0x00000020L
617 
618 
619 /*
620  *  SQLGetInfo - SQL_GETDATA_EXTENSIONS
621  */
622 #define SQL_GD_ANY_COLUMN			0x00000001L
623 #define SQL_GD_ANY_ORDER			0x00000002L
624 
625 
626 /*
627  *  SQLGetInfo - SQL_IDENTIFIER_CASE
628  */
629 #define SQL_IC_UPPER				1
630 #define SQL_IC_LOWER				2
631 #define SQL_IC_SENSITIVE			3
632 #define SQL_IC_MIXED				4
633 
634 
635 /*
636  *  SQLGetInfo - SQL_NULL_COLLATION
637  */
638 #define SQL_NC_HIGH				0
639 #define SQL_NC_LOW				1
640 
641 
642 /*
643  *  SQLGetInfo - SQL_OJ_CAPABILITIES
644  */
645 #if (ODBCVER >= 0x0201)
646 #define SQL_OJ_LEFT				0x00000001L
647 #define SQL_OJ_RIGHT				0x00000002L
648 #define SQL_OJ_FULL				0x00000004L
649 #define SQL_OJ_NESTED				0x00000008L
650 #define SQL_OJ_NOT_ORDERED			0x00000010L
651 #define SQL_OJ_INNER				0x00000020L
652 #define SQL_OJ_ALL_COMPARISON_OPS		0x00000040L
653 #endif
654 
655 
656 /*
657  *  SQLGetInfo - SQL_SCROLL_CONCURRENCY
658  */
659 #define SQL_SCCO_READ_ONLY			0x00000001L
660 #define SQL_SCCO_LOCK				0x00000002L
661 #define SQL_SCCO_OPT_ROWVER			0x00000004L
662 #define SQL_SCCO_OPT_VALUES			0x00000008L
663 
664 
665 /*
666  *  SQLGetInfo - SQL_TXN_CAPABLE
667  */
668 #define SQL_TC_NONE				0
669 #define SQL_TC_DML				1
670 #define SQL_TC_ALL				2
671 #define SQL_TC_DDL_COMMIT			3
672 #define SQL_TC_DDL_IGNORE			4
673 
674 
675 /*
676  *  SQLGetInfo - SQL_TXN_ISOLATION_OPTION
677  */
678 #define SQL_TXN_READ_UNCOMMITTED		0x00000001L
679 #define SQL_TRANSACTION_READ_UNCOMMITTED	SQL_TXN_READ_UNCOMMITTED
680 #define SQL_TXN_READ_COMMITTED			0x00000002L
681 #define SQL_TRANSACTION_READ_COMMITTED		SQL_TXN_READ_COMMITTED
682 #define SQL_TXN_REPEATABLE_READ			0x00000004L
683 #define SQL_TRANSACTION_REPEATABLE_READ		SQL_TXN_REPEATABLE_READ
684 #define SQL_TXN_SERIALIZABLE			0x00000008L
685 #define SQL_TRANSACTION_SERIALIZABLE		SQL_TXN_SERIALIZABLE
686 
687 
688 /*
689  *  SQLGetStmtAttr - statement attributes
690  */
691 #if (ODBCVER >= 0x0300)
692 #define SQL_ATTR_APP_ROW_DESC			10010
693 #define SQL_ATTR_APP_PARAM_DESC			10011
694 #define SQL_ATTR_IMP_ROW_DESC			10012
695 #define SQL_ATTR_IMP_PARAM_DESC			10013
696 #define SQL_ATTR_CURSOR_SCROLLABLE		(-1)
697 #define SQL_ATTR_CURSOR_SENSITIVITY		(-2)
698 #endif	/* ODBCVER >= 0x0300 */
699 
700 
701 /*
702  *  SQLGetStmtAttr - SQL_ATTR_CURSOR_SCROLLABLE
703  */
704 #if (ODBCVER >= 0x0300)
705 #define SQL_NONSCROLLABLE			0
706 #define SQL_SCROLLABLE				1
707 #endif	/* ODBCVER >= 0x0300 */
708 
709 
710 /*
711  *  SQLGetStmtAttr - SQL_ATTR_CURSOR_SENSITIVITY
712  */
713 #if (ODBCVER >= 0x0300)
714 #define SQL_UNSPECIFIED				0
715 #define SQL_INSENSITIVE				1
716 #define SQL_SENSITIVE				2
717 #endif	/* ODBCVER >= 0x0300 */
718 
719 
720 /*
721  *  SQLGetTypeInfo - SEARCHABLE
722  */
723 #if (ODBCVER >= 0x0300)
724 #define SQL_PRED_NONE				0
725 #define SQL_PRED_CHAR				1
726 #define SQL_PRED_BASIC				2
727 #endif	/* ODBCVER >= 0x0300 */
728 
729 
730 /*
731  *  SQLSpecialColumns - Column scopes
732  */
733 #define SQL_SCOPE_CURROW			0
734 #define SQL_SCOPE_TRANSACTION			1
735 #define SQL_SCOPE_SESSION			2
736 
737 
738 /*
739  *  SQLSpecialColumns - PSEUDO_COLUMN
740  */
741 #define SQL_PC_UNKNOWN				0
742 #if (ODBCVER >= 0x0300)
743 #define SQL_PC_NON_PSEUDO			1
744 #endif	/* ODBCVER >= 0x0300 */
745 #define SQL_PC_PSEUDO				2
746 
747 
748 /*
749  *  SQLSpecialColumns - IdentifierType
750  */
751 #if (ODBCVER >= 0x0300)
752 #define SQL_ROW_IDENTIFIER			1
753 #endif	/* ODBCVER >= 0x0300 */
754 
755 
756 /*
757  *  SQLStatistics - fUnique
758  */
759 #define SQL_INDEX_UNIQUE			0
760 #define SQL_INDEX_ALL				1
761 
762 
763 /*
764  *  SQLStatistics - TYPE
765  */
766 #define SQL_INDEX_CLUSTERED			1
767 #define SQL_INDEX_HASHED			2
768 #define SQL_INDEX_OTHER				3
769 
770 
771 /*
772  *  SQLTransact/SQLEndTran
773  */
774 #define SQL_COMMIT				0
775 #define SQL_ROLLBACK				1
776 
777 
778 /*
779  *  Function Prototypes
780  */
781 SQLRETURN SQL_API SQLAllocConnect (
782     SQLHENV		  EnvironmentHandle,
783     SQLHDBC		* ConnectionHandle);
784 
785 SQLRETURN SQL_API SQLAllocEnv (
786     SQLHENV		* EnvironmentHandle);
787 
788 #if (ODBCVER >= 0x0300)
789 SQLRETURN SQL_API SQLAllocHandle (
790     SQLSMALLINT		  HandleType,
791     SQLHANDLE		  InputHandle,
792     SQLHANDLE		* OutputHandle);
793 #endif	/* ODBCVER >= 0x0300 */
794 
795 SQLRETURN SQL_API SQLAllocStmt (
796     SQLHDBC		  ConnectionHandle,
797     SQLHSTMT		* StatementHandle);
798 
799 SQLRETURN SQL_API SQLBindCol (
800     SQLHSTMT		  StatementHandle,
801     SQLUSMALLINT	  ColumnNumber,
802     SQLSMALLINT		  TargetType,
803     SQLPOINTER		  TargetValue,
804     SQLLEN		  BufferLength,
805     SQLLEN		* StrLen_or_Ind);
806 
807 #if (ODBCVER >= 0x0300)
808 SQLRETURN SQL_API SQLBindParam (
809     SQLHSTMT		  StatementHandle,
810     SQLUSMALLINT	  ParameterNumber,
811     SQLSMALLINT		  ValueType,
812     SQLSMALLINT		  ParameterType,
813     SQLULEN		  LengthPrecision,
814     SQLSMALLINT		  ParameterScale,
815     SQLPOINTER		  ParameterValue,
816     SQLLEN		* StrLen_or_Ind);
817 #endif
818 
819 SQLRETURN SQL_API SQLCancel (
820     SQLHSTMT		  StatementHandle);
821 
822 #if (ODBCVER >= 0x0300)
823 SQLRETURN SQL_API SQLCloseCursor (
824     SQLHSTMT		  StatementHandle);
825 
826 /*
827  *  Using SQLLEN * instead of SQLPOINTER for NumericAttribute,
828  *  makes the prototype the same as SQLColAttributes (deprecated)
829  *  and clearer for 64bit ports
830  */
831 SQLRETURN SQL_API SQLColAttribute (
832     SQLHSTMT		  StatementHandle,
833     SQLUSMALLINT	  ColumnNumber,
834     SQLUSMALLINT	  FieldIdentifier,
835     SQLPOINTER		  CharacterAttribute,
836     SQLSMALLINT		  BufferLength,
837     SQLSMALLINT		* StringLength,
838     SQLLEN		* NumericAttribute);
839 #endif
840 
841 SQLRETURN SQL_API SQLColumns (
842     SQLHSTMT		  StatementHandle,
843     SQLCHAR		* CatalogName,
844     SQLSMALLINT		  NameLength1,
845     SQLCHAR		* SchemaName,
846     SQLSMALLINT		  NameLength2,
847     SQLCHAR		* TableName,
848     SQLSMALLINT		  NameLength3,
849     SQLCHAR		* ColumnName,
850     SQLSMALLINT		  NameLength4);
851 
852 SQLRETURN SQL_API SQLConnect (
853     SQLHDBC		  ConnectionHandle,
854     SQLCHAR		* ServerName,
855     SQLSMALLINT		  NameLength1,
856     SQLCHAR		* UserName,
857     SQLSMALLINT		  NameLength2,
858     SQLCHAR		* Authentication,
859     SQLSMALLINT		  NameLength3);
860 
861 #if (ODBCVER >= 0x0300)
862 SQLRETURN SQL_API SQLCopyDesc (
863     SQLHDESC		  SourceDescHandle,
864     SQLHDESC		  TargetDescHandle);
865 #endif
866 
867 SQLRETURN SQL_API SQLDataSources (
868     SQLHENV		  EnvironmentHandle,
869     SQLUSMALLINT	  Direction,
870     SQLCHAR		* ServerName,
871     SQLSMALLINT		  BufferLength1,
872     SQLSMALLINT		* NameLength1,
873     SQLCHAR		* Description,
874     SQLSMALLINT		  BufferLength2,
875     SQLSMALLINT		* NameLength2);
876 
877 SQLRETURN SQL_API SQLDescribeCol (
878     SQLHSTMT		  StatementHandle,
879     SQLUSMALLINT	  ColumnNumber,
880     SQLCHAR		* ColumnName,
881     SQLSMALLINT		  BufferLength,
882     SQLSMALLINT		* NameLength,
883     SQLSMALLINT		* DataType,
884     SQLULEN		* ColumnSize,
885     SQLSMALLINT		* DecimalDigits,
886     SQLSMALLINT		* Nullable);
887 
888 SQLRETURN SQL_API SQLDisconnect (
889     SQLHDBC		  ConnectionHandle);
890 
891 #if (ODBCVER >= 0x0300)
892 SQLRETURN SQL_API SQLEndTran (
893     SQLSMALLINT		  HandleType,
894     SQLHANDLE		  Handle,
895     SQLSMALLINT		  CompletionType);
896 #endif
897 
898 SQLRETURN SQL_API SQLError (
899     SQLHENV		  EnvironmentHandle,
900     SQLHDBC		  ConnectionHandle,
901     SQLHSTMT		  StatementHandle,
902     SQLCHAR		* Sqlstate,
903     SQLINTEGER		* NativeError,
904     SQLCHAR		* MessageText,
905     SQLSMALLINT		  BufferLength,
906     SQLSMALLINT		* TextLength);
907 
908 SQLRETURN SQL_API SQLExecDirect (
909     SQLHSTMT		  StatementHandle,
910     SQLCHAR		* StatementText,
911     SQLINTEGER		  TextLength);
912 
913 SQLRETURN SQL_API SQLExecute (
914     SQLHSTMT		  StatementHandle);
915 
916 SQLRETURN SQL_API SQLFetch (
917     SQLHSTMT		  StatementHandle);
918 
919 #if (ODBCVER >= 0x0300)
920 SQLRETURN SQL_API SQLFetchScroll (
921     SQLHSTMT		  StatementHandle,
922     SQLSMALLINT		  FetchOrientation,
923     SQLLEN		  FetchOffset);
924 #endif
925 
926 SQLRETURN SQL_API SQLFreeConnect (
927     SQLHDBC		  ConnectionHandle);
928 
929 SQLRETURN SQL_API SQLFreeEnv (
930     SQLHENV		  EnvironmentHandle);
931 
932 #if (ODBCVER >= 0x0300)
933 SQLRETURN SQL_API SQLFreeHandle (
934     SQLSMALLINT		  HandleType,
935     SQLHANDLE		  Handle);
936 #endif
937 
938 SQLRETURN SQL_API SQLFreeStmt (
939     SQLHSTMT		  StatementHandle,
940     SQLUSMALLINT	  Option);
941 
942 #if (ODBCVER >= 0x0300)
943 SQLRETURN SQL_API SQLGetConnectAttr (
944     SQLHDBC		  ConnectionHandle,
945     SQLINTEGER		  Attribute,
946     SQLPOINTER		  Value,
947     SQLINTEGER		  BufferLength,
948     SQLINTEGER		* StringLength);
949 #endif
950 
951 SQLRETURN SQL_API SQLGetConnectOption (
952     SQLHDBC		  ConnectionHandle,
953     SQLUSMALLINT	  Option,
954     SQLPOINTER		  Value);
955 
956 SQLRETURN SQL_API SQLGetCursorName (
957     SQLHSTMT		  StatementHandle,
958     SQLCHAR		* CursorName,
959     SQLSMALLINT		  BufferLength,
960     SQLSMALLINT		* NameLength);
961 
962 SQLRETURN SQL_API SQLGetData (
963     SQLHSTMT		  StatementHandle,
964     SQLUSMALLINT	  ColumnNumber,
965     SQLSMALLINT		  TargetType,
966     SQLPOINTER		  TargetValue,
967     SQLLEN		  BufferLength,
968     SQLLEN		* StrLen_or_Ind);
969 
970 #if (ODBCVER >= 0x0300)
971 SQLRETURN SQL_API SQLGetDescField (
972     SQLHDESC		  DescriptorHandle,
973     SQLSMALLINT		  RecNumber,
974     SQLSMALLINT		  FieldIdentifier,
975     SQLPOINTER		  Value,
976     SQLINTEGER		  BufferLength,
977     SQLINTEGER		* StringLength);
978 
979 SQLRETURN SQL_API SQLGetDescRec (
980     SQLHDESC		  DescriptorHandle,
981     SQLSMALLINT		  RecNumber,
982     SQLCHAR		* Name,
983     SQLSMALLINT		  BufferLength,
984     SQLSMALLINT		* StringLength,
985     SQLSMALLINT		* Type,
986     SQLSMALLINT		* SubType,
987     SQLLEN		* Length,
988     SQLSMALLINT		* Precision,
989     SQLSMALLINT		* Scale,
990     SQLSMALLINT		* Nullable);
991 
992 SQLRETURN SQL_API SQLGetDiagField (
993     SQLSMALLINT		  HandleType,
994     SQLHANDLE		  Handle,
995     SQLSMALLINT		  RecNumber,
996     SQLSMALLINT		  DiagIdentifier,
997     SQLPOINTER		  DiagInfo,
998     SQLSMALLINT		  BufferLength,
999     SQLSMALLINT		* StringLength);
1000 
1001 SQLRETURN SQL_API SQLGetDiagRec (
1002     SQLSMALLINT		  HandleType,
1003     SQLHANDLE		  Handle,
1004     SQLSMALLINT		  RecNumber,
1005     SQLCHAR		* Sqlstate,
1006     SQLINTEGER		* NativeError,
1007     SQLCHAR		* MessageText,
1008     SQLSMALLINT		  BufferLength,
1009     SQLSMALLINT		* TextLength);
1010 
1011 SQLRETURN SQL_API SQLGetEnvAttr (
1012     SQLHENV		  EnvironmentHandle,
1013     SQLINTEGER		  Attribute,
1014     SQLPOINTER		  Value,
1015     SQLINTEGER		  BufferLength,
1016     SQLINTEGER		* StringLength);
1017 #endif /* ODBCVER >= 0x0300 */
1018 
1019 SQLRETURN SQL_API SQLGetFunctions (
1020     SQLHDBC		ConnectionHandle,
1021     SQLUSMALLINT	FunctionId,
1022     SQLUSMALLINT *	Supported);
1023 
1024 SQLRETURN SQL_API SQLGetInfo (
1025     SQLHDBC		  ConnectionHandle,
1026     SQLUSMALLINT	  InfoType,
1027     SQLPOINTER		  InfoValue,
1028     SQLSMALLINT		  BufferLength,
1029     SQLSMALLINT		* StringLength);
1030 
1031 #if (ODBCVER >= 0x0300)
1032 SQLRETURN SQL_API SQLGetStmtAttr (
1033     SQLHSTMT		  StatementHandle,
1034     SQLINTEGER		  Attribute,
1035     SQLPOINTER		  Value,
1036     SQLINTEGER		  BufferLength,
1037     SQLINTEGER		* StringLength);
1038 #endif /* ODBCVER >= 0x0300 */
1039 
1040 SQLRETURN SQL_API SQLGetStmtOption (
1041     SQLHSTMT		  StatementHandle,
1042     SQLUSMALLINT	  Option,
1043     SQLPOINTER		  Value);
1044 
1045 SQLRETURN SQL_API SQLGetTypeInfo (
1046     SQLHSTMT		  StatementHandle,
1047     SQLSMALLINT		  DataType);
1048 
1049 SQLRETURN SQL_API SQLNumResultCols (
1050     SQLHSTMT		  StatementHandle,
1051     SQLSMALLINT		* ColumnCount);
1052 
1053 SQLRETURN SQL_API SQLParamData (
1054     SQLHSTMT		  StatementHandle,
1055     SQLPOINTER		* Value);
1056 
1057 SQLRETURN SQL_API SQLPrepare (
1058     SQLHSTMT		  StatementHandle,
1059     SQLCHAR		* StatementText,
1060     SQLINTEGER		  TextLength);
1061 
1062 SQLRETURN SQL_API SQLPutData (
1063     SQLHSTMT		  StatementHandle,
1064     SQLPOINTER		  Data,
1065     SQLLEN		  StrLen_or_Ind);
1066 
1067 SQLRETURN SQL_API SQLRowCount (
1068     SQLHSTMT		  StatementHandle,
1069     SQLLEN		* RowCount);
1070 
1071 #if (ODBCVER >= 0x0300)
1072 SQLRETURN SQL_API SQLSetConnectAttr (
1073     SQLHDBC		  ConnectionHandle,
1074     SQLINTEGER		  Attribute,
1075     SQLPOINTER		  Value,
1076     SQLINTEGER		  StringLength);
1077 #endif /* ODBCVER >= 0x0300 */
1078 
1079 SQLRETURN SQL_API SQLSetConnectOption (
1080     SQLHDBC		  ConnectionHandle,
1081     SQLUSMALLINT	  Option,
1082     SQLULEN		  Value);
1083 
1084 SQLRETURN SQL_API SQLSetCursorName (
1085     SQLHSTMT		  StatementHandle,
1086     SQLCHAR		* CursorName,
1087     SQLSMALLINT		  NameLength);
1088 
1089 #if (ODBCVER >= 0x0300)
1090 SQLRETURN SQL_API SQLSetDescField (
1091     SQLHDESC		  DescriptorHandle,
1092     SQLSMALLINT		  RecNumber,
1093     SQLSMALLINT		  FieldIdentifier,
1094     SQLPOINTER		  Value,
1095     SQLINTEGER		  BufferLength);
1096 
1097 SQLRETURN SQL_API SQLSetDescRec (
1098     SQLHDESC		  DescriptorHandle,
1099     SQLSMALLINT		  RecNumber,
1100     SQLSMALLINT		  Type,
1101     SQLSMALLINT		  SubType,
1102     SQLLEN		  Length,
1103     SQLSMALLINT		  Precision,
1104     SQLSMALLINT		  Scale,
1105     SQLPOINTER		  Data,
1106     SQLLEN		* StringLength,
1107     SQLLEN		* Indicator);
1108 
1109 SQLRETURN SQL_API SQLSetEnvAttr (
1110     SQLHENV		  EnvironmentHandle,
1111     SQLINTEGER		  Attribute,
1112     SQLPOINTER		  Value,
1113     SQLINTEGER		  StringLength);
1114 #endif /* ODBCVER >= 0x0300 */
1115 
1116 
1117 #if (ODBCVER >= 0x0300)
1118 SQLRETURN SQL_API SQLSetStmtAttr (
1119     SQLHSTMT		  StatementHandle,
1120     SQLINTEGER		  Attribute,
1121     SQLPOINTER		  Value,
1122     SQLINTEGER		  StringLength);
1123 #endif
1124 
1125 SQLRETURN SQL_API SQLSetStmtOption (
1126     SQLHSTMT		  StatementHandle,
1127     SQLUSMALLINT	  Option,
1128     SQLULEN		  Value);
1129 
1130 SQLRETURN SQL_API SQLSpecialColumns (
1131     SQLHSTMT		  StatementHandle,
1132     SQLUSMALLINT	  IdentifierType,
1133     SQLCHAR		* CatalogName,
1134     SQLSMALLINT		  NameLength1,
1135     SQLCHAR		* SchemaName,
1136     SQLSMALLINT		  NameLength2,
1137     SQLCHAR		* TableName,
1138     SQLSMALLINT		  NameLength3,
1139     SQLUSMALLINT	  Scope,
1140     SQLUSMALLINT	  Nullable);
1141 
1142 SQLRETURN SQL_API SQLStatistics (
1143     SQLHSTMT		  StatementHandle,
1144     SQLCHAR		* CatalogName,
1145     SQLSMALLINT		  NameLength1,
1146     SQLCHAR		* SchemaName,
1147     SQLSMALLINT		  NameLength2,
1148     SQLCHAR		* TableName,
1149     SQLSMALLINT		  NameLength3,
1150     SQLUSMALLINT	  Unique,
1151     SQLUSMALLINT	  Reserved);
1152 
1153 SQLRETURN SQL_API SQLTables (
1154     SQLHSTMT		  StatementHandle,
1155     SQLCHAR		* CatalogName,
1156     SQLSMALLINT		  NameLength1,
1157     SQLCHAR		* SchemaName,
1158     SQLSMALLINT		  NameLength2,
1159     SQLCHAR		* TableName,
1160     SQLSMALLINT		  NameLength3,
1161     SQLCHAR		* TableType,
1162     SQLSMALLINT		  NameLength4);
1163 
1164 SQLRETURN SQL_API SQLTransact (
1165     SQLHENV		  EnvironmentHandle,
1166     SQLHDBC		  ConnectionHandle,
1167     SQLUSMALLINT	  CompletionType);
1168 
1169 
1170 /*
1171  *  Depreciated ODBC 1.0 function - Use SQLBindParameter
1172  */
1173 SQLRETURN SQL_API SQLSetParam (
1174     SQLHSTMT		  StatementHandle,
1175     SQLUSMALLINT	  ParameterNumber,
1176     SQLSMALLINT		  ValueType,
1177     SQLSMALLINT		  ParameterType,
1178     SQLULEN		  LengthPrecision,
1179     SQLSMALLINT		  ParameterScale,
1180     SQLPOINTER		  ParameterValue,
1181     SQLLEN		* StrLen_or_Ind);
1182 
1183 #ifdef __cplusplus
1184 }
1185 #endif
1186 
1187 #endif	 /* _SQL_H */
1188