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 int 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 #if (ODBCVER >= 0x0300)
73 typedef void *SQLHANDLE
;
74 typedef SQLHANDLE SQLHENV
;
75 typedef SQLHANDLE SQLHDBC
;
76 typedef SQLHANDLE SQLHSTMT
;
77 typedef SQLHANDLE SQLHDESC
;
79 typedef void *SQLHENV
;
80 typedef void *SQLHDBC
;
81 typedef void *SQLHSTMT
;
84 typedef signed char SCHAR
;
85 typedef SCHAR SQLSCHAR
;
87 typedef signed short int SWORD
;
88 typedef unsigned int UDWORD
;
89 typedef unsigned short int UWORD
;
90 typedef UDWORD SQLUINTEGER
;
91 typedef signed long SLONG
;
92 typedef signed short SSHORT
;
93 typedef double SDOUBLE
;
94 typedef double LDOUBLE
;
97 typedef signed short RETCODE
;
98 typedef void* SQLHWND
;
101 typedef INT64 SQLLEN
;
102 typedef UINT64 SQLULEN
;
103 typedef UINT64 SQLSETPOSIROW
;
105 #define SQLLEN SQLINTEGER
106 #define SQLULEN SQLUINTEGER
107 #define SQLSETPOSIROW SQLUSMALLINT
110 typedef SQLHANDLE HENV
;
111 typedef SQLHANDLE HDBC
;
112 typedef SQLHANDLE HSTMT
;
116 typedef struct tagDATE_STRUCT
123 #if (ODBCVER >= 0x0300)
124 typedef DATE_STRUCT SQL_DATE_STRUCT
;
127 typedef struct tagTIME_STRUCT
134 #if (ODBCVER >= 0x0300)
135 typedef TIME_STRUCT SQL_TIME_STRUCT
;
138 typedef struct tagTIMESTAMP_STRUCT
146 SQLUINTEGER fraction
;
149 #if (ODBCVER >= 0x0300)
150 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT
;
154 #if (ODBCVER >= 0x0300)
163 SQL_IS_YEAR_TO_MONTH
= 7,
164 SQL_IS_DAY_TO_HOUR
= 8,
165 SQL_IS_DAY_TO_MINUTE
= 9,
166 SQL_IS_DAY_TO_SECOND
= 10,
167 SQL_IS_HOUR_TO_MINUTE
= 11,
168 SQL_IS_HOUR_TO_SECOND
= 12,
169 SQL_IS_MINUTE_TO_SECOND
= 13
174 #if (ODBCVER >= 0x0300)
175 typedef struct tagSQL_YEAR_MONTH
179 } SQL_YEAR_MONTH_STRUCT
;
181 typedef struct tagSQL_DAY_SECOND
187 SQLUINTEGER fraction
;
188 } SQL_DAY_SECOND_STRUCT
;
190 typedef struct tagSQL_INTERVAL_STRUCT
192 SQLINTERVAL interval_type
;
193 SQLSMALLINT interval_sign
;
195 SQL_YEAR_MONTH_STRUCT year_month
;
196 SQL_DAY_SECOND_STRUCT day_second
;
199 } SQL_INTERVAL_STRUCT
;
205 #if (ODBCVER >= 0x0300)
206 #define ODBCINT64 __int64
207 #define UODBCINT64 unsigned __int64
209 typedef ODBCINT64 SQLBIGINT
;
210 typedef unsigned ODBCINT64 SQLUBIGINT
;
214 #if (ODBCVER >= 0x0300)
215 #define SQL_MAX_NUMERIC_LEN 16
216 typedef struct tagSQL_NUMERIC_STRUCT
220 SQLCHAR sign
; /* 1=pos 0=neg */
221 SQLCHAR val
[SQL_MAX_NUMERIC_LEN
];
222 } SQL_NUMERIC_STRUCT
;
225 #if (ODBCVER >= 0x0350)
227 typedef GUID SQLGUID
;
229 typedef struct tagSQLGUID
240 typedef SQLULEN BOOKMARK
;
242 #define SQL_WCHAR (-8)
243 #define SQL_C_WCHAR SQL_WCHAR