]>
git.saurik.com Git - wxWidgets.git/blob - src/iodbc/isql.h
1 #ifndef _INTRINSIC_SQL_H
2 # define _INTRINSIC_SQL_H
5 typedef unsigned char UCHAR
;
7 typedef long int SDWORD
;
8 typedef short int SWORD
;
9 typedef unsigned long int UDWORD
;
10 typedef unsigned short int UWORD
;
11 typedef unsigned int UINT
;
23 typedef HANDLE HGLOBAL
;
25 #ifndef SQL_INDEX_OTHER
26 #define SQL_INDEX_OTHER 3
36 # define FALSE (0 != 0)
56 # ifndef SQL_LOCAL_API
57 # define SQL_LOCAL_API
60 # define TRUE (0 == 0)
63 typedef struct tagDATE_STRUCT
70 typedef struct tagTIME_STRUCT
77 typedef struct tagTIMESTAMP_STRUCT
90 typedef UCHAR FAR
* PTR
,
93 typedef void FAR
* HENV
,
95 typedef void FAR
* HDBC
,
97 typedef void FAR
* HSTMT
,
99 typedef SDWORD SQLINTEGER
;
100 typedef signed short RETCODE
;
101 typedef UCHAR SQLCHAR
;
102 typedef UWORD SQLUSMALLINT
;
103 typedef PTR SQLPOINTER
;
104 typedef SWORD SQLSMALLINT
;
105 typedef UDWORD SQLUINTEGER
;
108 # define SQL_API __stdcall
110 # define SQL_API /* giovanni EXPORT CALLBACK */
115 # define _System _syscall
118 # define SQL_API _System
123 # define ODBCVER 0x0200
126 # define SQL_MAX_MESSAGE_LENGTH 512
127 # define SQL_MAX_DSN_LENGTH 32
130 # define SQL_INVALID_HANDLE (-2)
131 # define SQL_ERROR (-1)
132 # define SQL_SUCCESS 0
133 # define SQL_SUCCESS_WITH_INFO 1
134 # define SQL_NO_DATA_FOUND 100
136 /* standard SQL datatypes (agree with ANSI type numbering) */
138 # define SQL_NUMERIC 2
139 # define SQL_DECIMAL 3
140 # define SQL_INTEGER 4
141 # define SQL_SMALLINT 5
144 # define SQL_DOUBLE 8
145 # define SQL_VARCHAR 12
147 # define SQL_TYPE_MIN SQL_CHAR
148 # define SQL_TYPE_NULL 0
149 # define SQL_TYPE_MAX SQL_VARCHAR
151 /* C to SQL datatype mapping */
152 # define SQL_C_CHAR SQL_CHAR
153 # define SQL_C_LONG SQL_INTEGER
154 # define SQL_C_SHORT SQL_SMALLINT
155 # define SQL_C_FLOAT SQL_REAL
156 # define SQL_C_DOUBLE SQL_DOUBLE
157 # define SQL_C_DEFAULT 99
159 # define SQL_NO_NULLS 0
160 # define SQL_NULLABLE 1
161 # define SQL_NULLABLE_UNKNOWN 2
163 /* some special length values */
164 # define SQL_NULL_DATA (-1)
165 # define SQL_DATA_AT_EXEC (-2)
166 # define SQL_NTS (-3)
168 /* SQLFreeStmt flag values */
171 # define SQL_UNBIND 2
172 # define SQL_RESET_PARAMS 3
174 /* SQLTransact flag values */
175 # define SQL_COMMIT 0
176 # define SQL_ROLLBACK 1
178 /* SQLColAttributes flag values */
179 # define SQL_COLUMN_COUNT 0
180 # define SQL_COLUMN_LABEL 18
181 # define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
182 # define SQL_COLUMN_DRIVER_START 1000
184 # define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
187 # define SQL_NULL_HENV 0
188 # define SQL_NULL_HDBC 0
189 # define SQL_NULL_HSTMT 0