]> git.saurik.com Git - wxWidgets.git/blob - src/iodbc/isql.h
fixes
[wxWidgets.git] / src / iodbc / isql.h
1 #ifndef _INTRINSIC_SQL_H
2 # define _INTRINSIC_SQL_H
3
4 typedef unsigned char UCHAR;
5 typedef long int SDWORD;
6 typedef short int SWORD;
7 typedef unsigned long int UDWORD;
8 typedef unsigned short int UWORD;
9
10 typedef void FAR* PTR;
11
12 typedef void FAR* HENV;
13 typedef void FAR* HDBC;
14 typedef void FAR* HSTMT;
15
16 typedef signed short RETCODE;
17
18 # ifdef WIN32
19 # define SQL_API __stdcall
20 # else
21 # define SQL_API EXPORT CALLBACK
22 # endif
23
24 # define ODBCVER 0x0200
25
26 # define SQL_MAX_MESSAGE_LENGTH 512
27 # define SQL_MAX_DSN_LENGTH 32
28
29 /* return code */
30 # define SQL_INVALID_HANDLE (-2)
31 # define SQL_ERROR (-1)
32 # define SQL_SUCCESS 0
33 # define SQL_SUCCESS_WITH_INFO 1
34 # define SQL_NO_DATA_FOUND 100
35
36 /* standard SQL datatypes (agree with ANSI type numbering) */
37 # define SQL_CHAR 1
38 # define SQL_NUMERIC 2
39 # define SQL_DECIMAL 3
40 # define SQL_INTEGER 4
41 # define SQL_SMALLINT 5
42 # define SQL_FLOAT 6
43 # define SQL_REAL 7
44 # define SQL_DOUBLE 8
45 # define SQL_VARCHAR 12
46
47 # define SQL_TYPE_MIN SQL_CHAR
48 # define SQL_TYPE_NULL 0
49 # define SQL_TYPE_MAX SQL_VARCHAR
50
51 /* C to SQL datatype mapping */
52 # define SQL_C_CHAR SQL_CHAR
53 # define SQL_C_LONG SQL_INTEGER
54 # define SQL_C_SHORT SQL_SMALLINT
55 # define SQL_C_FLOAT SQL_REAL
56 # define SQL_C_DOUBLE SQL_DOUBLE
57 # define SQL_C_DEFAULT 99
58
59 # define SQL_NO_NULLS 0
60 # define SQL_NULLABLE 1
61 # define SQL_NULLABLE_UNKNOWN 2
62
63 /* some special length values */
64 # define SQL_NULL_DATA (-1)
65 # define SQL_DATA_AT_EXEC (-2)
66 # define SQL_NTS (-3)
67
68 /* SQLFreeStmt flag values */
69 # define SQL_CLOSE 0
70 # define SQL_DROP 1
71 # define SQL_UNBIND 2
72 # define SQL_RESET_PARAMS 3
73
74 /* SQLTransact flag values */
75 # define SQL_COMMIT 0
76 # define SQL_ROLLBACK 1
77
78 /* SQLColAttributes flag values */
79 # define SQL_COLUMN_COUNT 0
80 # define SQL_COLUMN_LABEL 18
81 # define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
82 # define SQL_COLUMN_DRIVER_START 1000
83
84 # define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
85
86 /* Null handles */
87 # define SQL_NULL_HENV 0
88 # define SQL_NULL_HDBC 0
89 # define SQL_NULL_HSTMT 0
90
91 #endif