2 * Copyright (C) 1999 Xiang Li
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #define ODBCVER 0x0351
30 typedef unsigned char SQLCHAR
;
31 #ifdef WINE_UNICODE_NATIVE
32 typedef wchar_t SQLWCHAR
;
34 typedef unsigned short SQLWCHAR
;
37 typedef SQLCHAR SQLTCHAR
;
39 typedef SQLWCHAR SQLTCHAR
;
42 #if (ODBCVER >= 0x0300)
43 typedef unsigned char SQLDATE
;
44 typedef unsigned char SQLDECIMAL
;
45 typedef double SQLDOUBLE
;
46 typedef double SQLFLOAT
;
49 typedef long SQLINTEGER
;
51 #if (ODBCVER >= 0x0300)
52 typedef unsigned char SQLNUMERIC
;
55 typedef void * SQLPOINTER
;
57 #if (ODBCVER >= 0x0300)
58 typedef float SQLREAL
;
61 typedef signed short int SQLSMALLINT
;
62 typedef unsigned short SQLUSMALLINT
;
64 #if (ODBCVER >= 0x0300)
65 typedef unsigned char SQLTIME
;
66 typedef unsigned char SQLTIMESTAMP
;
67 typedef unsigned char SQLVARCHAR
;
70 typedef SQLSMALLINT SQLRETURN
;
72 /* typedef void * SQLHANDLE; */
74 typedef SQLINTEGER SQLHANDLE
;
75 #if (ODBCVER >= 0x0300)
77 typedef SQLHANDLE SQLHENV
;
78 typedef SQLHANDLE SQLHDBC
;
79 typedef SQLHANDLE SQLHSTMT
;
80 typedef SQLHANDLE SQLHDESC
;
83 typedef SQLINTEGER SQLHENV
;
84 typedef SQLINTEGER SQLHDBC
;
85 typedef SQLINTEGER SQLHSTMT
;
88 typedef signed char SCHAR
;
89 typedef SCHAR SQLSCHAR
;
90 typedef long int SDWORD
;
91 typedef signed short int SWORD
;
92 typedef unsigned long int UDWORD
;
93 typedef unsigned short int UWORD
;
94 typedef UDWORD SQLUINTEGER
;
95 typedef signed long SLONG
;
96 typedef signed short SSHORT
;
97 typedef double SDOUBLE
;
98 typedef double LDOUBLE
;
101 typedef signed short RETCODE
;
102 typedef void* SQLHWND
;
105 typedef INT64 SQLLEN
;
106 typedef UINT64 SQLULEN
;
107 typedef UINT64 SQLSETPOSIROW
;
109 #define SQLLEN SQLINTEGER
110 #define SQLULEN SQLUINTEGER
111 #define SQLSETPOSIROW SQLUSMALLINT
114 typedef SQLHANDLE HENV
;
115 typedef SQLHANDLE HDBC
;
116 typedef SQLHANDLE HSTMT
;
120 typedef struct tagDATE_STRUCT
127 #if (ODBCVER >= 0x0300)
128 typedef DATE_STRUCT SQL_DATE_STRUCT
;
131 typedef struct tagTIME_STRUCT
138 #if (ODBCVER >= 0x0300)
139 typedef TIME_STRUCT SQL_TIME_STRUCT
;
142 typedef struct tagTIMESTAMP_STRUCT
150 SQLUINTEGER fraction
;
153 #if (ODBCVER >= 0x0300)
154 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT
;
158 #if (ODBCVER >= 0x0300)
167 SQL_IS_YEAR_TO_MONTH
= 7,
168 SQL_IS_DAY_TO_HOUR
= 8,
169 SQL_IS_DAY_TO_MINUTE
= 9,
170 SQL_IS_DAY_TO_SECOND
= 10,
171 SQL_IS_HOUR_TO_MINUTE
= 11,
172 SQL_IS_HOUR_TO_SECOND
= 12,
173 SQL_IS_MINUTE_TO_SECOND
= 13
178 #if (ODBCVER >= 0x0300)
179 typedef struct tagSQL_YEAR_MONTH
183 } SQL_YEAR_MONTH_STRUCT
;
185 typedef struct tagSQL_DAY_SECOND
191 SQLUINTEGER fraction
;
192 } SQL_DAY_SECOND_STRUCT
;
194 typedef struct tagSQL_INTERVAL_STRUCT
196 SQLINTERVAL interval_type
;
197 SQLSMALLINT interval_sign
;
199 SQL_YEAR_MONTH_STRUCT year_month
;
200 SQL_DAY_SECOND_STRUCT day_second
;
203 } SQL_INTERVAL_STRUCT
;
209 #if (ODBCVER >= 0x0300)
210 #define ODBCINT64 long
212 typedef ODBCINT64 SQLBIGINT
;
213 typedef unsigned ODBCINT64 SQLUBIGINT
;
217 #if (ODBCVER >= 0x0300)
218 #define SQL_MAX_NUMERIC_LEN 16
219 typedef struct tagSQL_NUMERIC_STRUCT
223 SQLCHAR sign
; /* 1=pos 0=neg */
224 SQLCHAR val
[SQL_MAX_NUMERIC_LEN
];
225 } SQL_NUMERIC_STRUCT
;
228 #if (ODBCVER >= 0x0350)
230 typedef GUID SQLGUID
;
232 typedef struct tagSQLGUID
243 typedef unsigned long int BOOKMARK
;
245 #define SQL_WCHAR (-8)
246 #define SQL_C_WCHAR SQL_WCHAR