]> git.saurik.com Git - wxWidgets.git/blame - src/iodbc/postgres/isql.h
Fixes for WXWIN_COMPATIBILITY, and BC++ fix for event.cpp
[wxWidgets.git] / src / iodbc / postgres / isql.h
CommitLineData
1a6944fd
RR
1#ifndef _INTRINSIC_SQL_H
2# define _INTRINSIC_SQL_H
3
4#ifndef OS2
5typedef unsigned char UCHAR;
6#endif
7typedef long int SDWORD;
8typedef short int SWORD;
9typedef unsigned long int UDWORD;
10typedef unsigned short int UWORD;
11
12#ifndef FAR
13# define FAR
14#endif
15#ifndef NEAR
16# define NEAR
17#endif
18#ifndef HANDLE
19 typedef int HANDLE;
20 #endif
21#ifndef HGLOBAL
22 typedef HANDLE HGLOBAL;
23 #endif
24#ifndef SQL_INDEX_OTHER
25#define SQL_INDEX_OTHER 3
26 #endif
27
28# ifndef BOOL
29# define BOOL int
30# endif
31# ifndef CHAR
32# define CHAR char
33# endif
34# ifndef FALSE
35# define FALSE (0 != 0)
36# endif
37# ifndef HWND
38# define HWND int
39# endif
40# ifndef SQLHWND
41# define SQLHWND int
42# endif
43# ifndef LONG
44# define LONG long
45# endif
46# ifndef PASCAL
47# define PASCAL
48# endif
49# ifndef SHORT
50# define SHORT short
51# endif
52# ifndef SQL_API
53# define SQL_API
54# endif
55# ifndef SQL_LOCAL_API
56# define SQL_LOCAL_API
57# endif
58# ifndef TRUE
59# define TRUE (0 == 0)
60# endif
61
62typedef struct tagDATE_STRUCT
63{
64SWORD year;
65UWORD month;
66UWORD day;
67} DATE_STRUCT;
68
69typedef struct tagTIME_STRUCT
70{
71UWORD hour;
72UWORD minute;
73UWORD second;
74} TIME_STRUCT;
75
76typedef struct tagTIMESTAMP_STRUCT
77{
78SWORD year;
79UWORD month;
80UWORD day;
81UWORD hour;
82UWORD minute;
83UWORD second;
84UDWORD fraction;
85} TIMESTAMP_STRUCT;
86
87
88
89typedef UCHAR FAR* PTR,
90 FAR* SQLPTR;
91
92typedef void FAR* HENV,
93 FAR* SQLHENV;
94typedef void FAR* HDBC,
95 FAR* SQLHDBC;
96typedef void FAR* HSTMT,
97 FAR* SQLHSTMT;
98typedef SDWORD SQLINTEGER;
99typedef signed short RETCODE;
100typedef UCHAR SQLCHAR;
101typedef UWORD SQLUSMALLINT;
102typedef PTR SQLPOINTER;
103typedef SWORD SQLSMALLINT;
104typedef UDWORD SQLUINTEGER;
105
106# ifdef WIN32
107# define SQL_API __stdcall
108# else
109# define SQL_API /* giovanni EXPORT CALLBACK */
110# endif
111# ifdef OS2
112# ifdef BCPP
113# define _Optlink
114# define _System _syscall
115# endif
116# undef SQL_API
117# define SQL_API _System
118# endif
119
120# define ODBCVER 0x0200
121
122# define SQL_MAX_MESSAGE_LENGTH 512
123# define SQL_MAX_DSN_LENGTH 32
124
125/* return code */
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
131
132/* standard SQL datatypes (agree with ANSI type numbering) */
133# define SQL_CHAR 1
134# define SQL_NUMERIC 2
135# define SQL_DECIMAL 3
136# define SQL_INTEGER 4
137# define SQL_SMALLINT 5
138# define SQL_FLOAT 6
139# define SQL_REAL 7
140# define SQL_DOUBLE 8
141# define SQL_VARCHAR 12
142
143# define SQL_TYPE_MIN SQL_CHAR
144# define SQL_TYPE_NULL 0
145# define SQL_TYPE_MAX SQL_VARCHAR
146
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
154
155# define SQL_NO_NULLS 0
156# define SQL_NULLABLE 1
157# define SQL_NULLABLE_UNKNOWN 2
158
159/* some special length values */
160# define SQL_NULL_DATA (-1)
161# define SQL_DATA_AT_EXEC (-2)
162# define SQL_NTS (-3)
163
164/* SQLFreeStmt flag values */
165# define SQL_CLOSE 0
166# define SQL_DROP 1
167# define SQL_UNBIND 2
168# define SQL_RESET_PARAMS 3
169
170/* SQLTransact flag values */
171# define SQL_COMMIT 0
172# define SQL_ROLLBACK 1
173
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
179
180# define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
181
182/* Null handles */
183# define SQL_NULL_HENV 0
184# define SQL_NULL_HDBC 0
185# define SQL_NULL_HSTMT 0
186
187#endif
188