]>
git.saurik.com Git - wxWidgets.git/blob - src/iodbc/postgres/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
;
22 typedef HANDLE HGLOBAL
;
24 #ifndef SQL_INDEX_OTHER
25 #define SQL_INDEX_OTHER 3
35 # define FALSE (0 != 0)
55 # ifndef SQL_LOCAL_API
56 # define SQL_LOCAL_API
59 # define TRUE (0 == 0)
62 typedef struct tagDATE_STRUCT
69 typedef struct tagTIME_STRUCT
76 typedef struct tagTIMESTAMP_STRUCT
89 typedef UCHAR FAR
* PTR
,
92 typedef void FAR
* HENV
,
94 typedef void FAR
* HDBC
,
96 typedef void FAR
* HSTMT
,
98 typedef SDWORD SQLINTEGER
;
99 typedef signed short RETCODE
;
100 typedef UCHAR SQLCHAR
;
101 typedef UWORD SQLUSMALLINT
;
102 typedef PTR SQLPOINTER
;
103 typedef SWORD SQLSMALLINT
;
104 typedef UDWORD SQLUINTEGER
;
107 # define SQL_API __stdcall
109 # define SQL_API /* giovanni EXPORT CALLBACK */
114 # define _System _syscall
117 # define SQL_API _System
120 # define ODBCVER 0x0200
122 # define SQL_MAX_MESSAGE_LENGTH 512
123 # define SQL_MAX_DSN_LENGTH 32
126 # define SQL_INVALID_HANDLE (-2)
127 # define SQL_ERROR (-1)
128 # define SQL_SUCCESS 0
129 # define SQL_SUCCESS_WITH_INFO 1
130 # define SQL_NO_DATA_FOUND 100
132 /* standard SQL datatypes (agree with ANSI type numbering) */
134 # define SQL_NUMERIC 2
135 # define SQL_DECIMAL 3
136 # define SQL_INTEGER 4
137 # define SQL_SMALLINT 5
140 # define SQL_DOUBLE 8
141 # define SQL_VARCHAR 12
143 # define SQL_TYPE_MIN SQL_CHAR
144 # define SQL_TYPE_NULL 0
145 # define SQL_TYPE_MAX SQL_VARCHAR
147 /* C to SQL datatype mapping */
148 # define SQL_C_CHAR SQL_CHAR
149 # define SQL_C_LONG SQL_INTEGER
150 # define SQL_C_SHORT SQL_SMALLINT
151 # define SQL_C_FLOAT SQL_REAL
152 # define SQL_C_DOUBLE SQL_DOUBLE
153 # define SQL_C_DEFAULT 99
155 # define SQL_NO_NULLS 0
156 # define SQL_NULLABLE 1
157 # define SQL_NULLABLE_UNKNOWN 2
159 /* some special length values */
160 # define SQL_NULL_DATA (-1)
161 # define SQL_DATA_AT_EXEC (-2)
162 # define SQL_NTS (-3)
164 /* SQLFreeStmt flag values */
167 # define SQL_UNBIND 2
168 # define SQL_RESET_PARAMS 3
170 /* SQLTransact flag values */
171 # define SQL_COMMIT 0
172 # define SQL_ROLLBACK 1
174 /* SQLColAttributes flag values */
175 # define SQL_COLUMN_COUNT 0
176 # define SQL_COLUMN_LABEL 18
177 # define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
178 # define SQL_COLUMN_DRIVER_START 1000
180 # define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
183 # define SQL_NULL_HENV 0
184 # define SQL_NULL_HDBC 0
185 # define SQL_NULL_HSTMT 0