xref: /aoo41x/main/unixODBC/inc/sql.h (revision acaca342)
124201887SPedro Giffuni /*
224201887SPedro Giffuni  *  sql.h
3cdf0e10cSrcweir  *
4*acaca342SPedro Giffuni  *  $Id: sql.h,v 1.11 2009/09/09 20:06:24 source Exp $
5cdf0e10cSrcweir  *
624201887SPedro Giffuni  *  ODBC defines
724201887SPedro Giffuni  *
824201887SPedro Giffuni  *  The iODBC driver manager.
924201887SPedro Giffuni  *
1024201887SPedro Giffuni  *  Copyright (C) 1995 by Ke Jin <kejin@empress.com>
11*acaca342SPedro Giffuni  *  Copyright (C) 1996-2009 by OpenLink Software <iodbc@openlinksw.com>
1224201887SPedro Giffuni  *  All Rights Reserved.
1324201887SPedro Giffuni  *
1424201887SPedro Giffuni  *  This software is released under the terms of either of the following
1524201887SPedro Giffuni  *  licenses:
1624201887SPedro Giffuni  *
1724201887SPedro Giffuni  *      - GNU Library General Public License (see LICENSE.LGPL)
1824201887SPedro Giffuni  *      - The BSD License (see LICENSE.BSD).
1924201887SPedro Giffuni  *
2024201887SPedro Giffuni  *  Note that the only valid version of the LGPL license as far as this
2124201887SPedro Giffuni  *  project is concerned is the original GNU Library General Public License
2224201887SPedro Giffuni  *  Version 2, dated June 1991.
2324201887SPedro Giffuni  *
2424201887SPedro Giffuni  *  While not mandated by the BSD license, any patches you make to the
2524201887SPedro Giffuni  *  iODBC source code may be contributed back into the iODBC project
2624201887SPedro Giffuni  *  at your discretion. Contributions will benefit the Open Source and
2724201887SPedro Giffuni  *  Data Access community as a whole. Submissions may be made at:
2824201887SPedro Giffuni  *
2924201887SPedro Giffuni  *      http://www.iodbc.org
3024201887SPedro Giffuni  *
3124201887SPedro Giffuni  *
3224201887SPedro Giffuni  *  GNU Library Generic Public License Version 2
3324201887SPedro Giffuni  *  ============================================
3424201887SPedro Giffuni  *  This library is free software; you can redistribute it and/or
3524201887SPedro Giffuni  *  modify it under the terms of the GNU Library General Public
3624201887SPedro Giffuni  *  License as published by the Free Software Foundation; only
3724201887SPedro Giffuni  *  Version 2 of the License dated June 1991.
3824201887SPedro Giffuni  *
3924201887SPedro Giffuni  *  This library is distributed in the hope that it will be useful,
4024201887SPedro Giffuni  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
4124201887SPedro Giffuni  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4224201887SPedro Giffuni  *  Library General Public License for more details.
4324201887SPedro Giffuni  *
4424201887SPedro Giffuni  *  You should have received a copy of the GNU Library General Public
4524201887SPedro Giffuni  *  License along with this library; if not, write to the Free
4624201887SPedro Giffuni  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
4724201887SPedro Giffuni  *
4824201887SPedro Giffuni  *
4924201887SPedro Giffuni  *  The BSD License
5024201887SPedro Giffuni  *  ===============
5124201887SPedro Giffuni  *  Redistribution and use in source and binary forms, with or without
5224201887SPedro Giffuni  *  modification, are permitted provided that the following conditions
5324201887SPedro Giffuni  *  are met:
5424201887SPedro Giffuni  *
5524201887SPedro Giffuni  *  1. Redistributions of source code must retain the above copyright
5624201887SPedro Giffuni  *     notice, this list of conditions and the following disclaimer.
5724201887SPedro Giffuni  *  2. Redistributions in binary form must reproduce the above copyright
5824201887SPedro Giffuni  *     notice, this list of conditions and the following disclaimer in
5924201887SPedro Giffuni  *     the documentation and/or other materials provided with the
6024201887SPedro Giffuni  *     distribution.
6124201887SPedro Giffuni  *  3. Neither the name of OpenLink Software Inc. nor the names of its
6224201887SPedro Giffuni  *     contributors may be used to endorse or promote products derived
6324201887SPedro Giffuni  *     from this software without specific prior written permission.
6424201887SPedro Giffuni  *
6524201887SPedro Giffuni  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
6624201887SPedro Giffuni  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
6724201887SPedro Giffuni  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6824201887SPedro Giffuni  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR
6924201887SPedro Giffuni  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
7024201887SPedro Giffuni  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
7124201887SPedro Giffuni  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
7224201887SPedro Giffuni  *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
7324201887SPedro Giffuni  *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
7424201887SPedro Giffuni  *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
7524201887SPedro Giffuni  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7624201887SPedro Giffuni  */
77cdf0e10cSrcweir 
7824201887SPedro Giffuni #ifndef _SQL_H
7924201887SPedro Giffuni #define _SQL_H
80cdf0e10cSrcweir 
8124201887SPedro Giffuni /*
8224201887SPedro Giffuni  *  Set default specification to ODBC 3.51
8324201887SPedro Giffuni  */
84cdf0e10cSrcweir #ifndef ODBCVER
8524201887SPedro Giffuni #define ODBCVER		0x0351
86cdf0e10cSrcweir #endif
87cdf0e10cSrcweir 
8824201887SPedro Giffuni #ifndef _SQLTYPES_H
8924201887SPedro Giffuni #include <odbc/sqltypes.h>
90cdf0e10cSrcweir #endif
91cdf0e10cSrcweir 
92cdf0e10cSrcweir #ifdef __cplusplus
93cdf0e10cSrcweir extern "C" {
94cdf0e10cSrcweir #endif
95cdf0e10cSrcweir 
9624201887SPedro Giffuni /*
9724201887SPedro Giffuni  *  Useful Constants
9824201887SPedro Giffuni  */
9924201887SPedro Giffuni #define SQL_MAX_MESSAGE_LENGTH			512
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 
10224201887SPedro Giffuni /*
10324201887SPedro Giffuni  *  Handle types
10424201887SPedro Giffuni  */
105cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
10624201887SPedro Giffuni #define SQL_HANDLE_ENV				1
10724201887SPedro Giffuni #define SQL_HANDLE_DBC				2
10824201887SPedro Giffuni #define SQL_HANDLE_STMT				3
10924201887SPedro Giffuni #define SQL_HANDLE_DESC				4
11024201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
111cdf0e10cSrcweir 
112cdf0e10cSrcweir 
11324201887SPedro Giffuni /*
11424201887SPedro Giffuni  *  Function return codes
11524201887SPedro Giffuni  */
11624201887SPedro Giffuni #define SQL_SUCCESS				0
11724201887SPedro Giffuni #define SQL_SUCCESS_WITH_INFO			1
11824201887SPedro Giffuni #define SQL_STILL_EXECUTING			2
11924201887SPedro Giffuni #define SQL_ERROR				(-1)
12024201887SPedro Giffuni #define SQL_INVALID_HANDLE			(-2)
12124201887SPedro Giffuni #define SQL_NEED_DATA				99
122cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
12324201887SPedro Giffuni #define SQL_NO_DATA				100
12424201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
125cdf0e10cSrcweir 
126cdf0e10cSrcweir 
12724201887SPedro Giffuni /*
12824201887SPedro Giffuni  *  Test for SQL_SUCCESS or SQL_SUCCESS_WITH_INFO
12924201887SPedro Giffuni  */
13024201887SPedro Giffuni #define SQL_SUCCEEDED(rc)			(((rc) & (~1)) == 0)
13124201887SPedro Giffuni 
13224201887SPedro Giffuni 
13324201887SPedro Giffuni /*
13424201887SPedro Giffuni  *  Special length values
13524201887SPedro Giffuni  */
13624201887SPedro Giffuni #define SQL_NULL_DATA				(-1)
13724201887SPedro Giffuni #define SQL_DATA_AT_EXEC			(-2)
13824201887SPedro Giffuni 
13924201887SPedro Giffuni 
14024201887SPedro Giffuni /*
14124201887SPedro Giffuni  *  Flags for null-terminated strings
14224201887SPedro Giffuni  */
14324201887SPedro Giffuni #define SQL_NTS					(-3)
14424201887SPedro Giffuni #define SQL_NTSL				(-3L)
14524201887SPedro Giffuni 
146cdf0e10cSrcweir 
14724201887SPedro Giffuni /*
14824201887SPedro Giffuni  *  Standard SQL datatypes, using ANSI type numbering
14924201887SPedro Giffuni  */
15024201887SPedro Giffuni #define SQL_UNKNOWN_TYPE			0
15124201887SPedro Giffuni #define SQL_CHAR				1
15224201887SPedro Giffuni #define SQL_NUMERIC				2
15324201887SPedro Giffuni #define SQL_DECIMAL				3
15424201887SPedro Giffuni #define SQL_INTEGER				4
15524201887SPedro Giffuni #define SQL_SMALLINT				5
15624201887SPedro Giffuni #define SQL_FLOAT				6
15724201887SPedro Giffuni #define SQL_REAL				7
15824201887SPedro Giffuni #define SQL_DOUBLE				8
159cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
16024201887SPedro Giffuni #define SQL_DATETIME				9
16124201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
16224201887SPedro Giffuni #define SQL_VARCHAR				12
16324201887SPedro Giffuni 
16424201887SPedro Giffuni 
16524201887SPedro Giffuni /*
16624201887SPedro Giffuni  *  SQLGetTypeInfo request for all data types
16724201887SPedro Giffuni  */
16824201887SPedro Giffuni #define SQL_ALL_TYPES				0
169cdf0e10cSrcweir 
17024201887SPedro Giffuni 
17124201887SPedro Giffuni /*
17224201887SPedro Giffuni  *  Statement attribute values for date/time data types
17324201887SPedro Giffuni  */
174cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
17524201887SPedro Giffuni #define SQL_TYPE_DATE				91
17624201887SPedro Giffuni #define SQL_TYPE_TIME				92
17724201887SPedro Giffuni #define SQL_TYPE_TIMESTAMP			93
17824201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
179cdf0e10cSrcweir 
18024201887SPedro Giffuni 
18124201887SPedro Giffuni /*
18224201887SPedro Giffuni  *  Date/Time length constants
18324201887SPedro Giffuni  */
184cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
18524201887SPedro Giffuni #define SQL_DATE_LEN				10
18624201887SPedro Giffuni #define SQL_TIME_LEN				8	/* add P+1 if prec >0 */
18724201887SPedro Giffuni #define SQL_TIMESTAMP_LEN			19	/* add P+1 if prec >0 */
18824201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
189cdf0e10cSrcweir 
190cdf0e10cSrcweir 
19124201887SPedro Giffuni /*
19224201887SPedro Giffuni  *  NULL status constants
19324201887SPedro Giffuni  */
19424201887SPedro Giffuni #define SQL_NO_NULLS				0
19524201887SPedro Giffuni #define SQL_NULLABLE				1
19624201887SPedro Giffuni #define SQL_NULLABLE_UNKNOWN			2
19724201887SPedro Giffuni 
19824201887SPedro Giffuni 
19924201887SPedro Giffuni /*
20024201887SPedro Giffuni  *  NULL Handles
20124201887SPedro Giffuni  */
20224201887SPedro Giffuni #define SQL_NULL_HENV				0
20324201887SPedro Giffuni #define SQL_NULL_HDBC				0
20424201887SPedro Giffuni #define SQL_NULL_HSTMT				0
205cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
20624201887SPedro Giffuni #define SQL_NULL_HDESC				0
20724201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
20824201887SPedro Giffuni 
209cdf0e10cSrcweir 
21024201887SPedro Giffuni /*
21124201887SPedro Giffuni  *  NULL handle for parent argument to SQLAllocHandle when allocating
21224201887SPedro Giffuni  *  a SQLHENV
213cdf0e10cSrcweir  */
214cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
21524201887SPedro Giffuni #define SQL_NULL_HANDLE				0L
21624201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
21724201887SPedro Giffuni 
218cdf0e10cSrcweir 
21924201887SPedro Giffuni /*
22024201887SPedro Giffuni  *  CLI option values
22124201887SPedro Giffuni  */
222cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
22324201887SPedro Giffuni #define SQL_FALSE				0
22424201887SPedro Giffuni #define SQL_TRUE				1
22524201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
22624201887SPedro Giffuni 
227cdf0e10cSrcweir 
22824201887SPedro Giffuni /*
22924201887SPedro Giffuni  *  Default conversion code for SQLBindCol(), SQLBindParam() and SQLGetData()
23024201887SPedro Giffuni  */
231cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
23224201887SPedro Giffuni #define SQL_DEFAULT				99
23324201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
234cdf0e10cSrcweir 
235cdf0e10cSrcweir 
23624201887SPedro Giffuni /*
23724201887SPedro Giffuni  *  SQLDataSources/SQLFetchScroll - FetchOrientation
238cdf0e10cSrcweir  */
23924201887SPedro Giffuni #define SQL_FETCH_NEXT				1
24024201887SPedro Giffuni #define SQL_FETCH_FIRST				2
241cdf0e10cSrcweir 
24224201887SPedro Giffuni 
24324201887SPedro Giffuni /*
24424201887SPedro Giffuni  *  SQLFetchScroll - FetchOrientation
245cdf0e10cSrcweir  */
24624201887SPedro Giffuni #define SQL_FETCH_LAST				3
24724201887SPedro Giffuni #define SQL_FETCH_PRIOR				4
24824201887SPedro Giffuni #define SQL_FETCH_ABSOLUTE			5
24924201887SPedro Giffuni #define SQL_FETCH_RELATIVE			6
25024201887SPedro Giffuni 
251cdf0e10cSrcweir 
25224201887SPedro Giffuni /*
25324201887SPedro Giffuni  *  SQLFreeStmt
25424201887SPedro Giffuni  */
25524201887SPedro Giffuni #define SQL_CLOSE				0
25624201887SPedro Giffuni #define SQL_DROP				1
25724201887SPedro Giffuni #define SQL_UNBIND				2
25824201887SPedro Giffuni #define SQL_RESET_PARAMS			3
25924201887SPedro Giffuni 
26024201887SPedro Giffuni 
26124201887SPedro Giffuni /*
26224201887SPedro Giffuni  *  SQLGetConnectAttr - connection attributes
26324201887SPedro Giffuni  */
264cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
26524201887SPedro Giffuni #define SQL_ATTR_AUTO_IPD			10001
26624201887SPedro Giffuni #define SQL_ATTR_METADATA_ID			10014
26724201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
268cdf0e10cSrcweir 
26924201887SPedro Giffuni 
27024201887SPedro Giffuni /*
27124201887SPedro Giffuni  *   SQLGetData() code indicating that the application row descriptor
27224201887SPedro Giffuni  *   specifies the data type
27324201887SPedro Giffuni  */
274cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
27524201887SPedro Giffuni #define SQL_ARD_TYPE				(-99)
27624201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
277cdf0e10cSrcweir 
278cdf0e10cSrcweir 
27924201887SPedro Giffuni /*
28024201887SPedro Giffuni  *  SQLGetDescField - identifiers of fields in the SQL descriptor
28124201887SPedro Giffuni  */
282cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
28324201887SPedro Giffuni #define SQL_DESC_COUNT				1001
28424201887SPedro Giffuni #define SQL_DESC_TYPE				1002
28524201887SPedro Giffuni #define SQL_DESC_LENGTH				1003
28624201887SPedro Giffuni #define SQL_DESC_OCTET_LENGTH_PTR		1004
28724201887SPedro Giffuni #define SQL_DESC_PRECISION			1005
28824201887SPedro Giffuni #define SQL_DESC_SCALE				1006
28924201887SPedro Giffuni #define SQL_DESC_DATETIME_INTERVAL_CODE		1007
29024201887SPedro Giffuni #define SQL_DESC_NULLABLE			1008
29124201887SPedro Giffuni #define SQL_DESC_INDICATOR_PTR			1009
29224201887SPedro Giffuni #define SQL_DESC_DATA_PTR			1010
29324201887SPedro Giffuni #define SQL_DESC_NAME				1011
29424201887SPedro Giffuni #define SQL_DESC_UNNAMED			1012
29524201887SPedro Giffuni #define SQL_DESC_OCTET_LENGTH			1013
29624201887SPedro Giffuni #define SQL_DESC_ALLOC_TYPE			1099
29724201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
29824201887SPedro Giffuni 
29924201887SPedro Giffuni 
30024201887SPedro Giffuni /*
30124201887SPedro Giffuni  *  SQLGetDescField - SQL_DESC_ALLOC_TYPE
30224201887SPedro Giffuni  */
30324201887SPedro Giffuni #if (ODBCVER >= 0x0300)
30424201887SPedro Giffuni #define SQL_DESC_ALLOC_AUTO			1
30524201887SPedro Giffuni #define SQL_DESC_ALLOC_USER			2
30624201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
307cdf0e10cSrcweir 
308cdf0e10cSrcweir 
30924201887SPedro Giffuni /*
31024201887SPedro Giffuni  *  SQLGetDescField - SQL_DESC_DATETIME_INTERVAL_CODE
31124201887SPedro Giffuni  */
312cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
31324201887SPedro Giffuni #define SQL_CODE_DATE				1
31424201887SPedro Giffuni #define SQL_CODE_TIME				2
31524201887SPedro Giffuni #define SQL_CODE_TIMESTAMP			3
31624201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
317cdf0e10cSrcweir 
31824201887SPedro Giffuni 
31924201887SPedro Giffuni /*
32024201887SPedro Giffuni  *  SQLGetDescField - SQL_DESC_UNNAMED
32124201887SPedro Giffuni  */
322cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
32324201887SPedro Giffuni #define SQL_NAMED				0
32424201887SPedro Giffuni #define SQL_UNNAMED				1
32524201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
326cdf0e10cSrcweir 
327cdf0e10cSrcweir 
32824201887SPedro Giffuni /*
32924201887SPedro Giffuni  *  SQLGetDiagField - identifiers of fields in the diagnostics area
33024201887SPedro Giffuni  */
33124201887SPedro Giffuni #if (ODBCVER >= 0x0300)
33224201887SPedro Giffuni #define SQL_DIAG_RETURNCODE			1
33324201887SPedro Giffuni #define SQL_DIAG_NUMBER				2
33424201887SPedro Giffuni #define SQL_DIAG_ROW_COUNT			3
33524201887SPedro Giffuni #define SQL_DIAG_SQLSTATE			4
33624201887SPedro Giffuni #define SQL_DIAG_NATIVE				5
33724201887SPedro Giffuni #define SQL_DIAG_MESSAGE_TEXT			6
33824201887SPedro Giffuni #define SQL_DIAG_DYNAMIC_FUNCTION		7
33924201887SPedro Giffuni #define SQL_DIAG_CLASS_ORIGIN			8
34024201887SPedro Giffuni #define SQL_DIAG_SUBCLASS_ORIGIN		9
34124201887SPedro Giffuni #define SQL_DIAG_CONNECTION_NAME		10
34224201887SPedro Giffuni #define SQL_DIAG_SERVER_NAME			11
34324201887SPedro Giffuni #define SQL_DIAG_DYNAMIC_FUNCTION_CODE		12
34424201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
34524201887SPedro Giffuni 
34624201887SPedro Giffuni 
34724201887SPedro Giffuni /*
34824201887SPedro Giffuni  *  SQLGetDiagField - SQL_DIAG_DYNAMIC_FUNCTION_CODE
34924201887SPedro Giffuni  */
35024201887SPedro Giffuni #if (ODBCVER >= 0x0300)
35124201887SPedro Giffuni #define SQL_DIAG_ALTER_DOMAIN			3
35224201887SPedro Giffuni #define SQL_DIAG_ALTER_TABLE			4
35324201887SPedro Giffuni #define SQL_DIAG_CALL				7
35424201887SPedro Giffuni #define SQL_DIAG_CREATE_ASSERTION		6
35524201887SPedro Giffuni #define SQL_DIAG_CREATE_CHARACTER_SET		8
35624201887SPedro Giffuni #define SQL_DIAG_CREATE_COLLATION		10
35724201887SPedro Giffuni #define SQL_DIAG_CREATE_DOMAIN			23
35824201887SPedro Giffuni #define SQL_DIAG_CREATE_INDEX			(-1)
35924201887SPedro Giffuni #define SQL_DIAG_CREATE_SCHEMA			64
36024201887SPedro Giffuni #define SQL_DIAG_CREATE_TABLE			77
36124201887SPedro Giffuni #define SQL_DIAG_CREATE_TRANSLATION		79
36224201887SPedro Giffuni #define SQL_DIAG_CREATE_VIEW			84
36324201887SPedro Giffuni #define SQL_DIAG_DELETE_WHERE			19
36424201887SPedro Giffuni #define	SQL_DIAG_DROP_ASSERTION			24
36524201887SPedro Giffuni #define	SQL_DIAG_DROP_CHARACTER_SET		25
36624201887SPedro Giffuni #define	SQL_DIAG_DROP_COLLATION			26
36724201887SPedro Giffuni #define	SQL_DIAG_DROP_DOMAIN			27
36824201887SPedro Giffuni #define SQL_DIAG_DROP_INDEX			(-2)
36924201887SPedro Giffuni #define SQL_DIAG_DROP_SCHEMA			31
37024201887SPedro Giffuni #define SQL_DIAG_DROP_TABLE			32
37124201887SPedro Giffuni #define SQL_DIAG_DROP_TRANSLATION		33
37224201887SPedro Giffuni #define SQL_DIAG_DROP_VIEW			36
37324201887SPedro Giffuni #define SQL_DIAG_DYNAMIC_DELETE_CURSOR		38
37424201887SPedro Giffuni #define SQL_DIAG_DYNAMIC_UPDATE_CURSOR		81
37524201887SPedro Giffuni #define SQL_DIAG_GRANT				48
37624201887SPedro Giffuni #define SQL_DIAG_INSERT				50
37724201887SPedro Giffuni #define SQL_DIAG_REVOKE				59
37824201887SPedro Giffuni #define SQL_DIAG_SELECT_CURSOR			85
37924201887SPedro Giffuni #define SQL_DIAG_UNKNOWN_STATEMENT		0
38024201887SPedro Giffuni #define SQL_DIAG_UPDATE_WHERE			82
38124201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
38224201887SPedro Giffuni 
38324201887SPedro Giffuni 
38424201887SPedro Giffuni /*
38524201887SPedro Giffuni  *  SQLGetEnvAttr - environment attribute
38624201887SPedro Giffuni  */
38724201887SPedro Giffuni #if (ODBCVER >= 0x0300)
38824201887SPedro Giffuni #define SQL_ATTR_OUTPUT_NTS			10001
38924201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
390cdf0e10cSrcweir 
39124201887SPedro Giffuni 
39224201887SPedro Giffuni /*
39324201887SPedro Giffuni  *  SQLGetFunctions
39424201887SPedro Giffuni  */
39524201887SPedro Giffuni #define SQL_API_SQLALLOCCONNECT			1
39624201887SPedro Giffuni #define SQL_API_SQLALLOCENV			2
397cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
39824201887SPedro Giffuni #define SQL_API_SQLALLOCHANDLE			1001
39924201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
40024201887SPedro Giffuni #define SQL_API_SQLALLOCSTMT			3
40124201887SPedro Giffuni #define SQL_API_SQLBINDCOL			4
402cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
40324201887SPedro Giffuni #define SQL_API_SQLBINDPARAM			1002
40424201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
40524201887SPedro Giffuni #define SQL_API_SQLCANCEL			5
406cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
40724201887SPedro Giffuni #define SQL_API_SQLCLOSECURSOR			1003
40824201887SPedro Giffuni #define SQL_API_SQLCOLATTRIBUTE			6
40924201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
41024201887SPedro Giffuni #define SQL_API_SQLCOLUMNS			40
41124201887SPedro Giffuni #define SQL_API_SQLCONNECT			7
412cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
41324201887SPedro Giffuni #define SQL_API_SQLCOPYDESC			1004
41424201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
41524201887SPedro Giffuni #define SQL_API_SQLDATASOURCES			57
41624201887SPedro Giffuni #define SQL_API_SQLDESCRIBECOL			8
41724201887SPedro Giffuni #define SQL_API_SQLDISCONNECT			9
418cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
41924201887SPedro Giffuni #define SQL_API_SQLENDTRAN			1005
42024201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
42124201887SPedro Giffuni #define SQL_API_SQLERROR			10
42224201887SPedro Giffuni #define SQL_API_SQLEXECDIRECT			11
42324201887SPedro Giffuni #define SQL_API_SQLEXECUTE			12
42424201887SPedro Giffuni #define SQL_API_SQLFETCH			13
425cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
42624201887SPedro Giffuni #define SQL_API_SQLFETCHSCROLL			1021
42724201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
42824201887SPedro Giffuni #define SQL_API_SQLFREECONNECT			14
42924201887SPedro Giffuni #define SQL_API_SQLFREEENV			15
430cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
43124201887SPedro Giffuni #define SQL_API_SQLFREEHANDLE			1006
43224201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
43324201887SPedro Giffuni #define SQL_API_SQLFREESTMT			16
434cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
43524201887SPedro Giffuni #define SQL_API_SQLGETCONNECTATTR		1007
43624201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
43724201887SPedro Giffuni #define SQL_API_SQLGETCONNECTOPTION		42
43824201887SPedro Giffuni #define SQL_API_SQLGETCURSORNAME		17
43924201887SPedro Giffuni #define SQL_API_SQLGETDATA			43
440cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
44124201887SPedro Giffuni #define SQL_API_SQLGETDESCFIELD			1008
44224201887SPedro Giffuni #define SQL_API_SQLGETDESCREC			1009
44324201887SPedro Giffuni #define SQL_API_SQLGETDIAGFIELD			1010
44424201887SPedro Giffuni #define SQL_API_SQLGETDIAGREC			1011
44524201887SPedro Giffuni #define SQL_API_SQLGETENVATTR			1012
44624201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
44724201887SPedro Giffuni #define SQL_API_SQLGETFUNCTIONS			44
44824201887SPedro Giffuni #define SQL_API_SQLGETINFO			45
449cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
45024201887SPedro Giffuni #define SQL_API_SQLGETSTMTATTR			1014
45124201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
45224201887SPedro Giffuni #define SQL_API_SQLGETSTMTOPTION		46
45324201887SPedro Giffuni #define SQL_API_SQLGETTYPEINFO			47
45424201887SPedro Giffuni #define SQL_API_SQLNUMRESULTCOLS		18
45524201887SPedro Giffuni #define SQL_API_SQLPARAMDATA			48
45624201887SPedro Giffuni #define SQL_API_SQLPREPARE			19
45724201887SPedro Giffuni #define SQL_API_SQLPUTDATA			49
45824201887SPedro Giffuni #define SQL_API_SQLROWCOUNT			20
459cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
46024201887SPedro Giffuni #define SQL_API_SQLSETCONNECTATTR		1016
46124201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
46224201887SPedro Giffuni #define SQL_API_SQLSETCONNECTOPTION		50
46324201887SPedro Giffuni #define SQL_API_SQLSETCURSORNAME		21
46424201887SPedro Giffuni #if (ODBCVER >= 0x0300)
46524201887SPedro Giffuni #define SQL_API_SQLSETDESCFIELD			1017
46624201887SPedro Giffuni #define SQL_API_SQLSETDESCREC			1018
46724201887SPedro Giffuni #define SQL_API_SQLSETENVATTR			1019
46824201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
46924201887SPedro Giffuni #define SQL_API_SQLSETPARAM			22
47024201887SPedro Giffuni #if (ODBCVER >= 0x0300)
47124201887SPedro Giffuni #define SQL_API_SQLSETSTMTATTR			1020
47224201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
47324201887SPedro Giffuni #define SQL_API_SQLSETSTMTOPTION		51
47424201887SPedro Giffuni #define SQL_API_SQLSPECIALCOLUMNS		52
47524201887SPedro Giffuni #define SQL_API_SQLSTATISTICS			53
47624201887SPedro Giffuni #define SQL_API_SQLTABLES			54
47724201887SPedro Giffuni #define SQL_API_SQLTRANSACT			23
47824201887SPedro Giffuni 
479cdf0e10cSrcweir 
48024201887SPedro Giffuni /*
48124201887SPedro Giffuni  *  SQLGetInfo
48224201887SPedro Giffuni  */
483cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
48424201887SPedro Giffuni #define SQL_MAX_DRIVER_CONNECTIONS		0
485cdf0e10cSrcweir #define SQL_MAXIMUM_DRIVER_CONNECTIONS		SQL_MAX_DRIVER_CONNECTIONS
48624201887SPedro Giffuni #define SQL_MAX_CONCURRENT_ACTIVITIES		1
487cdf0e10cSrcweir #define SQL_MAXIMUM_CONCURRENT_ACTIVITIES	SQL_MAX_CONCURRENT_ACTIVITIES
48824201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
48924201887SPedro Giffuni #define SQL_DATA_SOURCE_NAME			2
49024201887SPedro Giffuni #define SQL_FETCH_DIRECTION			8
49124201887SPedro Giffuni #define SQL_SERVER_NAME				13
49224201887SPedro Giffuni #define SQL_SEARCH_PATTERN_ESCAPE		14
49324201887SPedro Giffuni #define SQL_DBMS_NAME				17
49424201887SPedro Giffuni #define SQL_DBMS_VER				18
49524201887SPedro Giffuni #define SQL_ACCESSIBLE_TABLES			19
49624201887SPedro Giffuni #define SQL_ACCESSIBLE_PROCEDURES		20
49724201887SPedro Giffuni #define SQL_CURSOR_COMMIT_BEHAVIOR		23
49824201887SPedro Giffuni #define SQL_DATA_SOURCE_READ_ONLY		25
49924201887SPedro Giffuni #define SQL_DEFAULT_TXN_ISOLATION		26
50024201887SPedro Giffuni #define SQL_IDENTIFIER_CASE			28
50124201887SPedro Giffuni #define SQL_IDENTIFIER_QUOTE_CHAR		29
50224201887SPedro Giffuni #define SQL_MAX_COLUMN_NAME_LEN			30
503cdf0e10cSrcweir #define SQL_MAXIMUM_COLUMN_NAME_LENGTH		SQL_MAX_COLUMN_NAME_LEN
50424201887SPedro Giffuni #define SQL_MAX_CURSOR_NAME_LEN			31
505cdf0e10cSrcweir #define SQL_MAXIMUM_CURSOR_NAME_LENGTH		SQL_MAX_CURSOR_NAME_LEN
50624201887SPedro Giffuni #define SQL_MAX_SCHEMA_NAME_LEN			32
507cdf0e10cSrcweir #define SQL_MAXIMUM_SCHEMA_NAME_LENGTH		SQL_MAX_SCHEMA_NAME_LEN
50824201887SPedro Giffuni #define SQL_MAX_CATALOG_NAME_LEN		34
509cdf0e10cSrcweir #define SQL_MAXIMUM_CATALOG_NAME_LENGTH		SQL_MAX_CATALOG_NAME_LEN
51024201887SPedro Giffuni #define SQL_MAX_TABLE_NAME_LEN			35
51124201887SPedro Giffuni #define SQL_SCROLL_CONCURRENCY			43
51224201887SPedro Giffuni #define SQL_TXN_CAPABLE				46
51324201887SPedro Giffuni #define SQL_TRANSACTION_CAPABLE			SQL_TXN_CAPABLE
51424201887SPedro Giffuni #define SQL_USER_NAME				47
51524201887SPedro Giffuni #define SQL_TXN_ISOLATION_OPTION		72
516cdf0e10cSrcweir #define SQL_TRANSACTION_ISOLATION_OPTION	SQL_TXN_ISOLATION_OPTION
51724201887SPedro Giffuni #define SQL_INTEGRITY				73
51824201887SPedro Giffuni #define SQL_GETDATA_EXTENSIONS			81
51924201887SPedro Giffuni #define SQL_NULL_COLLATION			85
52024201887SPedro Giffuni #define SQL_ALTER_TABLE				86
52124201887SPedro Giffuni #define SQL_ORDER_BY_COLUMNS_IN_SELECT		90
52224201887SPedro Giffuni #define SQL_SPECIAL_CHARACTERS			94
52324201887SPedro Giffuni #define SQL_MAX_COLUMNS_IN_GROUP_BY		97
524cdf0e10cSrcweir #define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY		SQL_MAX_COLUMNS_IN_GROUP_BY
52524201887SPedro Giffuni #define SQL_MAX_COLUMNS_IN_INDEX		98
526cdf0e10cSrcweir #define SQL_MAXIMUM_COLUMNS_IN_INDEX		SQL_MAX_COLUMNS_IN_INDEX
52724201887SPedro Giffuni #define SQL_MAX_COLUMNS_IN_ORDER_BY		99
528cdf0e10cSrcweir #define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY		SQL_MAX_COLUMNS_IN_ORDER_BY
52924201887SPedro Giffuni #define SQL_MAX_COLUMNS_IN_SELECT		100
53024201887SPedro Giffuni #define SQL_MAXIMUM_COLUMNS_IN_SELECT		SQL_MAX_COLUMNS_IN_SELECT
53124201887SPedro Giffuni #define SQL_MAX_COLUMNS_IN_TABLE		101
53224201887SPedro Giffuni #define SQL_MAX_INDEX_SIZE			102
53324201887SPedro Giffuni #define SQL_MAXIMUM_INDEX_SIZE			SQL_MAX_INDEX_SIZE
53424201887SPedro Giffuni #define SQL_MAX_ROW_SIZE			104
53524201887SPedro Giffuni #define SQL_MAXIMUM_ROW_SIZE			SQL_MAX_ROW_SIZE
53624201887SPedro Giffuni #define SQL_MAX_STATEMENT_LEN			105
53724201887SPedro Giffuni #define SQL_MAXIMUM_STATEMENT_LENGTH		SQL_MAX_STATEMENT_LEN
53824201887SPedro Giffuni #define SQL_MAX_TABLES_IN_SELECT		106
53924201887SPedro Giffuni #define SQL_MAXIMUM_TABLES_IN_SELECT		SQL_MAX_TABLES_IN_SELECT
54024201887SPedro Giffuni #define SQL_MAX_USER_NAME_LEN			107
54124201887SPedro Giffuni #define SQL_MAXIMUM_USER_NAME_LENGTH		SQL_MAX_USER_NAME_LEN
542cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
54324201887SPedro Giffuni #define SQL_OJ_CAPABILITIES			115
54424201887SPedro Giffuni #define SQL_OUTER_JOIN_CAPABILITIES		SQL_OJ_CAPABILITIES
54524201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
546cdf0e10cSrcweir 
54724201887SPedro Giffuni #if (ODBCVER >= 0x0300)
54824201887SPedro Giffuni #define SQL_XOPEN_CLI_YEAR			10000
54924201887SPedro Giffuni #define SQL_CURSOR_SENSITIVITY			10001
55024201887SPedro Giffuni #define SQL_DESCRIBE_PARAMETER			10002
55124201887SPedro Giffuni #define SQL_CATALOG_NAME			10003
55224201887SPedro Giffuni #define SQL_COLLATION_SEQ			10004
55324201887SPedro Giffuni #define SQL_MAX_IDENTIFIER_LEN			10005
55424201887SPedro Giffuni #define SQL_MAXIMUM_IDENTIFIER_LENGTH		SQL_MAX_IDENTIFIER_LEN
55524201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
55624201887SPedro Giffuni 
55724201887SPedro Giffuni 
55824201887SPedro Giffuni /*
55924201887SPedro Giffuni  *  SQLGetInfo - SQL_ALTER_TABLE
56024201887SPedro Giffuni  */
561cdf0e10cSrcweir #if (ODBCVER >= 0x0200)
56224201887SPedro Giffuni #define SQL_AT_ADD_COLUMN			0x00000001L
56324201887SPedro Giffuni #define SQL_AT_DROP_COLUMN			0x00000002L
56424201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
56524201887SPedro Giffuni 
56624201887SPedro Giffuni #if (ODBCVER >= 0x0300)
56724201887SPedro Giffuni #define SQL_AT_ADD_CONSTRAINT			0x00000008L
56824201887SPedro Giffuni /*
56924201887SPedro Giffuni  * The following bitmasks are ODBC extensions and defined in sqlext.h:
57024201887SPedro Giffuni  *
57124201887SPedro Giffuni  * #define SQL_AT_COLUMN_SINGLE				0x00000020L
57224201887SPedro Giffuni  * #define SQL_AT_ADD_COLUMN_DEFAULT			0x00000040L
57324201887SPedro Giffuni  * #define SQL_AT_ADD_COLUMN_COLLATION			0x00000080L
57424201887SPedro Giffuni  * #define SQL_AT_SET_COLUMN_DEFAULT			0x00000100L
57524201887SPedro Giffuni  * #define SQL_AT_DROP_COLUMN_DEFAULT			0x00000200L
57624201887SPedro Giffuni  * #define SQL_AT_DROP_COLUMN_CASCADE			0x00000400L
57724201887SPedro Giffuni  * #define SQL_AT_DROP_COLUMN_RESTRICT			0x00000800L
57824201887SPedro Giffuni  * #define SQL_AT_ADD_TABLE_CONSTRAINT			0x00001000L
57924201887SPedro Giffuni  * #define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE		0x00002000L
58024201887SPedro Giffuni  * #define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT	0x00004000L
58124201887SPedro Giffuni  * #define SQL_AT_CONSTRAINT_NAME_DEFINITION		0x00008000L
58224201887SPedro Giffuni  * #define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED		0x00010000L
58324201887SPedro Giffuni  * #define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE	0x00020000L
58424201887SPedro Giffuni  * #define SQL_AT_CONSTRAINT_DEFERRABLE			0x00040000L
58524201887SPedro Giffuni  * #define SQL_AT_CONSTRAINT_NON_DEFERRABLE		0x00080000L
58624201887SPedro Giffuni  */
58724201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
588cdf0e10cSrcweir 
589cdf0e10cSrcweir 
59024201887SPedro Giffuni /*
59124201887SPedro Giffuni  *  SQLGetInfo - SQL_ASYNC_MODE
59224201887SPedro Giffuni  */
59324201887SPedro Giffuni #if (ODBCVER >= 0x0300)
59424201887SPedro Giffuni #define SQL_AM_NONE				0
59524201887SPedro Giffuni #define SQL_AM_CONNECTION			1
59624201887SPedro Giffuni #define SQL_AM_STATEMENT			2
59724201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
598cdf0e10cSrcweir 
599cdf0e10cSrcweir 
60024201887SPedro Giffuni /*
60124201887SPedro Giffuni  *  SQLGetInfo - SQL_CURSOR_COMMIT_BEHAVIOR
60224201887SPedro Giffuni  */
60324201887SPedro Giffuni #define SQL_CB_DELETE				0
60424201887SPedro Giffuni #define SQL_CB_CLOSE				1
60524201887SPedro Giffuni #define SQL_CB_PRESERVE				2
60624201887SPedro Giffuni 
607cdf0e10cSrcweir 
60824201887SPedro Giffuni /*
60924201887SPedro Giffuni  *  SQLGetInfo - SQL_FETCH_DIRECTION
61024201887SPedro Giffuni  */
61124201887SPedro Giffuni #define SQL_FD_FETCH_NEXT			0x00000001L
61224201887SPedro Giffuni #define SQL_FD_FETCH_FIRST			0x00000002L
61324201887SPedro Giffuni #define SQL_FD_FETCH_LAST			0x00000004L
61424201887SPedro Giffuni #define SQL_FD_FETCH_PRIOR			0x00000008L
61524201887SPedro Giffuni #define SQL_FD_FETCH_ABSOLUTE			0x00000010L
61624201887SPedro Giffuni #define SQL_FD_FETCH_RELATIVE			0x00000020L
617cdf0e10cSrcweir 
618cdf0e10cSrcweir 
61924201887SPedro Giffuni /*
62024201887SPedro Giffuni  *  SQLGetInfo - SQL_GETDATA_EXTENSIONS
62124201887SPedro Giffuni  */
62224201887SPedro Giffuni #define SQL_GD_ANY_COLUMN			0x00000001L
62324201887SPedro Giffuni #define SQL_GD_ANY_ORDER			0x00000002L
62424201887SPedro Giffuni 
62524201887SPedro Giffuni 
62624201887SPedro Giffuni /*
62724201887SPedro Giffuni  *  SQLGetInfo - SQL_IDENTIFIER_CASE
62824201887SPedro Giffuni  */
62924201887SPedro Giffuni #define SQL_IC_UPPER				1
63024201887SPedro Giffuni #define SQL_IC_LOWER				2
63124201887SPedro Giffuni #define SQL_IC_SENSITIVE			3
63224201887SPedro Giffuni #define SQL_IC_MIXED				4
63324201887SPedro Giffuni 
63424201887SPedro Giffuni 
63524201887SPedro Giffuni /*
63624201887SPedro Giffuni  *  SQLGetInfo - SQL_NULL_COLLATION
63724201887SPedro Giffuni  */
63824201887SPedro Giffuni #define SQL_NC_HIGH				0
63924201887SPedro Giffuni #define SQL_NC_LOW				1
64024201887SPedro Giffuni 
64124201887SPedro Giffuni 
64224201887SPedro Giffuni /*
64324201887SPedro Giffuni  *  SQLGetInfo - SQL_OJ_CAPABILITIES
64424201887SPedro Giffuni  */
645cdf0e10cSrcweir #if (ODBCVER >= 0x0201)
64624201887SPedro Giffuni #define SQL_OJ_LEFT				0x00000001L
64724201887SPedro Giffuni #define SQL_OJ_RIGHT				0x00000002L
64824201887SPedro Giffuni #define SQL_OJ_FULL				0x00000004L
64924201887SPedro Giffuni #define SQL_OJ_NESTED				0x00000008L
65024201887SPedro Giffuni #define SQL_OJ_NOT_ORDERED			0x00000010L
65124201887SPedro Giffuni #define SQL_OJ_INNER				0x00000020L
65224201887SPedro Giffuni #define SQL_OJ_ALL_COMPARISON_OPS		0x00000040L
653cdf0e10cSrcweir #endif
654cdf0e10cSrcweir 
65524201887SPedro Giffuni 
65624201887SPedro Giffuni /*
65724201887SPedro Giffuni  *  SQLGetInfo - SQL_SCROLL_CONCURRENCY
65824201887SPedro Giffuni  */
65924201887SPedro Giffuni #define SQL_SCCO_READ_ONLY			0x00000001L
66024201887SPedro Giffuni #define SQL_SCCO_LOCK				0x00000002L
66124201887SPedro Giffuni #define SQL_SCCO_OPT_ROWVER			0x00000004L
66224201887SPedro Giffuni #define SQL_SCCO_OPT_VALUES			0x00000008L
66324201887SPedro Giffuni 
66424201887SPedro Giffuni 
66524201887SPedro Giffuni /*
66624201887SPedro Giffuni  *  SQLGetInfo - SQL_TXN_CAPABLE
66724201887SPedro Giffuni  */
66824201887SPedro Giffuni #define SQL_TC_NONE				0
66924201887SPedro Giffuni #define SQL_TC_DML				1
67024201887SPedro Giffuni #define SQL_TC_ALL				2
67124201887SPedro Giffuni #define SQL_TC_DDL_COMMIT			3
67224201887SPedro Giffuni #define SQL_TC_DDL_IGNORE			4
67324201887SPedro Giffuni 
67424201887SPedro Giffuni 
67524201887SPedro Giffuni /*
67624201887SPedro Giffuni  *  SQLGetInfo - SQL_TXN_ISOLATION_OPTION
67724201887SPedro Giffuni  */
67824201887SPedro Giffuni #define SQL_TXN_READ_UNCOMMITTED		0x00000001L
679cdf0e10cSrcweir #define SQL_TRANSACTION_READ_UNCOMMITTED	SQL_TXN_READ_UNCOMMITTED
68024201887SPedro Giffuni #define SQL_TXN_READ_COMMITTED			0x00000002L
681cdf0e10cSrcweir #define SQL_TRANSACTION_READ_COMMITTED		SQL_TXN_READ_COMMITTED
68224201887SPedro Giffuni #define SQL_TXN_REPEATABLE_READ			0x00000004L
683cdf0e10cSrcweir #define SQL_TRANSACTION_REPEATABLE_READ		SQL_TXN_REPEATABLE_READ
68424201887SPedro Giffuni #define SQL_TXN_SERIALIZABLE			0x00000008L
685cdf0e10cSrcweir #define SQL_TRANSACTION_SERIALIZABLE		SQL_TXN_SERIALIZABLE
686cdf0e10cSrcweir 
687cdf0e10cSrcweir 
68824201887SPedro Giffuni /*
68924201887SPedro Giffuni  *  SQLGetStmtAttr - statement attributes
69024201887SPedro Giffuni  */
69124201887SPedro Giffuni #if (ODBCVER >= 0x0300)
69224201887SPedro Giffuni #define SQL_ATTR_APP_ROW_DESC			10010
69324201887SPedro Giffuni #define SQL_ATTR_APP_PARAM_DESC			10011
69424201887SPedro Giffuni #define SQL_ATTR_IMP_ROW_DESC			10012
69524201887SPedro Giffuni #define SQL_ATTR_IMP_PARAM_DESC			10013
69624201887SPedro Giffuni #define SQL_ATTR_CURSOR_SCROLLABLE		(-1)
69724201887SPedro Giffuni #define SQL_ATTR_CURSOR_SENSITIVITY		(-2)
69824201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
699cdf0e10cSrcweir 
700cdf0e10cSrcweir 
70124201887SPedro Giffuni /*
70224201887SPedro Giffuni  *  SQLGetStmtAttr - SQL_ATTR_CURSOR_SCROLLABLE
70324201887SPedro Giffuni  */
704cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
70524201887SPedro Giffuni #define SQL_NONSCROLLABLE			0
70624201887SPedro Giffuni #define SQL_SCROLLABLE				1
70724201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
708cdf0e10cSrcweir 
709cdf0e10cSrcweir 
71024201887SPedro Giffuni /*
71124201887SPedro Giffuni  *  SQLGetStmtAttr - SQL_ATTR_CURSOR_SENSITIVITY
71224201887SPedro Giffuni  */
713cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
71424201887SPedro Giffuni #define SQL_UNSPECIFIED				0
71524201887SPedro Giffuni #define SQL_INSENSITIVE				1
71624201887SPedro Giffuni #define SQL_SENSITIVE				2
71724201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
718cdf0e10cSrcweir 
719cdf0e10cSrcweir 
72024201887SPedro Giffuni /*
72124201887SPedro Giffuni  *  SQLGetTypeInfo - SEARCHABLE
72224201887SPedro Giffuni  */
723cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
72424201887SPedro Giffuni #define SQL_PRED_NONE				0
72524201887SPedro Giffuni #define SQL_PRED_CHAR				1
72624201887SPedro Giffuni #define SQL_PRED_BASIC				2
72724201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
728cdf0e10cSrcweir 
729cdf0e10cSrcweir 
73024201887SPedro Giffuni /*
73124201887SPedro Giffuni  *  SQLSpecialColumns - Column scopes
73224201887SPedro Giffuni  */
73324201887SPedro Giffuni #define SQL_SCOPE_CURROW			0
73424201887SPedro Giffuni #define SQL_SCOPE_TRANSACTION			1
73524201887SPedro Giffuni #define SQL_SCOPE_SESSION			2
736cdf0e10cSrcweir 
737cdf0e10cSrcweir 
73824201887SPedro Giffuni /*
73924201887SPedro Giffuni  *  SQLSpecialColumns - PSEUDO_COLUMN
74024201887SPedro Giffuni  */
74124201887SPedro Giffuni #define SQL_PC_UNKNOWN				0
74224201887SPedro Giffuni #if (ODBCVER >= 0x0300)
74324201887SPedro Giffuni #define SQL_PC_NON_PSEUDO			1
74424201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
74524201887SPedro Giffuni #define SQL_PC_PSEUDO				2
746cdf0e10cSrcweir 
747cdf0e10cSrcweir 
74824201887SPedro Giffuni /*
74924201887SPedro Giffuni  *  SQLSpecialColumns - IdentifierType
75024201887SPedro Giffuni  */
751cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
75224201887SPedro Giffuni #define SQL_ROW_IDENTIFIER			1
75324201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
754cdf0e10cSrcweir 
755cdf0e10cSrcweir 
75624201887SPedro Giffuni /*
75724201887SPedro Giffuni  *  SQLStatistics - fUnique
75824201887SPedro Giffuni  */
75924201887SPedro Giffuni #define SQL_INDEX_UNIQUE			0
76024201887SPedro Giffuni #define SQL_INDEX_ALL				1
761cdf0e10cSrcweir 
762cdf0e10cSrcweir 
76324201887SPedro Giffuni /*
76424201887SPedro Giffuni  *  SQLStatistics - TYPE
76524201887SPedro Giffuni  */
76624201887SPedro Giffuni #define SQL_INDEX_CLUSTERED			1
76724201887SPedro Giffuni #define SQL_INDEX_HASHED			2
76824201887SPedro Giffuni #define SQL_INDEX_OTHER				3
769cdf0e10cSrcweir 
770cdf0e10cSrcweir 
77124201887SPedro Giffuni /*
77224201887SPedro Giffuni  *  SQLTransact/SQLEndTran
77324201887SPedro Giffuni  */
77424201887SPedro Giffuni #define SQL_COMMIT				0
77524201887SPedro Giffuni #define SQL_ROLLBACK				1
77624201887SPedro Giffuni 
777cdf0e10cSrcweir 
77824201887SPedro Giffuni /*
77924201887SPedro Giffuni  *  Function Prototypes
78024201887SPedro Giffuni  */
78124201887SPedro Giffuni SQLRETURN SQL_API SQLAllocConnect (
78224201887SPedro Giffuni     SQLHENV		  EnvironmentHandle,
78324201887SPedro Giffuni     SQLHDBC		* ConnectionHandle);
784cdf0e10cSrcweir 
78524201887SPedro Giffuni SQLRETURN SQL_API SQLAllocEnv (
78624201887SPedro Giffuni     SQLHENV		* EnvironmentHandle);
787cdf0e10cSrcweir 
788cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
78924201887SPedro Giffuni SQLRETURN SQL_API SQLAllocHandle (
79024201887SPedro Giffuni     SQLSMALLINT		  HandleType,
79124201887SPedro Giffuni     SQLHANDLE		  InputHandle,
79224201887SPedro Giffuni     SQLHANDLE		* OutputHandle);
79324201887SPedro Giffuni #endif	/* ODBCVER >= 0x0300 */
79424201887SPedro Giffuni 
79524201887SPedro Giffuni SQLRETURN SQL_API SQLAllocStmt (
79624201887SPedro Giffuni     SQLHDBC		  ConnectionHandle,
79724201887SPedro Giffuni     SQLHSTMT		* StatementHandle);
79824201887SPedro Giffuni 
79924201887SPedro Giffuni SQLRETURN SQL_API SQLBindCol (
80024201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
80124201887SPedro Giffuni     SQLUSMALLINT	  ColumnNumber,
80224201887SPedro Giffuni     SQLSMALLINT		  TargetType,
80324201887SPedro Giffuni     SQLPOINTER		  TargetValue,
80424201887SPedro Giffuni     SQLLEN		  BufferLength,
80524201887SPedro Giffuni     SQLLEN		* StrLen_or_Ind);
80624201887SPedro Giffuni 
80724201887SPedro Giffuni #if (ODBCVER >= 0x0300)
80824201887SPedro Giffuni SQLRETURN SQL_API SQLBindParam (
80924201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
81024201887SPedro Giffuni     SQLUSMALLINT	  ParameterNumber,
81124201887SPedro Giffuni     SQLSMALLINT		  ValueType,
81224201887SPedro Giffuni     SQLSMALLINT		  ParameterType,
81324201887SPedro Giffuni     SQLULEN		  LengthPrecision,
81424201887SPedro Giffuni     SQLSMALLINT		  ParameterScale,
81524201887SPedro Giffuni     SQLPOINTER		  ParameterValue,
81624201887SPedro Giffuni     SQLLEN		* StrLen_or_Ind);
817cdf0e10cSrcweir #endif
818cdf0e10cSrcweir 
81924201887SPedro Giffuni SQLRETURN SQL_API SQLCancel (
82024201887SPedro Giffuni     SQLHSTMT		  StatementHandle);
82124201887SPedro Giffuni 
82224201887SPedro Giffuni #if (ODBCVER >= 0x0300)
82324201887SPedro Giffuni SQLRETURN SQL_API SQLCloseCursor (
82424201887SPedro Giffuni     SQLHSTMT		  StatementHandle);
82524201887SPedro Giffuni 
82624201887SPedro Giffuni /*
82724201887SPedro Giffuni  *  Using SQLLEN * instead of SQLPOINTER for NumericAttribute,
82824201887SPedro Giffuni  *  makes the prototype the same as SQLColAttributes (deprecated)
82924201887SPedro Giffuni  *  and clearer for 64bit ports
83024201887SPedro Giffuni  */
83124201887SPedro Giffuni SQLRETURN SQL_API SQLColAttribute (
83224201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
83324201887SPedro Giffuni     SQLUSMALLINT	  ColumnNumber,
83424201887SPedro Giffuni     SQLUSMALLINT	  FieldIdentifier,
83524201887SPedro Giffuni     SQLPOINTER		  CharacterAttribute,
83624201887SPedro Giffuni     SQLSMALLINT		  BufferLength,
83724201887SPedro Giffuni     SQLSMALLINT		* StringLength,
83824201887SPedro Giffuni     SQLLEN		* NumericAttribute);
83924201887SPedro Giffuni #endif
840cdf0e10cSrcweir 
84124201887SPedro Giffuni SQLRETURN SQL_API SQLColumns (
84224201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
84324201887SPedro Giffuni     SQLCHAR		* CatalogName,
84424201887SPedro Giffuni     SQLSMALLINT		  NameLength1,
84524201887SPedro Giffuni     SQLCHAR		* SchemaName,
84624201887SPedro Giffuni     SQLSMALLINT		  NameLength2,
84724201887SPedro Giffuni     SQLCHAR		* TableName,
84824201887SPedro Giffuni     SQLSMALLINT		  NameLength3,
84924201887SPedro Giffuni     SQLCHAR		* ColumnName,
85024201887SPedro Giffuni     SQLSMALLINT		  NameLength4);
85124201887SPedro Giffuni 
85224201887SPedro Giffuni SQLRETURN SQL_API SQLConnect (
85324201887SPedro Giffuni     SQLHDBC		  ConnectionHandle,
85424201887SPedro Giffuni     SQLCHAR		* ServerName,
85524201887SPedro Giffuni     SQLSMALLINT		  NameLength1,
85624201887SPedro Giffuni     SQLCHAR		* UserName,
85724201887SPedro Giffuni     SQLSMALLINT		  NameLength2,
85824201887SPedro Giffuni     SQLCHAR		* Authentication,
85924201887SPedro Giffuni     SQLSMALLINT		  NameLength3);
860cdf0e10cSrcweir 
861cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
86224201887SPedro Giffuni SQLRETURN SQL_API SQLCopyDesc (
86324201887SPedro Giffuni     SQLHDESC		  SourceDescHandle,
86424201887SPedro Giffuni     SQLHDESC		  TargetDescHandle);
865cdf0e10cSrcweir #endif
866cdf0e10cSrcweir 
86724201887SPedro Giffuni SQLRETURN SQL_API SQLDataSources (
86824201887SPedro Giffuni     SQLHENV		  EnvironmentHandle,
86924201887SPedro Giffuni     SQLUSMALLINT	  Direction,
87024201887SPedro Giffuni     SQLCHAR		* ServerName,
87124201887SPedro Giffuni     SQLSMALLINT		  BufferLength1,
87224201887SPedro Giffuni     SQLSMALLINT		* NameLength1,
87324201887SPedro Giffuni     SQLCHAR		* Description,
87424201887SPedro Giffuni     SQLSMALLINT		  BufferLength2,
87524201887SPedro Giffuni     SQLSMALLINT		* NameLength2);
87624201887SPedro Giffuni 
87724201887SPedro Giffuni SQLRETURN SQL_API SQLDescribeCol (
87824201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
87924201887SPedro Giffuni     SQLUSMALLINT	  ColumnNumber,
88024201887SPedro Giffuni     SQLCHAR		* ColumnName,
88124201887SPedro Giffuni     SQLSMALLINT		  BufferLength,
88224201887SPedro Giffuni     SQLSMALLINT		* NameLength,
88324201887SPedro Giffuni     SQLSMALLINT		* DataType,
88424201887SPedro Giffuni     SQLULEN		* ColumnSize,
88524201887SPedro Giffuni     SQLSMALLINT		* DecimalDigits,
88624201887SPedro Giffuni     SQLSMALLINT		* Nullable);
88724201887SPedro Giffuni 
88824201887SPedro Giffuni SQLRETURN SQL_API SQLDisconnect (
88924201887SPedro Giffuni     SQLHDBC		  ConnectionHandle);
890cdf0e10cSrcweir 
891cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
89224201887SPedro Giffuni SQLRETURN SQL_API SQLEndTran (
89324201887SPedro Giffuni     SQLSMALLINT		  HandleType,
89424201887SPedro Giffuni     SQLHANDLE		  Handle,
89524201887SPedro Giffuni     SQLSMALLINT		  CompletionType);
896cdf0e10cSrcweir #endif
897cdf0e10cSrcweir 
89824201887SPedro Giffuni SQLRETURN SQL_API SQLError (
89924201887SPedro Giffuni     SQLHENV		  EnvironmentHandle,
90024201887SPedro Giffuni     SQLHDBC		  ConnectionHandle,
90124201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
90224201887SPedro Giffuni     SQLCHAR		* Sqlstate,
90324201887SPedro Giffuni     SQLINTEGER		* NativeError,
90424201887SPedro Giffuni     SQLCHAR		* MessageText,
90524201887SPedro Giffuni     SQLSMALLINT		  BufferLength,
90624201887SPedro Giffuni     SQLSMALLINT		* TextLength);
907cdf0e10cSrcweir 
90824201887SPedro Giffuni SQLRETURN SQL_API SQLExecDirect (
90924201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
91024201887SPedro Giffuni     SQLCHAR		* StatementText,
91124201887SPedro Giffuni     SQLINTEGER		  TextLength);
912cdf0e10cSrcweir 
91324201887SPedro Giffuni SQLRETURN SQL_API SQLExecute (
91424201887SPedro Giffuni     SQLHSTMT		  StatementHandle);
91524201887SPedro Giffuni 
91624201887SPedro Giffuni SQLRETURN SQL_API SQLFetch (
91724201887SPedro Giffuni     SQLHSTMT		  StatementHandle);
918cdf0e10cSrcweir 
919cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
92024201887SPedro Giffuni SQLRETURN SQL_API SQLFetchScroll (
92124201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
92224201887SPedro Giffuni     SQLSMALLINT		  FetchOrientation,
92324201887SPedro Giffuni     SQLLEN		  FetchOffset);
92424201887SPedro Giffuni #endif
925cdf0e10cSrcweir 
92624201887SPedro Giffuni SQLRETURN SQL_API SQLFreeConnect (
92724201887SPedro Giffuni     SQLHDBC		  ConnectionHandle);
928cdf0e10cSrcweir 
92924201887SPedro Giffuni SQLRETURN SQL_API SQLFreeEnv (
93024201887SPedro Giffuni     SQLHENV		  EnvironmentHandle);
931cdf0e10cSrcweir 
93224201887SPedro Giffuni #if (ODBCVER >= 0x0300)
93324201887SPedro Giffuni SQLRETURN SQL_API SQLFreeHandle (
93424201887SPedro Giffuni     SQLSMALLINT		  HandleType,
93524201887SPedro Giffuni     SQLHANDLE		  Handle);
93624201887SPedro Giffuni #endif
937cdf0e10cSrcweir 
93824201887SPedro Giffuni SQLRETURN SQL_API SQLFreeStmt (
93924201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
94024201887SPedro Giffuni     SQLUSMALLINT	  Option);
941cdf0e10cSrcweir 
94224201887SPedro Giffuni #if (ODBCVER >= 0x0300)
94324201887SPedro Giffuni SQLRETURN SQL_API SQLGetConnectAttr (
94424201887SPedro Giffuni     SQLHDBC		  ConnectionHandle,
94524201887SPedro Giffuni     SQLINTEGER		  Attribute,
94624201887SPedro Giffuni     SQLPOINTER		  Value,
94724201887SPedro Giffuni     SQLINTEGER		  BufferLength,
94824201887SPedro Giffuni     SQLINTEGER		* StringLength);
94924201887SPedro Giffuni #endif
950cdf0e10cSrcweir 
95124201887SPedro Giffuni SQLRETURN SQL_API SQLGetConnectOption (
95224201887SPedro Giffuni     SQLHDBC		  ConnectionHandle,
95324201887SPedro Giffuni     SQLUSMALLINT	  Option,
95424201887SPedro Giffuni     SQLPOINTER		  Value);
95524201887SPedro Giffuni 
95624201887SPedro Giffuni SQLRETURN SQL_API SQLGetCursorName (
95724201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
95824201887SPedro Giffuni     SQLCHAR		* CursorName,
95924201887SPedro Giffuni     SQLSMALLINT		  BufferLength,
96024201887SPedro Giffuni     SQLSMALLINT		* NameLength);
96124201887SPedro Giffuni 
96224201887SPedro Giffuni SQLRETURN SQL_API SQLGetData (
96324201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
96424201887SPedro Giffuni     SQLUSMALLINT	  ColumnNumber,
96524201887SPedro Giffuni     SQLSMALLINT		  TargetType,
96624201887SPedro Giffuni     SQLPOINTER		  TargetValue,
96724201887SPedro Giffuni     SQLLEN		  BufferLength,
96824201887SPedro Giffuni     SQLLEN		* StrLen_or_Ind);
969cdf0e10cSrcweir 
970cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
97124201887SPedro Giffuni SQLRETURN SQL_API SQLGetDescField (
97224201887SPedro Giffuni     SQLHDESC		  DescriptorHandle,
97324201887SPedro Giffuni     SQLSMALLINT		  RecNumber,
97424201887SPedro Giffuni     SQLSMALLINT		  FieldIdentifier,
97524201887SPedro Giffuni     SQLPOINTER		  Value,
97624201887SPedro Giffuni     SQLINTEGER		  BufferLength,
97724201887SPedro Giffuni     SQLINTEGER		* StringLength);
97824201887SPedro Giffuni 
97924201887SPedro Giffuni SQLRETURN SQL_API SQLGetDescRec (
98024201887SPedro Giffuni     SQLHDESC		  DescriptorHandle,
98124201887SPedro Giffuni     SQLSMALLINT		  RecNumber,
98224201887SPedro Giffuni     SQLCHAR		* Name,
98324201887SPedro Giffuni     SQLSMALLINT		  BufferLength,
98424201887SPedro Giffuni     SQLSMALLINT		* StringLength,
98524201887SPedro Giffuni     SQLSMALLINT		* Type,
98624201887SPedro Giffuni     SQLSMALLINT		* SubType,
98724201887SPedro Giffuni     SQLLEN		* Length,
98824201887SPedro Giffuni     SQLSMALLINT		* Precision,
98924201887SPedro Giffuni     SQLSMALLINT		* Scale,
99024201887SPedro Giffuni     SQLSMALLINT		* Nullable);
99124201887SPedro Giffuni 
99224201887SPedro Giffuni SQLRETURN SQL_API SQLGetDiagField (
99324201887SPedro Giffuni     SQLSMALLINT		  HandleType,
99424201887SPedro Giffuni     SQLHANDLE		  Handle,
99524201887SPedro Giffuni     SQLSMALLINT		  RecNumber,
99624201887SPedro Giffuni     SQLSMALLINT		  DiagIdentifier,
99724201887SPedro Giffuni     SQLPOINTER		  DiagInfo,
99824201887SPedro Giffuni     SQLSMALLINT		  BufferLength,
99924201887SPedro Giffuni     SQLSMALLINT		* StringLength);
100024201887SPedro Giffuni 
100124201887SPedro Giffuni SQLRETURN SQL_API SQLGetDiagRec (
100224201887SPedro Giffuni     SQLSMALLINT		  HandleType,
100324201887SPedro Giffuni     SQLHANDLE		  Handle,
100424201887SPedro Giffuni     SQLSMALLINT		  RecNumber,
100524201887SPedro Giffuni     SQLCHAR		* Sqlstate,
100624201887SPedro Giffuni     SQLINTEGER		* NativeError,
100724201887SPedro Giffuni     SQLCHAR		* MessageText,
100824201887SPedro Giffuni     SQLSMALLINT		  BufferLength,
100924201887SPedro Giffuni     SQLSMALLINT		* TextLength);
101024201887SPedro Giffuni 
101124201887SPedro Giffuni SQLRETURN SQL_API SQLGetEnvAttr (
101224201887SPedro Giffuni     SQLHENV		  EnvironmentHandle,
101324201887SPedro Giffuni     SQLINTEGER		  Attribute,
101424201887SPedro Giffuni     SQLPOINTER		  Value,
101524201887SPedro Giffuni     SQLINTEGER		  BufferLength,
101624201887SPedro Giffuni     SQLINTEGER		* StringLength);
101724201887SPedro Giffuni #endif /* ODBCVER >= 0x0300 */
1018cdf0e10cSrcweir 
101924201887SPedro Giffuni SQLRETURN SQL_API SQLGetFunctions (
102024201887SPedro Giffuni     SQLHDBC		ConnectionHandle,
102124201887SPedro Giffuni     SQLUSMALLINT	FunctionId,
102224201887SPedro Giffuni     SQLUSMALLINT *	Supported);
1023cdf0e10cSrcweir 
102424201887SPedro Giffuni SQLRETURN SQL_API SQLGetInfo (
102524201887SPedro Giffuni     SQLHDBC		  ConnectionHandle,
102624201887SPedro Giffuni     SQLUSMALLINT	  InfoType,
102724201887SPedro Giffuni     SQLPOINTER		  InfoValue,
102824201887SPedro Giffuni     SQLSMALLINT		  BufferLength,
102924201887SPedro Giffuni     SQLSMALLINT		* StringLength);
1030cdf0e10cSrcweir 
103124201887SPedro Giffuni #if (ODBCVER >= 0x0300)
103224201887SPedro Giffuni SQLRETURN SQL_API SQLGetStmtAttr (
103324201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
103424201887SPedro Giffuni     SQLINTEGER		  Attribute,
103524201887SPedro Giffuni     SQLPOINTER		  Value,
103624201887SPedro Giffuni     SQLINTEGER		  BufferLength,
103724201887SPedro Giffuni     SQLINTEGER		* StringLength);
103824201887SPedro Giffuni #endif /* ODBCVER >= 0x0300 */
1039cdf0e10cSrcweir 
104024201887SPedro Giffuni SQLRETURN SQL_API SQLGetStmtOption (
104124201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
104224201887SPedro Giffuni     SQLUSMALLINT	  Option,
104324201887SPedro Giffuni     SQLPOINTER		  Value);
1044cdf0e10cSrcweir 
104524201887SPedro Giffuni SQLRETURN SQL_API SQLGetTypeInfo (
104624201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
104724201887SPedro Giffuni     SQLSMALLINT		  DataType);
1048cdf0e10cSrcweir 
104924201887SPedro Giffuni SQLRETURN SQL_API SQLNumResultCols (
105024201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
105124201887SPedro Giffuni     SQLSMALLINT		* ColumnCount);
1052cdf0e10cSrcweir 
105324201887SPedro Giffuni SQLRETURN SQL_API SQLParamData (
105424201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
105524201887SPedro Giffuni     SQLPOINTER		* Value);
1056cdf0e10cSrcweir 
105724201887SPedro Giffuni SQLRETURN SQL_API SQLPrepare (
105824201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
105924201887SPedro Giffuni     SQLCHAR		* StatementText,
106024201887SPedro Giffuni     SQLINTEGER		  TextLength);
1061cdf0e10cSrcweir 
106224201887SPedro Giffuni SQLRETURN SQL_API SQLPutData (
106324201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
106424201887SPedro Giffuni     SQLPOINTER		  Data,
106524201887SPedro Giffuni     SQLLEN		  StrLen_or_Ind);
1066cdf0e10cSrcweir 
106724201887SPedro Giffuni SQLRETURN SQL_API SQLRowCount (
106824201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
106924201887SPedro Giffuni     SQLLEN		* RowCount);
1070cdf0e10cSrcweir 
1071cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
107224201887SPedro Giffuni SQLRETURN SQL_API SQLSetConnectAttr (
107324201887SPedro Giffuni     SQLHDBC		  ConnectionHandle,
107424201887SPedro Giffuni     SQLINTEGER		  Attribute,
107524201887SPedro Giffuni     SQLPOINTER		  Value,
107624201887SPedro Giffuni     SQLINTEGER		  StringLength);
107724201887SPedro Giffuni #endif /* ODBCVER >= 0x0300 */
107824201887SPedro Giffuni 
107924201887SPedro Giffuni SQLRETURN SQL_API SQLSetConnectOption (
108024201887SPedro Giffuni     SQLHDBC		  ConnectionHandle,
108124201887SPedro Giffuni     SQLUSMALLINT	  Option,
108224201887SPedro Giffuni     SQLULEN		  Value);
1083cdf0e10cSrcweir 
108424201887SPedro Giffuni SQLRETURN SQL_API SQLSetCursorName (
108524201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
108624201887SPedro Giffuni     SQLCHAR		* CursorName,
108724201887SPedro Giffuni     SQLSMALLINT		  NameLength);
1088cdf0e10cSrcweir 
108924201887SPedro Giffuni #if (ODBCVER >= 0x0300)
109024201887SPedro Giffuni SQLRETURN SQL_API SQLSetDescField (
109124201887SPedro Giffuni     SQLHDESC		  DescriptorHandle,
109224201887SPedro Giffuni     SQLSMALLINT		  RecNumber,
109324201887SPedro Giffuni     SQLSMALLINT		  FieldIdentifier,
109424201887SPedro Giffuni     SQLPOINTER		  Value,
109524201887SPedro Giffuni     SQLINTEGER		  BufferLength);
109624201887SPedro Giffuni 
109724201887SPedro Giffuni SQLRETURN SQL_API SQLSetDescRec (
109824201887SPedro Giffuni     SQLHDESC		  DescriptorHandle,
109924201887SPedro Giffuni     SQLSMALLINT		  RecNumber,
110024201887SPedro Giffuni     SQLSMALLINT		  Type,
110124201887SPedro Giffuni     SQLSMALLINT		  SubType,
110224201887SPedro Giffuni     SQLLEN		  Length,
110324201887SPedro Giffuni     SQLSMALLINT		  Precision,
110424201887SPedro Giffuni     SQLSMALLINT		  Scale,
110524201887SPedro Giffuni     SQLPOINTER		  Data,
110624201887SPedro Giffuni     SQLLEN		* StringLength,
110724201887SPedro Giffuni     SQLLEN		* Indicator);
110824201887SPedro Giffuni 
110924201887SPedro Giffuni SQLRETURN SQL_API SQLSetEnvAttr (
111024201887SPedro Giffuni     SQLHENV		  EnvironmentHandle,
111124201887SPedro Giffuni     SQLINTEGER		  Attribute,
111224201887SPedro Giffuni     SQLPOINTER		  Value,
111324201887SPedro Giffuni     SQLINTEGER		  StringLength);
1114cdf0e10cSrcweir #endif /* ODBCVER >= 0x0300 */
1115cdf0e10cSrcweir 
1116cdf0e10cSrcweir 
1117cdf0e10cSrcweir #if (ODBCVER >= 0x0300)
111824201887SPedro Giffuni SQLRETURN SQL_API SQLSetStmtAttr (
111924201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
112024201887SPedro Giffuni     SQLINTEGER		  Attribute,
112124201887SPedro Giffuni     SQLPOINTER		  Value,
112224201887SPedro Giffuni     SQLINTEGER		  StringLength);
1123cdf0e10cSrcweir #endif
1124cdf0e10cSrcweir 
112524201887SPedro Giffuni SQLRETURN SQL_API SQLSetStmtOption (
112624201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
112724201887SPedro Giffuni     SQLUSMALLINT	  Option,
112824201887SPedro Giffuni     SQLULEN		  Value);
112924201887SPedro Giffuni 
113024201887SPedro Giffuni SQLRETURN SQL_API SQLSpecialColumns (
113124201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
113224201887SPedro Giffuni     SQLUSMALLINT	  IdentifierType,
113324201887SPedro Giffuni     SQLCHAR		* CatalogName,
113424201887SPedro Giffuni     SQLSMALLINT		  NameLength1,
113524201887SPedro Giffuni     SQLCHAR		* SchemaName,
113624201887SPedro Giffuni     SQLSMALLINT		  NameLength2,
113724201887SPedro Giffuni     SQLCHAR		* TableName,
113824201887SPedro Giffuni     SQLSMALLINT		  NameLength3,
113924201887SPedro Giffuni     SQLUSMALLINT	  Scope,
114024201887SPedro Giffuni     SQLUSMALLINT	  Nullable);
114124201887SPedro Giffuni 
114224201887SPedro Giffuni SQLRETURN SQL_API SQLStatistics (
114324201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
114424201887SPedro Giffuni     SQLCHAR		* CatalogName,
114524201887SPedro Giffuni     SQLSMALLINT		  NameLength1,
114624201887SPedro Giffuni     SQLCHAR		* SchemaName,
114724201887SPedro Giffuni     SQLSMALLINT		  NameLength2,
114824201887SPedro Giffuni     SQLCHAR		* TableName,
114924201887SPedro Giffuni     SQLSMALLINT		  NameLength3,
115024201887SPedro Giffuni     SQLUSMALLINT	  Unique,
115124201887SPedro Giffuni     SQLUSMALLINT	  Reserved);
115224201887SPedro Giffuni 
115324201887SPedro Giffuni SQLRETURN SQL_API SQLTables (
115424201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
115524201887SPedro Giffuni     SQLCHAR		* CatalogName,
115624201887SPedro Giffuni     SQLSMALLINT		  NameLength1,
115724201887SPedro Giffuni     SQLCHAR		* SchemaName,
115824201887SPedro Giffuni     SQLSMALLINT		  NameLength2,
115924201887SPedro Giffuni     SQLCHAR		* TableName,
116024201887SPedro Giffuni     SQLSMALLINT		  NameLength3,
116124201887SPedro Giffuni     SQLCHAR		* TableType,
116224201887SPedro Giffuni     SQLSMALLINT		  NameLength4);
116324201887SPedro Giffuni 
116424201887SPedro Giffuni SQLRETURN SQL_API SQLTransact (
116524201887SPedro Giffuni     SQLHENV		  EnvironmentHandle,
116624201887SPedro Giffuni     SQLHDBC		  ConnectionHandle,
116724201887SPedro Giffuni     SQLUSMALLINT	  CompletionType);
116824201887SPedro Giffuni 
116924201887SPedro Giffuni 
117024201887SPedro Giffuni /*
117124201887SPedro Giffuni  *  Depreciated ODBC 1.0 function - Use SQLBindParameter
117224201887SPedro Giffuni  */
117324201887SPedro Giffuni SQLRETURN SQL_API SQLSetParam (
117424201887SPedro Giffuni     SQLHSTMT		  StatementHandle,
117524201887SPedro Giffuni     SQLUSMALLINT	  ParameterNumber,
117624201887SPedro Giffuni     SQLSMALLINT		  ValueType,
117724201887SPedro Giffuni     SQLSMALLINT		  ParameterType,
117824201887SPedro Giffuni     SQLULEN		  LengthPrecision,
117924201887SPedro Giffuni     SQLSMALLINT		  ParameterScale,
118024201887SPedro Giffuni     SQLPOINTER		  ParameterValue,
118124201887SPedro Giffuni     SQLLEN		* StrLen_or_Ind);
1182cdf0e10cSrcweir 
1183cdf0e10cSrcweir #ifdef __cplusplus
1184cdf0e10cSrcweir }
1185cdf0e10cSrcweir #endif
118624201887SPedro Giffuni 
118724201887SPedro Giffuni #endif	 /* _SQL_H */
1188