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