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
;
32 #if (ODBCVER >= 0x0300)
33 typedef unsigned char SQLDATE
;
34 typedef unsigned char SQLDECIMAL
;
35 typedef double SQLDOUBLE
;
36 typedef double SQLFLOAT
;
39 typedef long SQLINTEGER
;
41 #if (ODBCVER >= 0x0300)
42 typedef unsigned char SQLNUMERIC
;
45 typedef void * SQLPOINTER
;
47 #if (ODBCVER >= 0x0300)
48 typedef float SQLREAL
;
51 typedef signed short int SQLSMALLINT
;
52 typedef unsigned short SQLUSMALLINT
;
54 #if (ODBCVER >= 0x0300)
55 typedef unsigned char SQLTIME
;
56 typedef unsigned char SQLTIMESTAMP
;
57 typedef unsigned char SQLVARCHAR
;
60 typedef SQLSMALLINT SQLRETURN
;
62 /* typedef void * SQLHANDLE; */
64 typedef SQLINTEGER SQLHANDLE
;
65 #if (ODBCVER >= 0x0300)
67 typedef SQLHANDLE SQLHENV
;
68 typedef SQLHANDLE SQLHDBC
;
69 typedef SQLHANDLE SQLHSTMT
;
70 typedef SQLHANDLE SQLHDESC
;
73 typedef SQLINTEGER SQLHENV
;
74 typedef SQLINTEGER SQLHDBC
;
75 typedef SQLINTEGER SQLHSTMT
;
78 typedef signed char SCHAR
;
79 typedef SCHAR SQLSCHAR
;
80 typedef long int SDWORD
;
81 typedef signed short int SWORD
;
82 typedef unsigned long int UDWORD
;
83 typedef unsigned short int UWORD
;
84 typedef UDWORD SQLUINTEGER
;
85 typedef signed long SLONG
;
86 typedef signed short SSHORT
;
87 typedef double SDOUBLE
;
88 typedef double LDOUBLE
;
91 typedef signed short RETCODE
;
92 typedef void* SQLHWND
;
94 typedef SQLHANDLE HENV
;
95 typedef SQLHANDLE HDBC
;
96 typedef SQLHANDLE HSTMT
;
100 typedef struct tagDATE_STRUCT
107 #if (ODBCVER >= 0x0300)
108 typedef DATE_STRUCT SQL_DATE_STRUCT
;
111 typedef struct tagTIME_STRUCT
118 #if (ODBCVER >= 0x0300)
119 typedef TIME_STRUCT SQL_TIME_STRUCT
;
122 typedef struct tagTIMESTAMP_STRUCT
130 SQLUINTEGER fraction
;
133 #if (ODBCVER >= 0x0300)
134 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT
;
138 #if (ODBCVER >= 0x0300)
147 SQL_IS_YEAR_TO_MONTH
= 7,
148 SQL_IS_DAY_TO_HOUR
= 8,
149 SQL_IS_DAY_TO_MINUTE
= 9,
150 SQL_IS_DAY_TO_SECOND
= 10,
151 SQL_IS_HOUR_TO_MINUTE
= 11,
152 SQL_IS_HOUR_TO_SECOND
= 12,
153 SQL_IS_MINUTE_TO_SECOND
= 13
158 #if (ODBCVER >= 0x0300)
159 typedef struct tagSQL_YEAR_MONTH
163 } SQL_YEAR_MONTH_STRUCT
;
165 typedef struct tagSQL_DAY_SECOND
171 SQLUINTEGER fraction
;
172 } SQL_DAY_SECOND_STRUCT
;
174 typedef struct tagSQL_INTERVAL_STRUCT
176 SQLINTERVAL interval_type
;
177 SQLSMALLINT interval_sign
;
179 SQL_YEAR_MONTH_STRUCT year_month
;
180 SQL_DAY_SECOND_STRUCT day_second
;
183 } SQL_INTERVAL_STRUCT
;
189 #if (ODBCVER >= 0x0300)
190 #define ODBCINT64 long
192 typedef ODBCINT64 SQLBIGINT
;
193 typedef unsigned ODBCINT64 SQLUBIGINT
;
197 #if (ODBCVER >= 0x0300)
198 #define SQL_MAX_NUMERIC_LEN 16
199 typedef struct tagSQL_NUMERIC_STRUCT
203 SQLCHAR sign
; /* 1=pos 0=neg */
204 SQLCHAR val
[SQL_MAX_NUMERIC_LEN
];
205 } SQL_NUMERIC_STRUCT
;
208 #if (ODBCVER >= 0x0350)
210 typedef GUID SQLGUID
;
212 typedef struct tagSQLGUID
223 typedef unsigned long int BOOKMARK
;
225 #define SQL_WCHAR (-8)
226 #define SQL_C_WCHAR SQL_WCHAR