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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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;
104 typedef SQLHANDLE HENV;
105 typedef SQLHANDLE HDBC;
106 typedef SQLHANDLE HSTMT;
110 typedef struct tagDATE_STRUCT
117 #if (ODBCVER >= 0x0300)
118 typedef DATE_STRUCT SQL_DATE_STRUCT;
121 typedef struct tagTIME_STRUCT
128 #if (ODBCVER >= 0x0300)
129 typedef TIME_STRUCT SQL_TIME_STRUCT;
132 typedef struct tagTIMESTAMP_STRUCT
140 SQLUINTEGER fraction;
143 #if (ODBCVER >= 0x0300)
144 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
148 #if (ODBCVER >= 0x0300)
157 SQL_IS_YEAR_TO_MONTH = 7,
158 SQL_IS_DAY_TO_HOUR = 8,
159 SQL_IS_DAY_TO_MINUTE = 9,
160 SQL_IS_DAY_TO_SECOND = 10,
161 SQL_IS_HOUR_TO_MINUTE = 11,
162 SQL_IS_HOUR_TO_SECOND = 12,
163 SQL_IS_MINUTE_TO_SECOND = 13
168 #if (ODBCVER >= 0x0300)
169 typedef struct tagSQL_YEAR_MONTH
173 } SQL_YEAR_MONTH_STRUCT;
175 typedef struct tagSQL_DAY_SECOND
181 SQLUINTEGER fraction;
182 } SQL_DAY_SECOND_STRUCT;
184 typedef struct tagSQL_INTERVAL_STRUCT
186 SQLINTERVAL interval_type;
187 SQLSMALLINT interval_sign;
189 SQL_YEAR_MONTH_STRUCT year_month;
190 SQL_DAY_SECOND_STRUCT day_second;
193 } SQL_INTERVAL_STRUCT;
199 #if (ODBCVER >= 0x0300)
200 #define ODBCINT64 long
202 typedef ODBCINT64 SQLBIGINT;
203 typedef unsigned ODBCINT64 SQLUBIGINT;
207 #if (ODBCVER >= 0x0300)
208 #define SQL_MAX_NUMERIC_LEN 16
209 typedef struct tagSQL_NUMERIC_STRUCT
213 SQLCHAR sign; /* 1=pos 0=neg */
214 SQLCHAR val[SQL_MAX_NUMERIC_LEN];
215 } SQL_NUMERIC_STRUCT;
218 #if (ODBCVER >= 0x0350)
220 typedef GUID SQLGUID;
222 typedef struct tagSQLGUID
233 typedef unsigned long int BOOKMARK;
235 #define SQL_WCHAR (-8)
236 #define SQL_C_WCHAR SQL_WCHAR