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 #if defined(WINE_UNICODE_NATIVE)
32 typedef wchar_t SQLWCHAR
;
33 #elif __cpp_unicode_literals >= 200710
34 typedef char16_t SQLWCHAR
;
36 typedef unsigned short SQLWCHAR
;
39 typedef SQLCHAR SQLTCHAR
;
41 typedef SQLWCHAR SQLTCHAR
;
44 #if (ODBCVER >= 0x0300)
45 typedef unsigned char SQLDATE
;
46 typedef unsigned char SQLDECIMAL
;
47 typedef double SQLDOUBLE
;
48 typedef double SQLFLOAT
;
51 typedef int SQLINTEGER
;
53 #if (ODBCVER >= 0x0300)
54 typedef unsigned char SQLNUMERIC
;
57 typedef void * SQLPOINTER
;
59 #if (ODBCVER >= 0x0300)
60 typedef float SQLREAL
;
63 typedef signed short int SQLSMALLINT
;
64 typedef unsigned short SQLUSMALLINT
;
66 #if (ODBCVER >= 0x0300)
67 typedef unsigned char SQLTIME
;
68 typedef unsigned char SQLTIMESTAMP
;
69 typedef unsigned char SQLVARCHAR
;
72 typedef SQLSMALLINT SQLRETURN
;
74 #if (ODBCVER >= 0x0300)
75 typedef void *SQLHANDLE
;
76 typedef SQLHANDLE SQLHENV
;
77 typedef SQLHANDLE SQLHDBC
;
78 typedef SQLHANDLE SQLHSTMT
;
79 typedef SQLHANDLE SQLHDESC
;
81 typedef void *SQLHENV
;
82 typedef void *SQLHDBC
;
83 typedef void *SQLHSTMT
;
86 typedef signed char SCHAR
;
87 typedef SCHAR SQLSCHAR
;
89 typedef signed short int SWORD
;
90 typedef unsigned int UDWORD
;
91 typedef unsigned short int UWORD
;
92 typedef UDWORD SQLUINTEGER
;
93 typedef signed long SLONG
;
94 typedef signed short SSHORT
;
95 typedef double SDOUBLE
;
96 typedef double LDOUBLE
;
99 typedef signed short RETCODE
;
100 typedef void* SQLHWND
;
103 typedef INT64 SQLLEN
;
104 typedef UINT64 SQLULEN
;
105 typedef UINT64 SQLSETPOSIROW
;
107 #define SQLLEN SQLINTEGER
108 #define SQLULEN SQLUINTEGER
109 #define SQLSETPOSIROW SQLUSMALLINT
112 typedef SQLHANDLE HENV
;
113 typedef SQLHANDLE HDBC
;
114 typedef SQLHANDLE HSTMT
;
118 typedef struct tagDATE_STRUCT
125 #if (ODBCVER >= 0x0300)
126 typedef DATE_STRUCT SQL_DATE_STRUCT
;
129 typedef struct tagTIME_STRUCT
136 #if (ODBCVER >= 0x0300)
137 typedef TIME_STRUCT SQL_TIME_STRUCT
;
140 typedef struct tagTIMESTAMP_STRUCT
148 SQLUINTEGER fraction
;
151 #if (ODBCVER >= 0x0300)
152 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT
;
156 #if (ODBCVER >= 0x0300)
165 SQL_IS_YEAR_TO_MONTH
= 7,
166 SQL_IS_DAY_TO_HOUR
= 8,
167 SQL_IS_DAY_TO_MINUTE
= 9,
168 SQL_IS_DAY_TO_SECOND
= 10,
169 SQL_IS_HOUR_TO_MINUTE
= 11,
170 SQL_IS_HOUR_TO_SECOND
= 12,
171 SQL_IS_MINUTE_TO_SECOND
= 13
176 #if (ODBCVER >= 0x0300)
177 typedef struct tagSQL_YEAR_MONTH
181 } SQL_YEAR_MONTH_STRUCT
;
183 typedef struct tagSQL_DAY_SECOND
189 SQLUINTEGER fraction
;
190 } SQL_DAY_SECOND_STRUCT
;
192 typedef struct tagSQL_INTERVAL_STRUCT
194 SQLINTERVAL interval_type
;
195 SQLSMALLINT interval_sign
;
197 SQL_YEAR_MONTH_STRUCT year_month
;
198 SQL_DAY_SECOND_STRUCT day_second
;
201 } SQL_INTERVAL_STRUCT
;
207 #if (ODBCVER >= 0x0300)
208 #define ODBCINT64 __int64
209 #define UODBCINT64 unsigned __int64
211 typedef ODBCINT64 SQLBIGINT
;
212 typedef unsigned ODBCINT64 SQLUBIGINT
;
216 #if (ODBCVER >= 0x0300)
217 #define SQL_MAX_NUMERIC_LEN 16
218 typedef struct tagSQL_NUMERIC_STRUCT
222 SQLCHAR sign
; /* 1=pos 0=neg */
223 SQLCHAR val
[SQL_MAX_NUMERIC_LEN
];
224 } SQL_NUMERIC_STRUCT
;
227 #if (ODBCVER >= 0x0350)
229 typedef GUID SQLGUID
;
231 typedef struct tagSQLGUID
242 typedef SQLULEN BOOKMARK
;