Loading...
Searching...
No Matches
constants.f90
1module odbc_constants
2 use, intrinsic :: iso_c_binding, only: c_short, &
3 c_int, &
4 c_long, &
5 c_long_long, &
6 c_char, &
7 c_ptr, &
8 c_null_ptr, &
9 sqlchar => c_char, &
10 sqltchar => c_char, &
11 sqlnumeric => c_char, &
12 sqlpointer => c_ptr, &
13 sqlreal => c_float, &
14 sqlsmallint => c_short, &
15 sqlusmallint => c_short, &
16 sqlinteger => c_int, &
17 sqluinteger => c_int, &
18 sqllen => c_long, &
19 sqlulen => c_long, &
20 sqlsetposirow => c_long, &
21 sqltime => c_char, &
22 sqltimestamp => c_char, &
23 sqlvarchar => c_char, &
24 sqlreturn => c_short, &
25 sqlhandle => c_ptr, &
26 sqlhenv => c_ptr, &
27 sqlhdbc => c_ptr, &
28 sqlhstmt => c_ptr, &
29 sqlhdesc => c_ptr, &
30 henv => c_ptr, &
31 hdbc => c_ptr, &
32 hstmt => c_ptr
33
34 implicit none; private
35
36 public :: sqlnumeric, &
37 sqlpointer, &
38 sqlreal, &
39 sqlsmallint, &
40 sqlusmallint, &
41 sqlinteger, &
42 sqluinteger, &
43 sqllen, &
44 sqlulen, &
45 sqlsetposirow, &
46 sqltime, &
47 sqltimestamp, &
48 sqlvarchar, &
49 sqlreturn, &
50 sqlhandle, &
51 sqlhenv, &
52 sqlhdbc, &
53 sqlhstmt, &
54 sqlhdesc, &
55 henv, &
56 hdbc, &
57 hstmt, &
58 sqlchar, &
59 sqltchar
60
61 public :: trim
62
63 character(kind=c_char), public :: STR_NULL_PTR = transfer(c_null_ptr, '')
64 integer(kind=c_short), public :: SHORT_NULL_PTR = transfer(c_null_ptr, 0_c_short)
65 integer(kind=c_long), public :: LONG_NULL_PTR = transfer(c_null_ptr, 0_c_long)
66
67 !from sql.h
68 integer(C_SHORT), parameter, public :: SQL_NULL_DATA = -1
69 integer(C_SHORT), parameter, public :: SQL_DATA_AT_EXEC = -2
70 integer(C_SHORT), parameter, public :: SQL_SUCCESS = 0
71 integer(C_SHORT), parameter, public :: SQL_SUCCESS_WITH_INFO = 1
72 integer(C_SHORT), parameter, public :: SQL_NO_DATA = 100
73 integer(C_SHORT), parameter, public :: SQL_ERROR = -1
74 integer(C_SHORT), parameter, public :: SQL_INVALID_HANDLE = -2
75 integer(C_SHORT), parameter, public :: SQL_STILL_EXECUTING = 2
76 integer(C_SHORT), parameter, public :: SQL_NEED_DATA = 99
77 integer(C_SHORT), parameter, public :: SQL_PARAM_DATA_AVAILABLE = 101
78 integer(C_INT), parameter, public :: SQL_NTS = -3
79 integer(C_INT), parameter, public :: SQL_NTSL = -3
80 integer(C_SHORT), parameter, public :: SQL_MAX_MESSAGE_LENGTH = 512
81 integer(C_SHORT), parameter, public :: SQL_DATE_LEN = 10
82 integer(C_SHORT), parameter, public :: SQL_TIME_LEN = 8
83 integer(C_SHORT), parameter, public :: SQL_TIMESTAMP_LEN = 19
84 integer(C_SHORT), parameter, public :: SQL_HANDLE_ENV = 1
85 integer(C_SHORT), parameter, public :: SQL_HANDLE_DBC = 2
86 integer(C_SHORT), parameter, public :: SQL_HANDLE_STMT = 3
87 integer(C_SHORT), parameter, public :: SQL_HANDLE_DESC = 4
88 integer(C_INT), parameter, public :: SQL_ATTR_OUTPUT_NTS = 10001
89 integer(C_INT), parameter, public :: SQL_ATTR_AUTO_IPD = 10001
90 integer(C_INT), parameter, public :: SQL_ATTR_METADATA_ID = 10014
91 integer(C_INT), parameter, public :: SQL_ATTR_APP_ROW_DESC = 10010
92 integer(C_INT), parameter, public :: SQL_ATTR_APP_PARAM_DESC = 10011
93 integer(C_INT), parameter, public :: SQL_ATTR_IMP_ROW_DESC = 10012
94 integer(C_INT), parameter, public :: SQL_ATTR_IMP_PARAM_DESC = 10013
95 integer(C_INT), parameter, public :: SQL_ATTR_CURSOR_SCROLLABLE = -1
96 integer(C_INT), parameter, public :: SQL_ATTR_CURSOR_SENSITIVITY = -2
97 integer(C_SHORT), parameter, public :: SQL_NONSCROLLABLE = 0
98 integer(C_SHORT), parameter, public :: SQL_SCROLLABLE = 1
99 integer(C_SHORT), parameter, public :: SQL_DESC_COUNT = 1001
100 integer(C_SHORT), parameter, public :: SQL_DESC_TYPE = 1002
101 integer(C_SHORT), parameter, public :: SQL_DESC_LENGTH = 1003
102 integer(C_SHORT), parameter, public :: SQL_DESC_OCTET_LENGTH_PTR = 1004
103 integer(C_SHORT), parameter, public :: SQL_DESC_PRECISION = 1005
104 integer(C_SHORT), parameter, public :: SQL_DESC_SCALE = 1006
105 integer(C_SHORT), parameter, public :: SQL_DESC_DATETIME_INTERVAL_CODE = 1007
106 integer(C_SHORT), parameter, public :: SQL_DESC_NULLABLE = 1008
107 integer(C_SHORT), parameter, public :: SQL_DESC_INDICATOR_PTR = 1009
108 integer(C_SHORT), parameter, public :: SQL_DESC_DATA_PTR = 1010
109 integer(C_SHORT), parameter, public :: SQL_DESC_NAME = 1011
110 integer(C_SHORT), parameter, public :: SQL_DESC_UNNAMED = 1012
111 integer(C_SHORT), parameter, public :: SQL_DESC_OCTET_LENGTH = 1013
112 integer(C_SHORT), parameter, public :: SQL_DESC_ALLOC_TYPE = 1099
113 integer(C_SHORT), parameter, public :: SQL_DIAG_RETURNCODE = 1
114 integer(C_SHORT), parameter, public :: SQL_DIAG_NUMBER = 2
115 integer(C_SHORT), parameter, public :: SQL_DIAG_ROW_COUNT = 3
116 integer(C_SHORT), parameter, public :: SQL_DIAG_SQLSTATE = 4
117 integer(C_SHORT), parameter, public :: SQL_DIAG_NATIVE = 5
118 integer(C_SHORT), parameter, public :: SQL_DIAG_MESSAGE_TEXT = 6
119 integer(C_SHORT), parameter, public :: SQL_DIAG_DYNAMIC_FUNCTION = 7
120 integer(C_SHORT), parameter, public :: SQL_DIAG_CLASS_ORIGIN = 8
121 integer(C_SHORT), parameter, public :: SQL_DIAG_SUBCLASS_ORIGIN = 9
122 integer(C_SHORT), parameter, public :: SQL_DIAG_CONNECTION_NAME = 10
123 integer(C_SHORT), parameter, public :: SQL_DIAG_SERVER_NAME = 11
124 integer(C_SHORT), parameter, public :: SQL_DIAG_DYNAMIC_FUNCTION_CODE = 12
125 integer(C_SHORT), parameter, public :: SQL_DIAG_ALTER_DOMAIN = 3
126 integer(C_SHORT), parameter, public :: SQL_DIAG_ALTER_TABLE = 4
127 integer(C_SHORT), parameter, public :: SQL_DIAG_CALL = 7
128 integer(C_SHORT), parameter, public :: SQL_DIAG_CREATE_ASSERTION = 6
129 integer(C_SHORT), parameter, public :: SQL_DIAG_CREATE_CHARACTER_SET = 8
130 integer(C_SHORT), parameter, public :: SQL_DIAG_CREATE_COLLATION = 10
131 integer(C_SHORT), parameter, public :: SQL_DIAG_CREATE_DOMAIN = 23
132 integer(C_SHORT), parameter, public :: SQL_DIAG_CREATE_INDEX = -1
133 integer(C_SHORT), parameter, public :: SQL_DIAG_CREATE_SCHEMA = 64
134 integer(C_SHORT), parameter, public :: SQL_DIAG_CREATE_TABLE = 77
135 integer(C_SHORT), parameter, public :: SQL_DIAG_CREATE_TRANSLATION = 79
136 integer(C_SHORT), parameter, public :: SQL_DIAG_CREATE_VIEW = 84
137 integer(C_SHORT), parameter, public :: SQL_DIAG_DELETE_WHERE = 19
138 integer(C_SHORT), parameter, public :: SQL_DIAG_DROP_ASSERTION = 24
139 integer(C_SHORT), parameter, public :: SQL_DIAG_DROP_CHARACTER_SET = 25
140 integer(C_SHORT), parameter, public :: SQL_DIAG_DROP_COLLATION = 26
141 integer(C_SHORT), parameter, public :: SQL_DIAG_DROP_DOMAIN = 27
142 integer(C_SHORT), parameter, public :: SQL_DIAG_DROP_INDEX = -2
143 integer(C_SHORT), parameter, public :: SQL_DIAG_DROP_SCHEMA = 31
144 integer(C_SHORT), parameter, public :: SQL_DIAG_DROP_TABLE = 32
145 integer(C_SHORT), parameter, public :: SQL_DIAG_DROP_TRANSLATION = 33
146 integer(C_SHORT), parameter, public :: SQL_DIAG_DROP_VIEW = 36
147 integer(C_SHORT), parameter, public :: SQL_DIAG_DYNAMIC_DELETE_CURSOR = 38
148 integer(C_SHORT), parameter, public :: SQL_DIAG_DYNAMIC_UPDATE_CURSOR = 81
149 integer(C_SHORT), parameter, public :: SQL_DIAG_GRANT = 48
150 integer(C_SHORT), parameter, public :: SQL_DIAG_INSERT = 50
151 integer(C_SHORT), parameter, public :: SQL_DIAG_REVOKE = 59
152 integer(C_SHORT), parameter, public :: SQL_DIAG_SELECT_CURSOR = 85
153 integer(C_SHORT), parameter, public :: SQL_DIAG_UNKNOWN_STATEMENT = 0
154 integer(C_SHORT), parameter, public :: SQL_DIAG_UPDATE_WHERE = 82
155 integer(C_SHORT), parameter, public :: SQL_UNKNOWN_TYPE = 0
156 integer(C_SHORT), parameter, public :: SQL_CHAR = 1
157 integer(C_SHORT), parameter, public :: SQL_NUMERIC = 2
158 integer(C_SHORT), parameter, public :: SQL_DECIMAL = 3
159 integer(C_SHORT), parameter, public :: SQL_INTEGER = 4
160 integer(C_SHORT), parameter, public :: SQL_SMALLINT = 5
161 integer(C_SHORT), parameter, public :: SQL_FLOAT = 6
162 integer(C_SHORT), parameter, public :: SQL_REAL = 7
163 integer(C_SHORT), parameter, public :: SQL_DOUBLE = 8
164 integer(C_SHORT), parameter, public :: SQL_DATETIME = 9
165 integer(C_SHORT), parameter, public :: SQL_VARCHAR = 12
166 integer(C_SHORT), parameter, public :: SQL_TYPE_DATE = 91
167 integer(C_SHORT), parameter, public :: SQL_TYPE_TIME = 92
168 integer(C_SHORT), parameter, public :: SQL_TYPE_TIMESTAMP = 93
169 integer(C_SHORT), parameter, public :: SQL_UNSPECIFIED = 0
170 integer(C_SHORT), parameter, public :: SQL_INSENSITIVE = 1
171 integer(C_SHORT), parameter, public :: SQL_SENSITIVE = 2
172 integer(C_SHORT), parameter, public :: SQL_ALL_TYPES = 0
173 integer(C_SHORT), parameter, public :: SQL_DEFAULT = 99
174 integer(C_SHORT), parameter, public :: SQL_ARD_TYPE = -99
175 integer(C_SHORT), parameter, public :: SQL_CODE_DATE = 1
176 integer(C_SHORT), parameter, public :: SQL_CODE_TIME = 2
177 integer(C_SHORT), parameter, public :: SQL_CODE_TIMESTAMP = 3
178 integer(C_SHORT), parameter, public :: SQL_FALSE = 0
179 integer(C_SHORT), parameter, public :: SQL_TRUE = 1
180 integer(C_SHORT), parameter, public :: SQL_NO_NULLS = 0
181 integer(C_SHORT), parameter, public :: SQL_NULLABLE = 1
182 integer(C_SHORT), parameter, public :: SQL_NULLABLE_UNKNOWN = 2
183 integer(C_SHORT), parameter, public :: SQL_PRED_NONE = 0
184 integer(C_SHORT), parameter, public :: SQL_PRED_CHAR = 1
185 integer(C_SHORT), parameter, public :: SQL_PRED_BASIC = 2
186 integer(C_SHORT), parameter, public :: SQL_NAMED = 0
187 integer(C_SHORT), parameter, public :: SQL_UNNAMED = 1
188 integer(C_SHORT), parameter, public :: SQL_DESC_ALLOC_AUTO = 1
189 integer(C_SHORT), parameter, public :: SQL_DESC_ALLOC_USER = 2
190 integer(C_SHORT), parameter, public :: SQL_CLOSE = 0
191 integer(C_SHORT), parameter, public :: SQL_DROP = 1
192 integer(C_SHORT), parameter, public :: SQL_UNBIND = 2
193 integer(C_SHORT), parameter, public :: SQL_RESET_PARAMS = 3
194 integer(C_SHORT), parameter, public :: SQL_FETCH_NEXT = 1
195 integer(C_SHORT), parameter, public :: SQL_FETCH_FIRST = 2
196 integer(C_SHORT), parameter, public :: SQL_FETCH_LAST = 3
197 integer(C_SHORT), parameter, public :: SQL_FETCH_PRIOR = 4
198 integer(C_SHORT), parameter, public :: SQL_FETCH_ABSOLUTE = 5
199 integer(C_SHORT), parameter, public :: SQL_FETCH_RELATIVE = 6
200 integer(C_SHORT), parameter, public :: SQL_COMMIT = 0
201 integer(C_SHORT), parameter, public :: SQL_ROLLBACK = 1
202 integer(C_SHORT), parameter, public :: SQL_NULL_HENV = 0
203 integer(C_SHORT), parameter, public :: SQL_NULL_HDBC = 0
204 integer(C_SHORT), parameter, public :: SQL_NULL_HSTMT = 0
205 integer(C_SHORT), parameter, public :: SQL_NULL_HDESC = 0
206 integer(C_SHORT), parameter, public :: SQL_NULL_DESC = 0
207 type(C_PTR), parameter, public :: SQL_NULL_HANDLE = c_null_ptr
208 integer(C_SHORT), parameter, public :: SQL_SCOPE_CURROW = 0
209 integer(C_SHORT), parameter, public :: SQL_SCOPE_TRANSACTION = 1
210 integer(C_SHORT), parameter, public :: SQL_SCOPE_SESSION = 2
211 integer(C_SHORT), parameter, public :: SQL_PC_UNKNOWN = 0
212 integer(C_SHORT), parameter, public :: SQL_PC_NON_PSEUDO = 1
213 integer(C_SHORT), parameter, public :: SQL_PC_PSEUDO = 2
214 integer(C_SHORT), parameter, public :: SQL_ROW_IDENTIFIER = 1
215 integer(C_SHORT), parameter, public :: SQL_INDEX_UNIQUE = 0
216 integer(C_SHORT), parameter, public :: SQL_INDEX_ALL = 1
217 integer(C_SHORT), parameter, public :: SQL_INDEX_CLUSTERED = 1
218 integer(C_SHORT), parameter, public :: SQL_INDEX_HASHED = 2
219 integer(C_SHORT), parameter, public :: SQL_INDEX_OTHER = 3
220 integer(C_SHORT), parameter, public :: SQL_API_SQLALLOCCONNECT = 1
221 integer(C_SHORT), parameter, public :: SQL_API_SQLALLOCENV = 2
222 integer(C_SHORT), parameter, public :: SQL_API_SQLALLOCHANDLE = 1001
223 integer(C_SHORT), parameter, public :: SQL_API_SQLALLOCSTMT = 3
224 integer(C_SHORT), parameter, public :: SQL_API_SQLBINDCOL = 4
225 integer(C_SHORT), parameter, public :: SQL_API_SQLBINDPARAM = 1002
226 integer(C_SHORT), parameter, public :: SQL_API_SQLCANCEL = 5
227 integer(C_SHORT), parameter, public :: SQL_API_SQLCLOSECURSOR = 1003
228 integer(C_SHORT), parameter, public :: SQL_API_SQLCOLATTRIBUTE = 6
229 integer(C_SHORT), parameter, public :: SQL_API_SQLCOLUMNS = 40
230 integer(C_SHORT), parameter, public :: SQL_API_SQLCONNECT = 7
231 integer(C_SHORT), parameter, public :: SQL_API_SQLCOPYDESC = 1004
232 integer(C_SHORT), parameter, public :: SQL_API_SQLDATASOURCES = 57
233 integer(C_SHORT), parameter, public :: SQL_API_SQLDESCRIBECOL = 8
234 integer(C_SHORT), parameter, public :: SQL_API_SQLDISCONNECT = 9
235 integer(C_SHORT), parameter, public :: SQL_API_SQLENDTRAN = 1005
236 integer(C_SHORT), parameter, public :: SQL_API_SQLERROR = 10
237 integer(C_SHORT), parameter, public :: SQL_API_SQLEXECDIRECT = 11
238 integer(C_SHORT), parameter, public :: SQL_API_SQLEXECUTE = 12
239 integer(C_SHORT), parameter, public :: SQL_API_SQLFETCH = 13
240 integer(C_SHORT), parameter, public :: SQL_API_SQLFETCHSCROLL = 1021
241 integer(C_SHORT), parameter, public :: SQL_API_SQLFREECONNECT = 14
242 integer(C_SHORT), parameter, public :: SQL_API_SQLFREEENV = 15
243 integer(C_SHORT), parameter, public :: SQL_API_SQLFREEHANDLE = 1006
244 integer(C_SHORT), parameter, public :: SQL_API_SQLFREESTMT = 16
245 integer(C_SHORT), parameter, public :: SQL_API_SQLGETCONNECTATTR = 1007
246 integer(C_SHORT), parameter, public :: SQL_API_SQLGETCONNECTOPTION = 42
247 integer(C_SHORT), parameter, public :: SQL_API_SQLGETCURSORNAME = 17
248 integer(C_SHORT), parameter, public :: SQL_API_SQLGETDATA = 43
249 integer(C_SHORT), parameter, public :: SQL_API_SQLGETDESCFIELD = 1008
250 integer(C_SHORT), parameter, public :: SQL_API_SQLGETDESCREC = 1009
251 integer(C_SHORT), parameter, public :: SQL_API_SQLGETDIAGFIELD = 1010
252 integer(C_SHORT), parameter, public :: SQL_API_SQLGETDIAGREC = 1011
253 integer(C_SHORT), parameter, public :: SQL_API_SQLGETENVATTR = 1012
254 integer(C_SHORT), parameter, public :: SQL_API_SQLGETFUNCTIONS = 44
255 integer(C_SHORT), parameter, public :: SQL_API_SQLGETINFO = 45
256 integer(C_SHORT), parameter, public :: SQL_API_SQLGETSTMTATTR = 1014
257 integer(C_SHORT), parameter, public :: SQL_API_SQLGETSTMTOPTION = 46
258 integer(C_SHORT), parameter, public :: SQL_API_SQLGETTYPEINFO = 47
259 integer(C_SHORT), parameter, public :: SQL_API_SQLNUMRESULTCOLS = 18
260 integer(C_SHORT), parameter, public :: SQL_API_SQLPARAMDATA = 48
261 integer(C_SHORT), parameter, public :: SQL_API_SQLPREPARE = 19
262 integer(C_SHORT), parameter, public :: SQL_API_SQLPUTDATA = 49
263 integer(C_SHORT), parameter, public :: SQL_API_SQLROWCOUNT = 20
264 integer(C_SHORT), parameter, public :: SQL_API_SQLSETCONNECTATTR = 1016
265 integer(C_SHORT), parameter, public :: SQL_API_SQLSETCONNECTOPTION = 50
266 integer(C_SHORT), parameter, public :: SQL_API_SQLSETCURSORNAME = 21
267 integer(C_SHORT), parameter, public :: SQL_API_SQLSETDESCFIELD = 1017
268 integer(C_SHORT), parameter, public :: SQL_API_SQLSETDESCREC = 1018
269 integer(C_SHORT), parameter, public :: SQL_API_SQLSETENVATTR = 1019
270 integer(C_SHORT), parameter, public :: SQL_API_SQLSETPARAM = 22
271 integer(C_SHORT), parameter, public :: SQL_API_SQLSETSTMTATTR = 1020
272 integer(C_SHORT), parameter, public :: SQL_API_SQLSETSTMTOPTION = 51
273 integer(C_SHORT), parameter, public :: SQL_API_SQLSPECIALCOLUMNS = 52
274 integer(C_SHORT), parameter, public :: SQL_API_SQLSTATISTICS = 53
275 integer(C_SHORT), parameter, public :: SQL_API_SQLTABLES = 54
276 integer(C_SHORT), parameter, public :: SQL_API_SQLTRANSACT = 23
277 integer(C_SHORT), parameter, public :: SQL_API_SQLCANCELHANDLE = 1022
278 integer(C_SHORT), parameter, public :: SQL_MAX_DRIVER_CONNECTIONS = 0
279 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_DRIVER_CONNECTIONS = 0
280 integer(C_SHORT), parameter, public :: SQL_MAX_CONCURRENT_ACTIVITIES = 1
281 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_CONCURRENT_ACTIVITIES = 1
282 integer(C_SHORT), parameter, public :: SQL_DATA_SOURCE_NAME = 2
283 integer(C_SHORT), parameter, public :: SQL_FETCH_DIRECTION = 8
284 integer(C_SHORT), parameter, public :: SQL_SERVER_NAME = 13
285 integer(C_SHORT), parameter, public :: SQL_SEARCH_PATTERN_ESCAPE = 14
286 integer(C_SHORT), parameter, public :: SQL_DBMS_NAME = 17
287 integer(C_SHORT), parameter, public :: SQL_DBMS_VER = 18
288 integer(C_SHORT), parameter, public :: SQL_ACCESSIBLE_TABLES = 19
289 integer(C_SHORT), parameter, public :: SQL_ACCESSIBLE_PROCEDURES = 20
290 integer(C_SHORT), parameter, public :: SQL_CURSOR_COMMIT_BEHAVIOR = 23
291 integer(C_SHORT), parameter, public :: SQL_DATA_SOURCE_READ_ONLY = 25
292 integer(C_SHORT), parameter, public :: SQL_DEFAULT_TXN_ISOLATION = 26
293 integer(C_SHORT), parameter, public :: SQL_IDENTIFIER_CASE = 28
294 integer(C_SHORT), parameter, public :: SQL_IDENTIFIER_QUOTE_CHAR = 29
295 integer(C_SHORT), parameter, public :: SQL_MAX_COLUMN_NAME_LEN = 30
296 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_COLUMN_NAME_LENGTH = 30
297 integer(C_SHORT), parameter, public :: SQL_MAX_CURSOR_NAME_LEN = 31
298 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_CURSOR_NAME_LENGTH = 31
299 integer(C_SHORT), parameter, public :: SQL_MAX_SCHEMA_NAME_LEN = 32
300 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_SCHEMA_NAME_LENGTH = 32
301 integer(C_SHORT), parameter, public :: SQL_MAX_CATALOG_NAME_LEN = 34
302 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_CATALOG_NAME_LENGTH = 34
303 integer(C_SHORT), parameter, public :: SQL_MAX_TABLE_NAME_LEN = 35
304 integer(C_SHORT), parameter, public :: SQL_SCROLL_CONCURRENCY = 43
305 integer(C_SHORT), parameter, public :: SQL_TXN_CAPABLE = 46
306 integer(C_SHORT), parameter, public :: SQL_TRANSACTION_CAPABLE = 46
307 integer(C_SHORT), parameter, public :: SQL_USER_NAME = 47
308 integer(C_SHORT), parameter, public :: SQL_TXN_ISOLATION_OPTION = 72
309 integer(C_SHORT), parameter, public :: SQL_TRANSACTION_ISOLATION_OPTION = 72
310 integer(C_SHORT), parameter, public :: SQL_INTEGRITY = 73
311 integer(C_SHORT), parameter, public :: SQL_GETDATA_EXTENSIONS = 81
312 integer(C_SHORT), parameter, public :: SQL_NULL_COLLATION = 85
313 integer(C_SHORT), parameter, public :: SQL_ALTER_TABLE = 86
314 integer(C_SHORT), parameter, public :: SQL_ORDER_BY_COLUMNS_IN_SELECT = 90
315 integer(C_SHORT), parameter, public :: SQL_SPECIAL_CHARACTERS = 94
316 integer(C_SHORT), parameter, public :: SQL_MAX_COLUMNS_IN_GROUP_BY = 97
317 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_COLUMNS_IN_GROUP_BY = 97
318 integer(C_SHORT), parameter, public :: SQL_MAX_COLUMNS_IN_INDEX = 98
319 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_COLUMNS_IN_INDEX = 98
320 integer(C_SHORT), parameter, public :: SQL_MAX_COLUMNS_IN_ORDER_BY = 99
321 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_COLUMNS_IN_ORDER_BY = 99
322 integer(C_SHORT), parameter, public :: SQL_MAX_COLUMNS_IN_SELECT = 100
323 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_COLUMNS_IN_SELECT = 100
324 integer(C_SHORT), parameter, public :: SQL_MAX_COLUMNS_IN_TABLE = 101
325 integer(C_SHORT), parameter, public :: SQL_MAX_INDEX_SIZE = 102
326 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_INDEX_SIZE = 102
327 integer(C_SHORT), parameter, public :: SQL_MAX_ROW_SIZE = 104
328 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_ROW_SIZE = 104
329 integer(C_SHORT), parameter, public :: SQL_MAX_STATEMENT_LEN = 105
330 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_STATEMENT_LENGTH = 105
331 integer(C_SHORT), parameter, public :: SQL_MAX_TABLES_IN_SELECT = 106
332 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_TABLES_IN_SELECT = 106
333 integer(C_SHORT), parameter, public :: SQL_MAX_USER_NAME_LEN = 107
334 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_USER_NAME_LENGTH = 107
335 integer(C_SHORT), parameter, public :: SQL_OJ_CAPABILITIES = 115
336 integer(C_SHORT), parameter, public :: SQL_OUTER_JOIN_CAPABILITIES = 115
337 integer(C_SHORT), parameter, public :: SQL_XOPEN_CLI_YEAR = 10000
338 integer(C_SHORT), parameter, public :: SQL_CURSOR_SENSITIVITY = 10001
339 integer(C_SHORT), parameter, public :: SQL_DESCRIBE_PARAMETER = 10002
340 integer(C_SHORT), parameter, public :: SQL_CATALOG_NAME = 10003
341 integer(C_SHORT), parameter, public :: SQL_COLLATION_SEQ = 10004
342 integer(C_SHORT), parameter, public :: SQL_MAX_IDENTIFIER_LEN = 10005
343 integer(C_SHORT), parameter, public :: SQL_MAXIMUM_IDENTIFIER_LENGTH = 10005
344 integer(C_LONG), parameter, public :: SQL_AT_ADD_COLUMN = int(z'00000001', c_long)
345 integer(C_LONG), parameter, public :: SQL_AT_DROP_COLUMN = int(z'00000002', c_long)
346 integer(C_LONG), parameter, public :: SQL_AT_ADD_CONSTRAINT = int(z'00000008', c_long)
347 integer(C_SHORT), parameter, public :: SQL_CB_DELETE = 0
348 integer(C_SHORT), parameter, public :: SQL_CB_CLOSE = 1
349 integer(C_SHORT), parameter, public :: SQL_CB_PRESERVE = 2
350 integer(C_LONG), parameter, public :: SQL_FD_FETCH_NEXT = int(z'00000001', c_long)
351 integer(C_LONG), parameter, public :: SQL_FD_FETCH_FIRST = int(z'00000002', c_long)
352 integer(C_LONG), parameter, public :: SQL_FD_FETCH_LAST = int(z'00000004', c_long)
353 integer(C_LONG), parameter, public :: SQL_FD_FETCH_PRIOR = int(z'00000008', c_long)
354 integer(C_LONG), parameter, public :: SQL_FD_FETCH_ABSOLUTE = int(z'00000010', c_long)
355 integer(C_LONG), parameter, public :: SQL_FD_FETCH_RELATIVE = int(z'00000020', c_long)
356 integer(C_LONG), parameter, public :: SQL_GD_ANY_COLUMN = int(z'00000001', c_long)
357 integer(C_LONG), parameter, public :: SQL_GD_ANY_ORDER = int(z'00000002', c_long)
358 integer(C_SHORT), parameter, public :: SQL_IC_UPPER = 1
359 integer(C_SHORT), parameter, public :: SQL_IC_LOWER = 2
360 integer(C_SHORT), parameter, public :: SQL_IC_SENSITIVE = 3
361 integer(C_SHORT), parameter, public :: SQL_IC_MIXED = 4
362 integer(C_LONG), parameter, public :: SQL_OJ_LEFT = int(z'00000001', c_long)
363 integer(C_LONG), parameter, public :: SQL_OJ_RIGHT = int(z'00000002', c_long)
364 integer(C_LONG), parameter, public :: SQL_OJ_FULL = int(z'00000004', c_long)
365 integer(C_LONG), parameter, public :: SQL_OJ_NESTED = int(z'00000008', c_long)
366 integer(C_LONG), parameter, public :: SQL_OJ_NOT_ORDERED = int(z'00000010', c_long)
367 integer(C_LONG), parameter, public :: SQL_OJ_INNER = int(z'00000020', c_long)
368 integer(C_LONG), parameter, public :: SQL_OJ_ALL_COMPARISON_OPS = int(z'00000040', c_long)
369 integer(C_LONG), parameter, public :: SQL_SCCO_READ_ONLY = int(z'00000001', c_long)
370 integer(C_LONG), parameter, public :: SQL_SCCO_LOCK = int(z'00000002', c_long)
371 integer(C_LONG), parameter, public :: SQL_SCCO_OPT_ROWVER = int(z'00000004', c_long)
372 integer(C_LONG), parameter, public :: SQL_SCCO_OPT_VALUES = int(z'00000008', c_long)
373 integer(C_SHORT), parameter, public :: SQL_TC_NONE = 0
374 integer(C_SHORT), parameter, public :: SQL_TC_DML = 1
375 integer(C_SHORT), parameter, public :: SQL_TC_ALL = 2
376 integer(C_SHORT), parameter, public :: SQL_TC_DDL_COMMIT = 3
377 integer(C_SHORT), parameter, public :: SQL_TC_DDL_IGNORE = 4
378 integer(C_LONG), parameter, public :: SQL_TXN_READ_UNCOMMITTED = int(z'00000001', c_long)
379 integer(C_LONG), parameter, public :: SQL_TRANSACTION_READ_UNCOMMITTED = int(z'00000001', c_long)
380 integer(C_LONG), parameter, public :: SQL_TXN_READ_COMMITTED = int(z'00000002', c_long)
381 integer(C_LONG), parameter, public :: SQL_TRANSACTION_READ_COMMITTED = int(z'00000002', c_long)
382 integer(C_LONG), parameter, public :: SQL_TXN_REPEATABLE_READ = int(z'00000004', c_long)
383 integer(C_LONG), parameter, public :: SQL_TRANSACTION_REPEATABLE_READ = int(z'00000004', c_long)
384 integer(C_LONG), parameter, public :: SQL_TXN_SERIALIZABLE = int(z'00000008', c_long)
385 integer(C_LONG), parameter, public :: SQL_TRANSACTION_SERIALIZABLE = int(z'00000008', c_long)
386 integer(C_SHORT), parameter, public :: SQL_NC_HIGH = 0
387 integer(C_SHORT), parameter, public :: SQL_NC_LOW = 1
388
389 !from sqlext.h
390 integer(C_SHORT), parameter, public :: SQLTables_TABLE_CATALOG = 1
391 integer(C_SHORT), parameter, public :: SQLTables_TABLE_SCHEM = 2
392 integer(C_SHORT), parameter, public :: SQLTables_TABLE_NAME = 3
393 integer(C_SHORT), parameter, public :: SQLTables_TABLE_TYPE = 4
394 integer(C_SHORT), parameter, public :: SQLTables_REMARKS = 5
395 integer(C_SHORT), parameter, public :: SQLColumns_TABLE_CAT = 1
396 integer(C_SHORT), parameter, public :: SQLColumns_TABLE_SCHEM = 2
397 integer(C_SHORT), parameter, public :: SQLColumns_TABLE_NAME = 3
398 integer(C_SHORT), parameter, public :: SQLColumns_COLUMN_NAME = 4
399 integer(C_SHORT), parameter, public :: SQLColumns_DATA_TYPE = 5
400 integer(C_SHORT), parameter, public :: SQLColumns_TYPE_NAME = 6
401 integer(C_SHORT), parameter, public :: SQLColumns_COLUMN_SIZE = 7
402 integer(C_SHORT), parameter, public :: SQLColumns_BUFFER_LENGTH = 8
403 integer(C_SHORT), parameter, public :: SQLColumns_DECIMAL_DIGITS = 9
404 integer(C_SHORT), parameter, public :: SQLColumns_NUM_PREC_RADIX = 10
405 integer(C_SHORT), parameter, public :: SQLColumns_NULLABLE = 11
406 integer(C_SHORT), parameter, public :: SQLColumns_REMARKS = 12
407 integer(C_SHORT), parameter, public :: SQLColumns_COLUMN_DEF = 13
408 integer(C_SHORT), parameter, public :: SQLColumns_SQL_DATA_TYPE = 14
409 integer(C_SHORT), parameter, public :: SQLColumns_SQL_DATETIME_SUB = 15
410 integer(C_SHORT), parameter, public :: SQLColumns_CHAR_OCTET_LENGTH = 16
411 integer(C_SHORT), parameter, public :: SQLColumns_ORDINAL_POSITION = 17
412 integer(C_SHORT), parameter, public :: SQLColumns_IS_NULLABLE = 18
413 integer(C_SHORT), parameter, public :: SQL_SPEC_MAJOR = 3
414 integer(C_SHORT), parameter, public :: SQL_SPEC_MINOR = 52
415 character(kind=C_CHAR, len=*), parameter, public :: SQL_SPEC_STRING = "03.52"
416 integer(C_SHORT), parameter, public :: SQL_SQLSTATE_SIZE = 5
417 integer(C_SHORT), parameter, public :: SQL_MAX_DSN_LENGTH = 32
418 integer(C_SHORT), parameter, public :: SQL_MAX_OPTION_STRING_LENGTH = 256
419 integer(C_SHORT), parameter, public :: SQL_HANDLE_SENV = 5
420 integer(C_INT), parameter, public :: SQL_ATTR_ODBC_VERSION = 200
421 integer(C_INT), parameter, public :: SQL_ATTR_CONNECTION_POOLING = 201
422 integer(C_INT), parameter, public :: SQL_ATTR_CP_MATCH = 202
423 integer(C_INT), parameter, public :: SQL_ATTR_UNIXODBC_SYSPATH = 65001
424 integer(C_INT), parameter, public :: SQL_ATTR_UNIXODBC_VERSION = 65002
425 integer(C_INT), parameter, public :: SQL_ATTR_UNIXODBC_ENVATTR = 65003
426 integer(C_LONG), parameter, public :: SQL_CP_OFF = 0
427 integer(C_LONG), parameter, public :: SQL_CP_ONE_PER_DRIVER = 1
428 integer(C_LONG), parameter, public :: SQL_CP_ONE_PER_HENV = 2
429 integer(C_LONG), parameter, public :: SQL_CP_DEFAULT = 0
430 integer(C_LONG), parameter, public :: SQL_CP_STRICT_MATCH = 0
431 integer(C_LONG), parameter, public :: SQL_CP_RELAXED_MATCH = 1
432 integer(C_LONG), parameter, public :: SQL_CP_MATCH_DEFAULT = 0
433 integer(C_LONG_LONG), parameter, public :: SQL_OV_ODBC2 = 2
434 integer(C_LONG_LONG), parameter, public :: SQL_OV_ODBC3 = 3
435 integer(C_LONG), parameter, public :: SQL_OV_ODBC3_80 = 380
436 integer(C_LONG), parameter, public :: SQL_ACCESS_MODE = 101
437 integer(C_LONG), parameter, public :: SQL_AUTOCOMMIT = 102
438 integer(C_LONG), parameter, public :: SQL_LOGIN_TIMEOUT = 103
439 integer(C_LONG), parameter, public :: SQL_OPT_TRACE = 104
440 integer(C_LONG), parameter, public :: SQL_OPT_TRACEFILE = 105
441 integer(C_LONG), parameter, public :: SQL_TRANSLATE_DLL = 106
442 integer(C_LONG), parameter, public :: SQL_TRANSLATE_OPTION = 107
443 integer(C_LONG), parameter, public :: SQL_TXN_ISOLATION = 108
444 integer(C_LONG), parameter, public :: SQL_CURRENT_QUALIFIER = 109
445 integer(C_LONG), parameter, public :: SQL_ODBC_CURSORS = 110
446 integer(C_LONG), parameter, public :: SQL_QUIET_MODE = 111
447 integer(C_LONG), parameter, public :: SQL_PACKET_SIZE = 112
448 integer(C_INT), parameter, public :: SQL_ATTR_ACCESS_MODE = 101
449 integer(C_INT), parameter, public :: SQL_ATTR_AUTOCOMMIT = 102
450 integer(C_INT), parameter, public :: SQL_ATTR_CONNECTION_TIMEOUT = 113
451 integer(C_INT), parameter, public :: SQL_ATTR_CURRENT_CATALOG = 109
452 integer(C_INT), parameter, public :: SQL_ATTR_DISCONNECT_BEHAVIOR = 114
453 integer(C_INT), parameter, public :: SQL_ATTR_ENLIST_IN_DTC = 1207
454 integer(C_INT), parameter, public :: SQL_ATTR_ENLIST_IN_XA = 1208
455 integer(C_INT), parameter, public :: SQL_ATTR_LOGIN_TIMEOUT = 103
456 integer(C_INT), parameter, public :: SQL_ATTR_ODBC_CURSORS = 110
457 integer(C_INT), parameter, public :: SQL_ATTR_PACKET_SIZE = 112
458 integer(C_INT), parameter, public :: SQL_ATTR_QUIET_MODE = 111
459 integer(C_INT), parameter, public :: SQL_ATTR_TRACE = 104
460 integer(C_INT), parameter, public :: SQL_ATTR_TRACEFILE = 105
461 integer(C_INT), parameter, public :: SQL_ATTR_TRANSLATE_LIB = 106
462 integer(C_INT), parameter, public :: SQL_ATTR_TRANSLATE_OPTION = 107
463 integer(C_INT), parameter, public :: SQL_ATTR_TXN_ISOLATION = 108
464 integer(C_INT), parameter, public :: SQL_ATTR_CONNECTION_DEAD = 1209
465 integer(C_INT), parameter, public :: SQL_ATTR_DRIVER_THREADING = 1028
466 integer(C_INT), parameter, public :: SQL_ATTR_ANSI_APP = 115
467 integer(C_INT), parameter, public :: SQL_ATTR_RESET_CONNECTION = 116
468 integer(C_INT), parameter, public :: SQL_ATTR_ASYNC_DBC_FUNCTIONS_ENABLE = 117
469 integer(C_LONG), parameter, public :: SQL_MODE_READ_WRITE = 0
470 integer(C_LONG), parameter, public :: SQL_MODE_READ_ONLY = 1
471 integer(C_LONG), parameter, public :: SQL_MODE_DEFAULT = 0
472 integer(C_LONG), parameter, public :: SQL_AUTOCOMMIT_OFF = 0
473 integer(C_LONG), parameter, public :: SQL_AUTOCOMMIT_ON = 1
474 integer(C_LONG), parameter, public :: SQL_AUTOCOMMIT_DEFAULT = 1
475 integer(C_LONG), parameter, public :: SQL_LOGIN_TIMEOUT_DEFAULT = 15
476 integer(C_LONG), parameter, public :: SQL_OPT_TRACE_OFF = 0
477 integer(C_LONG), parameter, public :: SQL_OPT_TRACE_ON = 1
478 integer(C_LONG), parameter, public :: SQL_OPT_TRACE_DEFAULT = 0
479#ifdef _WIN32
480 character(kind=C_CHAR, len=*), parameter, public :: SQL_OPT_TRACE_FILE_DEFAULT = "%TMP%/SQL.LOG"
481#else
482 character(kind=C_CHAR, len=*), parameter, public :: SQL_OPT_TRACE_FILE_DEFAULT = "/tmp/SQL.LOG"
483#endif
484 integer(C_LONG), parameter, public :: SQL_CUR_USE_IF_NEEDED = 0
485 integer(C_LONG), parameter, public :: SQL_CUR_USE_ODBC = 1
486 integer(C_LONG), parameter, public :: SQL_CUR_USE_DRIVER = 2
487 integer(C_LONG), parameter, public :: SQL_CUR_DEFAULT = 2
488 integer(C_LONG), parameter, public :: SQL_DB_RETURN_TO_POOL = 0
489 integer(C_LONG), parameter, public :: SQL_DB_DISCONNECT = 1
490 integer(C_LONG), parameter, public :: SQL_DB_DEFAULT = 0
491 integer(C_LONG), parameter, public :: SQL_DTC_DONE = 0
492 integer(C_LONG), parameter, public :: SQL_CD_TRUE = 1
493 integer(C_LONG), parameter, public :: SQL_CD_FALSE = 0
494 integer(C_LONG), parameter, public :: SQL_AA_TRUE = 1
495 integer(C_LONG), parameter, public :: SQL_AA_FALSE = 0
496 integer(C_LONG), parameter, public :: SQL_RESET_CONNECTION_YES = 1
497 integer(C_LONG), parameter, public :: SQL_ASYNC_DBC_ENABLE_ON = 1
498 integer(C_LONG), parameter, public :: SQL_ASYNC_DBC_ENABLE_OFF = 0
499 integer(C_LONG), parameter, public :: SQL_ASYNC_DBC_ENABLE_DEFAULT = 0
500 integer(C_SHORT), parameter, public :: SQL_QUERY_TIMEOUT = 0
501 integer(C_SHORT), parameter, public :: SQL_MAX_ROWS = 1
502 integer(C_SHORT), parameter, public :: SQL_NOSCAN = 2
503 integer(C_SHORT), parameter, public :: SQL_MAX_LENGTH = 3
504 integer(C_SHORT), parameter, public :: SQL_ASYNC_ENABLE = 4
505 integer(C_SHORT), parameter, public :: SQL_BIND_TYPE = 5
506 integer(C_SHORT), parameter, public :: SQL_CURSOR_TYPE = 6
507 integer(C_SHORT), parameter, public :: SQL_CONCURRENCY = 7
508 integer(C_SHORT), parameter, public :: SQL_KEYSET_SIZE = 8
509 integer(C_SHORT), parameter, public :: SQL_ROWSET_SIZE = 9
510 integer(C_SHORT), parameter, public :: SQL_SIMULATE_CURSOR = 10
511 integer(C_SHORT), parameter, public :: SQL_RETRIEVE_DATA = 11
512 integer(C_SHORT), parameter, public :: SQL_USE_BOOKMARKS = 12
513 integer(C_SHORT), parameter, public :: SQL_GET_BOOKMARK = 13
514 integer(C_SHORT), parameter, public :: SQL_ROW_NUMBER = 14
515 integer(C_INT), parameter, public :: SQL_ATTR_ASYNC_ENABLE = 4
516 integer(C_INT), parameter, public :: SQL_ATTR_CONCURRENCY = 7
517 integer(C_INT), parameter, public :: SQL_ATTR_CURSOR_TYPE = 6
518 integer(C_INT), parameter, public :: SQL_ATTR_ENABLE_AUTO_IPD = 15
519 integer(C_INT), parameter, public :: SQL_ATTR_FETCH_BOOKMARK_PTR = 16
520 integer(C_INT), parameter, public :: SQL_ATTR_KEYSET_SIZE = 8
521 integer(C_INT), parameter, public :: SQL_ATTR_MAX_LENGTH = 3
522 integer(C_INT), parameter, public :: SQL_ATTR_MAX_ROWS = 1
523 integer(C_INT), parameter, public :: SQL_ATTR_NOSCAN = 2
524 integer(C_INT), parameter, public :: SQL_ATTR_PARAM_BIND_OFFSET_PTR = 17
525 integer(C_INT), parameter, public :: SQL_ATTR_PARAM_BIND_TYPE = 18
526 integer(C_INT), parameter, public :: SQL_ATTR_PARAM_OPERATION_PTR = 19
527 integer(C_INT), parameter, public :: SQL_ATTR_PARAM_STATUS_PTR = 20
528 integer(C_INT), parameter, public :: SQL_ATTR_PARAMS_PROCESSED_PTR = 21
529 integer(C_INT), parameter, public :: SQL_ATTR_PARAMSET_SIZE = 22
530 integer(C_INT), parameter, public :: SQL_ATTR_QUERY_TIMEOUT = 0
531 integer(C_INT), parameter, public :: SQL_ATTR_RETRIEVE_DATA = 11
532 integer(C_INT), parameter, public :: SQL_ATTR_ROW_BIND_OFFSET_PTR = 23
533 integer(C_INT), parameter, public :: SQL_ATTR_ROW_BIND_TYPE = 5
534 integer(C_INT), parameter, public :: SQL_ATTR_ROW_NUMBER = 14
535 integer(C_INT), parameter, public :: SQL_ATTR_ROW_OPERATION_PTR = 24
536 integer(C_INT), parameter, public :: SQL_ATTR_ROW_STATUS_PTR = 25
537 integer(C_INT), parameter, public :: SQL_ATTR_ROWS_FETCHED_PTR = 26
538 integer(C_INT), parameter, public :: SQL_ATTR_ROW_ARRAY_SIZE = 27
539 integer(C_INT), parameter, public :: SQL_ATTR_SIMULATE_CURSOR = 10
540 integer(C_INT), parameter, public :: SQL_ATTR_USE_BOOKMARKS = 12
541 integer(C_INT), parameter, public :: SQL_ATTR_ASYNC_STMT_EVENT = 29
542 integer(C_INT), parameter, public :: SQL_IS_POINTER = -4
543 integer(C_INT), parameter, public :: SQL_IS_UINTEGER = -5
544 integer(C_INT), parameter, public :: SQL_IS_INTEGER = -6
545 integer(C_INT), parameter, public :: SQL_IS_USMALLINT = -7
546 integer(C_INT), parameter, public :: SQL_IS_SMALLINT = -8
547 integer(C_LONG), parameter, public :: SQL_PARAM_BIND_BY_COLUMN = 0
548 integer(C_LONG), parameter, public :: SQL_PARAM_BIND_TYPE_DEFAULT = 0
549 integer(C_LONG), parameter, public :: SQL_QUERY_TIMEOUT_DEFAULT = 0
550 integer(C_LONG), parameter, public :: SQL_MAX_ROWS_DEFAULT = 0
551 integer(C_LONG), parameter, public :: SQL_NOSCAN_OFF = 0
552 integer(C_LONG), parameter, public :: SQL_NOSCAN_ON = 1
553 integer(C_LONG), parameter, public :: SQL_NOSCAN_DEFAULT = 0
554 integer(C_LONG), parameter, public :: SQL_MAX_LENGTH_DEFAULT = 0
555 integer(C_LONG), parameter, public :: SQL_ASYNC_ENABLE_OFF = 0
556 integer(C_LONG), parameter, public :: SQL_ASYNC_ENABLE_ON = 1
557 integer(C_LONG), parameter, public :: SQL_ASYNC_ENABLE_DEFAULT = 0
558 integer(C_LONG), parameter, public :: SQL_BIND_BY_COLUMN = 0
559 integer(C_LONG), parameter, public :: SQL_BIND_TYPE_DEFAULT = 0
560 integer(C_SHORT), parameter, public :: SQL_CONCUR_READ_ONLY = 1
561 integer(C_SHORT), parameter, public :: SQL_CONCUR_LOCK = 2
562 integer(C_SHORT), parameter, public :: SQL_CONCUR_ROWVER = 3
563 integer(C_SHORT), parameter, public :: SQL_CONCUR_VALUES = 4
564 integer(C_SHORT), parameter, public :: SQL_CONCUR_DEFAULT = 1
565 integer(C_LONG), parameter, public :: SQL_CURSOR_FORWARD_ONLY = 0
566 integer(C_LONG), parameter, public :: SQL_CURSOR_KEYSET_DRIVEN = 1
567 integer(C_LONG), parameter, public :: SQL_CURSOR_DYNAMIC = 2
568 integer(C_LONG), parameter, public :: SQL_CURSOR_STATIC = 3
569 integer(C_LONG), parameter, public :: SQL_CURSOR_TYPE_DEFAULT = 0
570 integer(C_LONG), parameter, public :: SQL_ROWSET_SIZE_DEFAULT = 1
571 integer(C_LONG), parameter, public :: SQL_KEYSET_SIZE_DEFAULT = 0
572 integer(C_LONG), parameter, public :: SQL_SC_NON_UNIQUE = 0
573 integer(C_LONG), parameter, public :: SQL_SC_TRY_UNIQUE = 1
574 integer(C_LONG), parameter, public :: SQL_SC_UNIQUE = 2
575 integer(C_LONG), parameter, public :: SQL_RD_OFF = 0
576 integer(C_LONG), parameter, public :: SQL_RD_ON = 1
577 integer(C_LONG), parameter, public :: SQL_RD_DEFAULT = 1
578 integer(C_LONG), parameter, public :: SQL_UB_OFF = 0
579 integer(C_LONG), parameter, public :: SQL_UB_ON = 01
580 integer(C_LONG), parameter, public :: SQL_UB_DEFAULT = 0
581 integer(C_LONG), parameter, public :: SQL_UB_FIXED = 01
582 integer(C_LONG), parameter, public :: SQL_UB_VARIABLE = 2
583 integer(C_SHORT), parameter, public :: SQL_DESC_ARRAY_SIZE = 20
584 integer(C_SHORT), parameter, public :: SQL_DESC_ARRAY_STATUS_PTR = 21
585 integer(C_SHORT), parameter, public :: SQL_DESC_BASE_COLUMN_NAME = 22
586 integer(C_SHORT), parameter, public :: SQL_DESC_BASE_TABLE_NAME = 23
587 integer(C_SHORT), parameter, public :: SQL_DESC_BIND_OFFSET_PTR = 24
588 integer(C_SHORT), parameter, public :: SQL_DESC_BIND_TYPE = 25
589 integer(C_SHORT), parameter, public :: SQL_DESC_DATETIME_INTERVAL_PRECISION = 26
590 integer(C_SHORT), parameter, public :: SQL_DESC_LITERAL_PREFIX = 27
591 integer(C_SHORT), parameter, public :: SQL_DESC_LITERAL_SUFFIX = 28
592 integer(C_SHORT), parameter, public :: SQL_DESC_LOCAL_TYPE_NAME = 29
593 integer(C_SHORT), parameter, public :: SQL_DESC_MAXIMUM_SCALE = 30
594 integer(C_SHORT), parameter, public :: SQL_DESC_MINIMUM_SCALE = 31
595 integer(C_SHORT), parameter, public :: SQL_DESC_NUM_PREC_RADIX = 32
596 integer(C_SHORT), parameter, public :: SQL_DESC_PARAMETER_TYPE = 33
597 integer(C_SHORT), parameter, public :: SQL_DESC_ROWS_PROCESSED_PTR = 34
598 integer(C_SHORT), parameter, public :: SQL_DESC_ROWVER = 35
599 integer(C_SHORT), parameter, public :: SQL_DIAG_CURSOR_ROW_COUNT = -1249
600 integer(C_SHORT), parameter, public :: SQL_DIAG_ROW_NUMBER = -1248
601 integer(C_SHORT), parameter, public :: SQL_DIAG_COLUMN_NUMBER = -1247
602 integer(C_SHORT), parameter, public :: SQL_DATE = 9
603 integer(C_SHORT), parameter, public :: SQL_INTERVAL = 10
604 integer(C_SHORT), parameter, public :: SQL_TIME = 10
605 integer(C_SHORT), parameter, public :: SQL_TIMESTAMP = 11
606 integer(C_SHORT), parameter, public :: SQL_LONGVARCHAR = -1
607 integer(C_SHORT), parameter, public :: SQL_BINARY = -2
608 integer(C_SHORT), parameter, public :: SQL_VARBINARY = -3
609 integer(C_SHORT), parameter, public :: SQL_LONGVARBINARY = -4
610 integer(C_SHORT), parameter, public :: SQL_BIGINT = -5
611 integer(C_SHORT), parameter, public :: SQL_TINYINT = -6
612 integer(C_SHORT), parameter, public :: SQL_BIT = -7
613 integer(C_SHORT), parameter, public :: SQL_GUID = -11
614 integer(C_SHORT), parameter, public :: SQL_CODE_YEAR = 1
615 integer(C_SHORT), parameter, public :: SQL_CODE_MONTH = 2
616 integer(C_SHORT), parameter, public :: SQL_CODE_DAY = 3
617 integer(C_SHORT), parameter, public :: SQL_CODE_HOUR = 4
618 integer(C_SHORT), parameter, public :: SQL_CODE_MINUTE = 5
619 integer(C_SHORT), parameter, public :: SQL_CODE_SECOND = 6
620 integer(C_SHORT), parameter, public :: SQL_CODE_YEAR_TO_MONTH = 7
621 integer(C_SHORT), parameter, public :: SQL_CODE_DAY_TO_HOUR = 8
622 integer(C_SHORT), parameter, public :: SQL_CODE_DAY_TO_MINUTE = 9
623 integer(C_SHORT), parameter, public :: SQL_CODE_DAY_TO_SECOND = 10
624 integer(C_SHORT), parameter, public :: SQL_CODE_HOUR_TO_MINUTE = 11
625 integer(C_SHORT), parameter, public :: SQL_CODE_HOUR_TO_SECOND = 12
626 integer(C_SHORT), parameter, public :: SQL_CODE_MINUTE_TO_SECOND = 13
627 integer(C_SHORT), parameter, public :: SQL_INTERVAL_YEAR = 100+1
628 integer(C_SHORT), parameter, public :: SQL_INTERVAL_MONTH = 100+2
629 integer(C_SHORT), parameter, public :: SQL_INTERVAL_DAY = 100+3
630 integer(C_SHORT), parameter, public :: SQL_INTERVAL_HOUR = 100+4
631 integer(C_SHORT), parameter, public :: SQL_INTERVAL_MINUTE = 100+5
632 integer(C_SHORT), parameter, public :: SQL_INTERVAL_SECOND = 100+6
633 integer(C_SHORT), parameter, public :: SQL_INTERVAL_YEAR_TO_MONTH = 100+7
634 integer(C_SHORT), parameter, public :: SQL_INTERVAL_DAY_TO_HOUR = 100+8
635 integer(C_SHORT), parameter, public :: SQL_INTERVAL_DAY_TO_MINUTE = 100+9
636 integer(C_SHORT), parameter, public :: SQL_INTERVAL_DAY_TO_SECOND = 100+10
637 integer(C_SHORT), parameter, public :: SQL_INTERVAL_HOUR_TO_MINUTE = 100+11
638 integer(C_SHORT), parameter, public :: SQL_INTERVAL_HOUR_TO_SECOND = 100+12
639 integer(C_SHORT), parameter, public :: SQL_INTERVAL_MINUTE_TO_SECOND = 100+13
640 integer(C_SHORT), parameter, public :: SQL_C_DEFAULT = 99
641 integer(C_SHORT), parameter, public :: SQL_SIGNED_OFFSET = -20
642 integer(C_SHORT), parameter, public :: SQL_UNSIGNED_OFFSET = -22
643 integer(C_SHORT), parameter, public :: SQL_C_DATE = 9
644 integer(C_SHORT), parameter, public :: SQL_C_TIME = 10
645 integer(C_SHORT), parameter, public :: SQL_C_TIMESTAMP = 11
646 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_YEAR = 100+1
647 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_MONTH = 100+2
648 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_DAY = 100+3
649 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_HOUR = 100+4
650 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_MINUTE = 100+5
651 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_SECOND = 100+6
652 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_YEAR_TO_MONTH = 100+7
653 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_DAY_TO_HOUR = 100+8
654 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_DAY_TO_MINUTE = 100+9
655 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_DAY_TO_SECOND = 100+10
656 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_HOUR_TO_MINUTE = 100+11
657 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_HOUR_TO_SECOND = 100+12
658 integer(C_SHORT), parameter, public :: SQL_C_INTERVAL_MINUTE_TO_SECOND = 100+13
659 integer(C_SHORT), parameter, public :: SQL_C_BINARY = -2
660 integer(C_SHORT), parameter, public :: SQL_C_BIT = -7
661 integer(C_SHORT), parameter, public :: SQL_C_SBIGINT = -5 - 20
662 integer(C_SHORT), parameter, public :: SQL_C_UBIGINT = -5 - 22
663 integer(C_SHORT), parameter, public :: SQL_C_TINYINT = -6
664 integer(C_SHORT), parameter, public :: SQL_C_STINYINT = -6 - 20
665 integer(C_SHORT), parameter, public :: SQL_C_UTINYINT = -6 - 22
666 integer(C_SHORT), parameter, public :: SQL_C_GUID = -11
667 integer(C_SHORT), parameter, public :: SQL_TYPE_NULL = 0
668 integer(C_SHORT), parameter, public :: SQL_DRIVER_C_TYPE_BASE = int(z'4000',c_short)
669 integer(C_SHORT), parameter, public :: SQL_DRIVER_SQL_TYPE_BASE = int(z'4000',c_short)
670 integer(C_SHORT), parameter, public :: SQL_DRIVER_DESC_FIELD_BASE = int(z'4000',c_short)
671 integer(C_SHORT), parameter, public :: SQL_DRIVER_DIAG_FIELD_BASE = int(z'4000',c_short)
672 integer(C_SHORT), parameter, public :: SQL_DRIVER_INFO_TYPE_BASE = int(z'4000',c_short)
673 integer(C_SHORT), parameter, public :: SQL_DRIVER_CONN_ATTR_BASE = int(z'00004000',c_short)
674 integer(C_SHORT), parameter, public :: SQL_DRIVER_STMT_ATTR_BASE = int(z'00004000',c_short)
675 integer(C_SHORT), parameter, public :: SQL_C_VARBOOKMARK = -2
676 integer(C_SHORT), parameter, public :: SQL_NO_ROW_NUMBER = -1
677 integer(C_SHORT), parameter, public :: SQL_NO_COLUMN_NUMBER = -1
678 integer(C_SHORT), parameter, public :: SQL_ROW_NUMBER_UNKNOWN = -2
679 integer(C_SHORT), parameter, public :: SQL_COLUMN_NUMBER_UNKNOWN = -2
680 integer(C_SHORT), parameter, public :: SQL_DEFAULT_PARAM = -5
681 integer(C_SHORT), parameter, public :: SQL_IGNORE = -6
682 integer(C_SHORT), parameter, public :: SQL_COLUMN_IGNORE = -6
683 integer(C_SHORT), parameter, public :: SQL_LEN_DATA_AT_EXEC_OFFSET = -100
684 integer(C_SHORT), parameter, public :: SQL_LEN_BINARY_ATTR_OFFSET = -100
685 integer(C_LONG), parameter, public :: SQL_SETPARAM_VALUE_MAX = -1
686 integer(C_SHORT), parameter, public :: SQL_COLUMN_COUNT = 0
687 integer(C_SHORT), parameter, public :: SQL_COLUMN_NAME = 1
688 integer(C_SHORT), parameter, public :: SQL_COLUMN_TYPE = 2
689 integer(C_SHORT), parameter, public :: SQL_COLUMN_LENGTH = 3
690 integer(C_SHORT), parameter, public :: SQL_COLUMN_PRECISION = 4
691 integer(C_SHORT), parameter, public :: SQL_COLUMN_SCALE = 5
692 integer(C_SHORT), parameter, public :: SQL_COLUMN_DISPLAY_SIZE = 6
693 integer(C_SHORT), parameter, public :: SQL_COLUMN_NULLABLE = 7
694 integer(C_SHORT), parameter, public :: SQL_COLUMN_UNSIGNED = 8
695 integer(C_SHORT), parameter, public :: SQL_COLUMN_MONEY = 9
696 integer(C_SHORT), parameter, public :: SQL_COLUMN_UPDATABLE = 10
697 integer(C_SHORT), parameter, public :: SQL_COLUMN_AUTO_INCREMENT = 11
698 integer(C_SHORT), parameter, public :: SQL_COLUMN_CASE_SENSITIVE = 12
699 integer(C_SHORT), parameter, public :: SQL_COLUMN_SEARCHABLE = 13
700 integer(C_SHORT), parameter, public :: SQL_COLUMN_TYPE_NAME = 14
701 integer(C_SHORT), parameter, public :: SQL_COLUMN_TABLE_NAME = 15
702 integer(C_SHORT), parameter, public :: SQL_COLUMN_OWNER_NAME = 16
703 integer(C_SHORT), parameter, public :: SQL_COLUMN_QUALIFIER_NAME = 17
704 integer(C_SHORT), parameter, public :: SQL_COLUMN_LABEL = 18
705 integer(C_SHORT), parameter, public :: SQL_COLATT_OPT_MAX = 18
706 integer(C_SHORT), parameter, public :: SQL_COLATT_OPT_MIN = 0
707 integer(C_INT), parameter, public :: SQL_ATTR_READONLY = 0
708 integer(C_INT), parameter, public :: SQL_ATTR_WRITE = 1
709 integer(C_INT), parameter, public :: SQL_ATTR_READWRITE_UNKNOWN = 2
710 integer(C_SHORT), parameter, public :: SQL_UNSEARCHABLE = 0
711 integer(C_SHORT), parameter, public :: SQL_LIKE_ONLY = 1
712 integer(C_SHORT), parameter, public :: SQL_ALL_EXCEPT_LIKE = 2
713 integer(C_SHORT), parameter, public :: SQL_SEARCHABLE = 3
714 integer(C_SHORT), parameter, public :: SQL_PRED_SEARCHABLE = 3
715 integer(C_SHORT), parameter, public :: SQL_NO_TOTAL = -4
716 integer(C_SHORT), parameter, public :: SQL_API_SQLALLOCHANDLESTD = 73
717 integer(C_SHORT), parameter, public :: SQL_API_SQLBULKOPERATIONS = 24
718 integer(C_SHORT), parameter, public :: SQL_API_SQLBINDPARAMETER = 72
719 integer(C_SHORT), parameter, public :: SQL_API_SQLBROWSECONNECT = 55
720 integer(C_SHORT), parameter, public :: SQL_API_SQLCOLATTRIBUTES = 6
721 integer(C_SHORT), parameter, public :: SQL_API_SQLCOLUMNPRIVILEGES = 56
722 integer(C_SHORT), parameter, public :: SQL_API_SQLDESCRIBEPARAM = 58
723 integer(C_SHORT), parameter, public :: SQL_API_SQLDRIVERCONNECT = 41
724 integer(C_SHORT), parameter, public :: SQL_API_SQLDRIVERS = 71
725 integer(C_SHORT), parameter, public :: SQL_API_SQLEXTENDEDFETCH = 59
726 integer(C_SHORT), parameter, public :: SQL_API_SQLFOREIGNKEYS = 60
727 integer(C_SHORT), parameter, public :: SQL_API_SQLMORERESULTS = 61
728 integer(C_SHORT), parameter, public :: SQL_API_SQLNATIVESQL = 62
729 integer(C_SHORT), parameter, public :: SQL_API_SQLNUMPARAMS = 63
730 integer(C_SHORT), parameter, public :: SQL_API_SQLPARAMOPTIONS = 64
731 integer(C_SHORT), parameter, public :: SQL_API_SQLPRIMARYKEYS = 65
732 integer(C_SHORT), parameter, public :: SQL_API_SQLPROCEDURECOLUMNS = 66
733 integer(C_SHORT), parameter, public :: SQL_API_SQLPROCEDURES = 67
734 integer(C_SHORT), parameter, public :: SQL_API_SQLSETPOS = 68
735 integer(C_SHORT), parameter, public :: SQL_API_SQLSETSCROLLOPTIONS = 69
736 integer(C_SHORT), parameter, public :: SQL_API_SQLTABLEPRIVILEGES = 70
737 integer(C_SHORT), parameter, public :: SQL_API_ALL_FUNCTIONS = 0
738 integer(C_SHORT), parameter, public :: SQL_API_LOADBYORDINAL = 199
739 integer(C_SHORT), parameter, public :: SQL_API_ODBC3_ALL_FUNCTIONS = 999
740 integer(C_SHORT), parameter, public :: SQL_API_ODBC3_ALL_FUNCTIONS_SIZE = 250
741 integer(C_SHORT), parameter, public :: SQL_INFO_FIRST = 0
742 integer(C_SHORT), parameter, public :: SQL_ACTIVE_CONNECTIONS = 0
743 integer(C_SHORT), parameter, public :: SQL_ACTIVE_STATEMENTS = 1
744 integer(C_SHORT), parameter, public :: SQL_DRIVER_HDBC = 3
745 integer(C_SHORT), parameter, public :: SQL_DRIVER_HENV = 4
746 integer(C_SHORT), parameter, public :: SQL_DRIVER_HSTMT = 5
747 integer(C_SHORT), parameter, public :: SQL_DRIVER_NAME = 6
748 integer(C_SHORT), parameter, public :: SQL_DRIVER_VER = 7
749 integer(C_SHORT), parameter, public :: SQL_ODBC_API_CONFORMANCE = 9
750 integer(C_SHORT), parameter, public :: SQL_ODBC_VER = 10
751 integer(C_SHORT), parameter, public :: SQL_ROW_UPDATES = 11
752 integer(C_SHORT), parameter, public :: SQL_ODBC_SAG_CLI_CONFORMANCE = 12
753 integer(C_SHORT), parameter, public :: SQL_ODBC_SQL_CONFORMANCE = 15
754 integer(C_SHORT), parameter, public :: SQL_PROCEDURES = 21
755 integer(C_SHORT), parameter, public :: SQL_CONCAT_NULL_BEHAVIOR = 22
756 integer(C_SHORT), parameter, public :: SQL_CURSOR_ROLLBACK_BEHAVIOR = 24
757 integer(C_SHORT), parameter, public :: SQL_EXPRESSIONS_IN_ORDERBY = 27
758 integer(C_SHORT), parameter, public :: SQL_MAX_OWNER_NAME_LEN = 32
759 integer(C_SHORT), parameter, public :: SQL_MAX_PROCEDURE_NAME_LEN = 33
760 integer(C_SHORT), parameter, public :: SQL_MAX_QUALIFIER_NAME_LEN = 34
761 integer(C_SHORT), parameter, public :: SQL_MULT_RESULT_SETS = 36
762 integer(C_SHORT), parameter, public :: SQL_MULTIPLE_ACTIVE_TXN = 37
763 integer(C_SHORT), parameter, public :: SQL_OUTER_JOINS = 38
764 integer(C_SHORT), parameter, public :: SQL_OWNER_TERM = 39
765 integer(C_SHORT), parameter, public :: SQL_PROCEDURE_TERM = 40
766 integer(C_SHORT), parameter, public :: SQL_QUALIFIER_NAME_SEPARATOR = 41
767 integer(C_SHORT), parameter, public :: SQL_QUALIFIER_TERM = 42
768 integer(C_SHORT), parameter, public :: SQL_SCROLL_OPTIONS = 44
769 integer(C_SHORT), parameter, public :: SQL_TABLE_TERM = 45
770 integer(C_SHORT), parameter, public :: SQL_CONVERT_FUNCTIONS = 48
771 integer(C_SHORT), parameter, public :: SQL_NUMERIC_FUNCTIONS = 49
772 integer(C_SHORT), parameter, public :: SQL_STRING_FUNCTIONS = 50
773 integer(C_SHORT), parameter, public :: SQL_SYSTEM_FUNCTIONS = 51
774 integer(C_SHORT), parameter, public :: SQL_TIMEDATE_FUNCTIONS = 52
775 integer(C_SHORT), parameter, public :: SQL_CONVERT_BIGINT = 53
776 integer(C_SHORT), parameter, public :: SQL_CONVERT_BINARY = 54
777 integer(C_SHORT), parameter, public :: SQL_CONVERT_BIT = 55
778 integer(C_SHORT), parameter, public :: SQL_CONVERT_CHAR = 56
779 integer(C_SHORT), parameter, public :: SQL_CONVERT_DATE = 57
780 integer(C_SHORT), parameter, public :: SQL_CONVERT_DECIMAL = 58
781 integer(C_SHORT), parameter, public :: SQL_CONVERT_DOUBLE = 59
782 integer(C_SHORT), parameter, public :: SQL_CONVERT_FLOAT = 60
783 integer(C_SHORT), parameter, public :: SQL_CONVERT_INTEGER = 61
784 integer(C_SHORT), parameter, public :: SQL_CONVERT_LONGVARCHAR = 62
785 integer(C_SHORT), parameter, public :: SQL_CONVERT_NUMERIC = 63
786 integer(C_SHORT), parameter, public :: SQL_CONVERT_REAL = 64
787 integer(C_SHORT), parameter, public :: SQL_CONVERT_SMALLINT = 65
788 integer(C_SHORT), parameter, public :: SQL_CONVERT_TIME = 66
789 integer(C_SHORT), parameter, public :: SQL_CONVERT_TIMESTAMP = 67
790 integer(C_SHORT), parameter, public :: SQL_CONVERT_TINYINT = 68
791 integer(C_SHORT), parameter, public :: SQL_CONVERT_VARBINARY = 69
792 integer(C_SHORT), parameter, public :: SQL_CONVERT_VARCHAR = 70
793 integer(C_SHORT), parameter, public :: SQL_CONVERT_LONGVARBINARY = 71
794 integer(C_SHORT), parameter, public :: SQL_CONVERT_GUID = 173
795 integer(C_SHORT), parameter, public :: SQL_ODBC_SQL_OPT_IEF = 73
796 integer(C_SHORT), parameter, public :: SQL_CORRELATION_NAME = 74
797 integer(C_SHORT), parameter, public :: SQL_NON_NULLABLE_COLUMNS = 75
798 integer(C_SHORT), parameter, public :: SQL_DRIVER_HLIB = 76
799 integer(C_SHORT), parameter, public :: SQL_DRIVER_ODBC_VER = 77
800 integer(C_SHORT), parameter, public :: SQL_LOCK_TYPES = 78
801 integer(C_SHORT), parameter, public :: SQL_POS_OPERATIONS = 79
802 integer(C_SHORT), parameter, public :: SQL_POSITIONED_STATEMENTS = 80
803 integer(C_SHORT), parameter, public :: SQL_BOOKMARK_PERSISTENCE = 82
804 integer(C_SHORT), parameter, public :: SQL_STATIC_SENSITIVITY = 83
805 integer(C_SHORT), parameter, public :: SQL_FILE_USAGE = 84
806 integer(C_SHORT), parameter, public :: SQL_COLUMN_ALIAS = 87
807 integer(C_SHORT), parameter, public :: SQL_GROUP_BY = 88
808 integer(C_SHORT), parameter, public :: SQL_KEYWORDS = 89
809 integer(C_SHORT), parameter, public :: SQL_OWNER_USAGE = 91
810 integer(C_SHORT), parameter, public :: SQL_QUALIFIER_USAGE = 92
811 integer(C_SHORT), parameter, public :: SQL_QUOTED_IDENTIFIER_CASE = 93
812 integer(C_SHORT), parameter, public :: SQL_SUBQUERIES = 95
813 integer(C_SHORT), parameter, public :: SQL_UNION = 96
814 integer(C_SHORT), parameter, public :: SQL_MAX_ROW_SIZE_INCLUDES_LONG = 103
815 integer(C_SHORT), parameter, public :: SQL_MAX_CHAR_LITERAL_LEN = 108
816 integer(C_SHORT), parameter, public :: SQL_TIMEDATE_ADD_INTERVALS = 109
817 integer(C_SHORT), parameter, public :: SQL_TIMEDATE_DIFF_INTERVALS = 110
818 integer(C_SHORT), parameter, public :: SQL_NEED_LONG_DATA_LEN = 111
819 integer(C_SHORT), parameter, public :: SQL_MAX_BINARY_LITERAL_LEN = 112
820 integer(C_SHORT), parameter, public :: SQL_LIKE_ESCAPE_CLAUSE = 113
821 integer(C_SHORT), parameter, public :: SQL_QUALIFIER_LOCATION = 114
822 integer(C_SHORT), parameter, public :: SQL_ACTIVE_ENVIRONMENTS = 116
823 integer(C_SHORT), parameter, public :: SQL_ALTER_DOMAIN = 117
824 integer(C_SHORT), parameter, public :: SQL_SQL_CONFORMANCE = 118
825 integer(C_SHORT), parameter, public :: SQL_DATETIME_LITERALS = 119
826 integer(C_SHORT), parameter, public :: SQL_ASYNC_MODE = 10021
827 integer(C_SHORT), parameter, public :: SQL_BATCH_ROW_COUNT = 120
828 integer(C_SHORT), parameter, public :: SQL_BATCH_SUPPORT = 121
829 integer(C_SHORT), parameter, public :: SQL_CATALOG_LOCATION = 114
830 integer(C_SHORT), parameter, public :: SQL_CATALOG_NAME_SEPARATOR = 41
831 integer(C_SHORT), parameter, public :: SQL_CATALOG_TERM = 42
832 integer(C_SHORT), parameter, public :: SQL_CATALOG_USAGE = 92
833 integer(C_SHORT), parameter, public :: SQL_CONVERT_WCHAR = 122
834 integer(C_SHORT), parameter, public :: SQL_CONVERT_INTERVAL_DAY_TIME = 123
835 integer(C_SHORT), parameter, public :: SQL_CONVERT_INTERVAL_YEAR_MONTH = 124
836 integer(C_SHORT), parameter, public :: SQL_CONVERT_WLONGVARCHAR = 125
837 integer(C_SHORT), parameter, public :: SQL_CONVERT_WVARCHAR = 126
838 integer(C_SHORT), parameter, public :: SQL_CREATE_ASSERTION = 127
839 integer(C_SHORT), parameter, public :: SQL_CREATE_CHARACTER_SET = 128
840 integer(C_SHORT), parameter, public :: SQL_CREATE_COLLATION = 129
841 integer(C_SHORT), parameter, public :: SQL_CREATE_DOMAIN = 130
842 integer(C_SHORT), parameter, public :: SQL_CREATE_SCHEMA = 131
843 integer(C_SHORT), parameter, public :: SQL_CREATE_TABLE = 132
844 integer(C_SHORT), parameter, public :: SQL_CREATE_TRANSLATION = 133
845 integer(C_SHORT), parameter, public :: SQL_CREATE_VIEW = 134
846 integer(C_SHORT), parameter, public :: SQL_DRIVER_HDESC = 135
847 integer(C_SHORT), parameter, public :: SQL_DROP_ASSERTION = 136
848 integer(C_SHORT), parameter, public :: SQL_DROP_CHARACTER_SET = 137
849 integer(C_SHORT), parameter, public :: SQL_DROP_COLLATION = 138
850 integer(C_SHORT), parameter, public :: SQL_DROP_DOMAIN = 139
851 integer(C_SHORT), parameter, public :: SQL_DROP_SCHEMA = 140
852 integer(C_SHORT), parameter, public :: SQL_DROP_TABLE = 141
853 integer(C_SHORT), parameter, public :: SQL_DROP_TRANSLATION = 142
854 integer(C_SHORT), parameter, public :: SQL_DROP_VIEW = 143
855 integer(C_SHORT), parameter, public :: SQL_DYNAMIC_CURSOR_ATTRIBUTES1 = 144
856 integer(C_SHORT), parameter, public :: SQL_DYNAMIC_CURSOR_ATTRIBUTES2 = 145
857 integer(C_SHORT), parameter, public :: SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 = 146
858 integer(C_SHORT), parameter, public :: SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 = 147
859 integer(C_SHORT), parameter, public :: SQL_INDEX_KEYWORDS = 148
860 integer(C_SHORT), parameter, public :: SQL_INFO_SCHEMA_VIEWS = 149
861 integer(C_SHORT), parameter, public :: SQL_KEYSET_CURSOR_ATTRIBUTES1 = 150
862 integer(C_SHORT), parameter, public :: SQL_KEYSET_CURSOR_ATTRIBUTES2 = 151
863 integer(C_SHORT), parameter, public :: SQL_MAX_ASYNC_CONCURRENT_STATEMENTS = 10022
864 integer(C_SHORT), parameter, public :: SQL_ODBC_INTERFACE_CONFORMANCE = 152
865 integer(C_SHORT), parameter, public :: SQL_PARAM_ARRAY_ROW_COUNTS = 153
866 integer(C_SHORT), parameter, public :: SQL_PARAM_ARRAY_SELECTS = 154
867 integer(C_SHORT), parameter, public :: SQL_SCHEMA_TERM = 39
868 integer(C_SHORT), parameter, public :: SQL_SCHEMA_USAGE = 91
869 integer(C_SHORT), parameter, public :: SQL_SQL92_DATETIME_FUNCTIONS = 155
870 integer(C_SHORT), parameter, public :: SQL_SQL92_FOREIGN_KEY_DELETE_RULE = 156
871 integer(C_SHORT), parameter, public :: SQL_SQL92_FOREIGN_KEY_UPDATE_RULE = 157
872 integer(C_SHORT), parameter, public :: SQL_SQL92_GRANT = 158
873 integer(C_SHORT), parameter, public :: SQL_SQL92_NUMERIC_VALUE_FUNCTIONS = 159
874 integer(C_SHORT), parameter, public :: SQL_SQL92_PREDICATES = 160
875 integer(C_SHORT), parameter, public :: SQL_SQL92_RELATIONAL_JOIN_OPERATORS = 161
876 integer(C_SHORT), parameter, public :: SQL_SQL92_REVOKE = 162
877 integer(C_SHORT), parameter, public :: SQL_SQL92_ROW_VALUE_CONSTRUCTOR = 163
878 integer(C_SHORT), parameter, public :: SQL_SQL92_STRING_FUNCTIONS = 164
879 integer(C_SHORT), parameter, public :: SQL_SQL92_VALUE_EXPRESSIONS = 165
880 integer(C_SHORT), parameter, public :: SQL_STANDARD_CLI_CONFORMANCE = 166
881 integer(C_SHORT), parameter, public :: SQL_STATIC_CURSOR_ATTRIBUTES1 = 167
882 integer(C_SHORT), parameter, public :: SQL_STATIC_CURSOR_ATTRIBUTES2 = 168
883 integer(C_SHORT), parameter, public :: SQL_AGGREGATE_FUNCTIONS = 169
884 integer(C_SHORT), parameter, public :: SQL_DDL_INDEX = 170
885 integer(C_SHORT), parameter, public :: SQL_DM_VER = 171
886 integer(C_SHORT), parameter, public :: SQL_INSERT_STATEMENT = 172
887 integer(C_SHORT), parameter, public :: SQL_UNION_STATEMENT = 96
888 integer(C_SHORT), parameter, public :: SQL_ASYNC_DBC_FUNCTIONS = 10023
889 integer(C_SHORT), parameter, public :: SQL_DRIVER_AWARE_POOLING_SUPPORTED = 10024
890 integer(C_SHORT), parameter, public :: SQL_ASYNC_NOTIFICATION = 10025
891 integer(C_LONG), parameter, public :: SQL_ASYNC_NOTIFICATION_NOT_CAPABLE = int(z'00000000',c_long)
892 integer(C_LONG), parameter, public :: SQL_ASYNC_NOTIFICATION_CAPABLE = int(z'00000001',c_long)
893 integer(C_SHORT), parameter, public :: SQL_DTC_TRANSITION_COST = 1750
894 integer(C_LONG), parameter, public :: SQL_AT_ADD_COLUMN_SINGLE = int(z'00000020',c_long)
895 integer(C_LONG), parameter, public :: SQL_AT_ADD_COLUMN_DEFAULT = int(z'00000040',c_long)
896 integer(C_LONG), parameter, public :: SQL_AT_ADD_COLUMN_COLLATION = int(z'00000080',c_long)
897 integer(C_LONG), parameter, public :: SQL_AT_SET_COLUMN_DEFAULT = int(z'00000100',c_long)
898 integer(C_LONG), parameter, public :: SQL_AT_DROP_COLUMN_DEFAULT = int(z'00000200',c_long)
899 integer(C_LONG), parameter, public :: SQL_AT_DROP_COLUMN_CASCADE = int(z'00000400',c_long)
900 integer(C_LONG), parameter, public :: SQL_AT_DROP_COLUMN_RESTRICT = int(z'00000800',c_long)
901 integer(C_LONG), parameter, public :: SQL_AT_ADD_TABLE_CONSTRAINT = int(z'00001000',c_long)
902 integer(C_LONG), parameter, public :: SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE = int(z'00002000',c_long)
903 integer(C_LONG), parameter, public :: SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT = int(z'00004000',c_long)
904 integer(C_LONG), parameter, public :: SQL_AT_CONSTRAINT_NAME_DEFINITION = int(z'00008000',c_long)
905 integer(C_LONG), parameter, public :: SQL_AT_CONSTRAINT_INITIALLY_DEFERRED = int(z'00010000',c_long)
906 integer(C_LONG), parameter, public :: SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE = int(z'00020000',c_long)
907 integer(C_LONG), parameter, public :: SQL_AT_CONSTRAINT_DEFERRABLE = int(z'00040000',c_long)
908 integer(C_LONG), parameter, public :: SQL_AT_CONSTRAINT_NON_DEFERRABLE = int(z'00080000',c_long)
909 integer(C_LONG), parameter, public :: SQL_CVT_CHAR = int(z'00000001',c_long)
910 integer(C_LONG), parameter, public :: SQL_CVT_NUMERIC = int(z'00000002',c_long)
911 integer(C_LONG), parameter, public :: SQL_CVT_DECIMAL = int(z'00000004',c_long)
912 integer(C_LONG), parameter, public :: SQL_CVT_INTEGER = int(z'00000008',c_long)
913 integer(C_LONG), parameter, public :: SQL_CVT_SMALLINT = int(z'00000010',c_long)
914 integer(C_LONG), parameter, public :: SQL_CVT_FLOAT = int(z'00000020',c_long)
915 integer(C_LONG), parameter, public :: SQL_CVT_REAL = int(z'00000040',c_long)
916 integer(C_LONG), parameter, public :: SQL_CVT_DOUBLE = int(z'00000080',c_long)
917 integer(C_LONG), parameter, public :: SQL_CVT_VARCHAR = int(z'00000100',c_long)
918 integer(C_LONG), parameter, public :: SQL_CVT_LONGVARCHAR = int(z'00000200',c_long)
919 integer(C_LONG), parameter, public :: SQL_CVT_BINARY = int(z'00000400',c_long)
920 integer(C_LONG), parameter, public :: SQL_CVT_VARBINARY = int(z'00000800',c_long)
921 integer(C_LONG), parameter, public :: SQL_CVT_BIT = int(z'00001000',c_long)
922 integer(C_LONG), parameter, public :: SQL_CVT_TINYINT = int(z'00002000',c_long)
923 integer(C_LONG), parameter, public :: SQL_CVT_BIGINT = int(z'00004000',c_long)
924 integer(C_LONG), parameter, public :: SQL_CVT_DATE = int(z'00008000',c_long)
925 integer(C_LONG), parameter, public :: SQL_CVT_TIME = int(z'00010000',c_long)
926 integer(C_LONG), parameter, public :: SQL_CVT_TIMESTAMP = int(z'00020000',c_long)
927 integer(C_LONG), parameter, public :: SQL_CVT_LONGVARBINARY = int(z'00040000',c_long)
928 integer(C_LONG), parameter, public :: SQL_CVT_INTERVAL_YEAR_MONTH = int(z'00080000',c_long)
929 integer(C_LONG), parameter, public :: SQL_CVT_INTERVAL_DAY_TIME = int(z'00100000',c_long)
930 integer(C_LONG), parameter, public :: SQL_CVT_WCHAR = int(z'00200000',c_long)
931 integer(C_LONG), parameter, public :: SQL_CVT_WLONGVARCHAR = int(z'00400000',c_long)
932 integer(C_LONG), parameter, public :: SQL_CVT_WVARCHAR = int(z'00800000',c_long)
933 integer(C_LONG), parameter, public :: SQL_CVT_GUID = int(z'01000000',c_long)
934 integer(C_LONG), parameter, public :: SQL_FN_CVT_CONVERT = int(z'00000001',c_long)
935 integer(C_LONG), parameter, public :: SQL_FN_CVT_CAST = int(z'00000002',c_long)
936 integer(C_LONG), parameter, public :: SQL_FN_STR_CONCAT = int(z'00000001',c_long)
937 integer(C_LONG), parameter, public :: SQL_FN_STR_INSERT = int(z'00000002',c_long)
938 integer(C_LONG), parameter, public :: SQL_FN_STR_LEFT = int(z'00000004',c_long)
939 integer(C_LONG), parameter, public :: SQL_FN_STR_LTRIM = int(z'00000008',c_long)
940 integer(C_LONG), parameter, public :: SQL_FN_STR_LENGTH = int(z'00000010',c_long)
941 integer(C_LONG), parameter, public :: SQL_FN_STR_LOCATE = int(z'00000020',c_long)
942 integer(C_LONG), parameter, public :: SQL_FN_STR_LCASE = int(z'00000040',c_long)
943 integer(C_LONG), parameter, public :: SQL_FN_STR_REPEAT = int(z'00000080',c_long)
944 integer(C_LONG), parameter, public :: SQL_FN_STR_REPLACE = int(z'00000100',c_long)
945 integer(C_LONG), parameter, public :: SQL_FN_STR_RIGHT = int(z'00000200',c_long)
946 integer(C_LONG), parameter, public :: SQL_FN_STR_RTRIM = int(z'00000400',c_long)
947 integer(C_LONG), parameter, public :: SQL_FN_STR_SUBSTRING = int(z'00000800',c_long)
948 integer(C_LONG), parameter, public :: SQL_FN_STR_UCASE = int(z'00001000',c_long)
949 integer(C_LONG), parameter, public :: SQL_FN_STR_ASCII = int(z'00002000',c_long)
950 integer(C_LONG), parameter, public :: SQL_FN_STR_CHAR = int(z'00004000',c_long)
951 integer(C_LONG), parameter, public :: SQL_FN_STR_DIFFERENCE = int(z'00008000',c_long)
952 integer(C_LONG), parameter, public :: SQL_FN_STR_LOCATE_2 = int(z'00010000',c_long)
953 integer(C_LONG), parameter, public :: SQL_FN_STR_SOUNDEX = int(z'00020000',c_long)
954 integer(C_LONG), parameter, public :: SQL_FN_STR_SPACE = int(z'00040000',c_long)
955 integer(C_LONG), parameter, public :: SQL_FN_STR_BIT_LENGTH = int(z'00080000',c_long)
956 integer(C_LONG), parameter, public :: SQL_FN_STR_CHAR_LENGTH = int(z'00100000',c_long)
957 integer(C_LONG), parameter, public :: SQL_FN_STR_CHARACTER_LENGTH = int(z'00200000',c_long)
958 integer(C_LONG), parameter, public :: SQL_FN_STR_OCTET_LENGTH = int(z'00400000',c_long)
959 integer(C_LONG), parameter, public :: SQL_FN_STR_POSITION = int(z'00800000',c_long)
960 integer(C_LONG), parameter, public :: SQL_SSF_CONVERT = int(z'00000001',c_long)
961 integer(C_LONG), parameter, public :: SQL_SSF_LOWER = int(z'00000002',c_long)
962 integer(C_LONG), parameter, public :: SQL_SSF_UPPER = int(z'00000004',c_long)
963 integer(C_LONG), parameter, public :: SQL_SSF_SUBSTRING = int(z'00000008',c_long)
964 integer(C_LONG), parameter, public :: SQL_SSF_TRANSLATE = int(z'00000010',c_long)
965 integer(C_LONG), parameter, public :: SQL_SSF_TRIM_BOTH = int(z'00000020',c_long)
966 integer(C_LONG), parameter, public :: SQL_SSF_TRIM_LEADING = int(z'00000040',c_long)
967 integer(C_LONG), parameter, public :: SQL_SSF_TRIM_TRAILING = int(z'00000080',c_long)
968 integer(C_LONG), parameter, public :: SQL_FN_NUM_ABS = int(z'00000001',c_long)
969 integer(C_LONG), parameter, public :: SQL_FN_NUM_ACOS = int(z'00000002',c_long)
970 integer(C_LONG), parameter, public :: SQL_FN_NUM_ASIN = int(z'00000004',c_long)
971 integer(C_LONG), parameter, public :: SQL_FN_NUM_ATAN = int(z'00000008',c_long)
972 integer(C_LONG), parameter, public :: SQL_FN_NUM_ATAN2 = int(z'00000010',c_long)
973 integer(C_LONG), parameter, public :: SQL_FN_NUM_CEILING = int(z'00000020',c_long)
974 integer(C_LONG), parameter, public :: SQL_FN_NUM_COS = int(z'00000040',c_long)
975 integer(C_LONG), parameter, public :: SQL_FN_NUM_COT = int(z'00000080',c_long)
976 integer(C_LONG), parameter, public :: SQL_FN_NUM_EXP = int(z'00000100',c_long)
977 integer(C_LONG), parameter, public :: SQL_FN_NUM_FLOOR = int(z'00000200',c_long)
978 integer(C_LONG), parameter, public :: SQL_FN_NUM_LOG = int(z'00000400',c_long)
979 integer(C_LONG), parameter, public :: SQL_FN_NUM_MOD = int(z'00000800',c_long)
980 integer(C_LONG), parameter, public :: SQL_FN_NUM_SIGN = int(z'00001000',c_long)
981 integer(C_LONG), parameter, public :: SQL_FN_NUM_SIN = int(z'00002000',c_long)
982 integer(C_LONG), parameter, public :: SQL_FN_NUM_SQRT = int(z'00004000',c_long)
983 integer(C_LONG), parameter, public :: SQL_FN_NUM_TAN = int(z'00008000',c_long)
984 integer(C_LONG), parameter, public :: SQL_FN_NUM_PI = int(z'00010000',c_long)
985 integer(C_LONG), parameter, public :: SQL_FN_NUM_RAND = int(z'00020000',c_long)
986 integer(C_LONG), parameter, public :: SQL_FN_NUM_DEGREES = int(z'00040000',c_long)
987 integer(C_LONG), parameter, public :: SQL_FN_NUM_LOG10 = int(z'00080000',c_long)
988 integer(C_LONG), parameter, public :: SQL_FN_NUM_POWER = int(z'00100000',c_long)
989 integer(C_LONG), parameter, public :: SQL_FN_NUM_RADIANS = int(z'00200000',c_long)
990 integer(C_LONG), parameter, public :: SQL_FN_NUM_ROUND = int(z'00400000',c_long)
991 integer(C_LONG), parameter, public :: SQL_FN_NUM_TRUNCATE = int(z'00800000',c_long)
992 integer(C_LONG), parameter, public :: SQL_SNVF_BIT_LENGTH = int(z'00000001',c_long)
993 integer(C_LONG), parameter, public :: SQL_SNVF_CHAR_LENGTH = int(z'00000002',c_long)
994 integer(C_LONG), parameter, public :: SQL_SNVF_CHARACTER_LENGTH = int(z'00000004',c_long)
995 integer(C_LONG), parameter, public :: SQL_SNVF_EXTRACT = int(z'00000008',c_long)
996 integer(C_LONG), parameter, public :: SQL_SNVF_OCTET_LENGTH = int(z'00000010',c_long)
997 integer(C_LONG), parameter, public :: SQL_SNVF_POSITION = int(z'00000020',c_long)
998 integer(C_LONG), parameter, public :: SQL_FN_TD_NOW = int(z'00000001',c_long)
999 integer(C_LONG), parameter, public :: SQL_FN_TD_CURDATE = int(z'00000002',c_long)
1000 integer(C_LONG), parameter, public :: SQL_FN_TD_DAYOFMONTH = int(z'00000004',c_long)
1001 integer(C_LONG), parameter, public :: SQL_FN_TD_DAYOFWEEK = int(z'00000008',c_long)
1002 integer(C_LONG), parameter, public :: SQL_FN_TD_DAYOFYEAR = int(z'00000010',c_long)
1003 integer(C_LONG), parameter, public :: SQL_FN_TD_MONTH = int(z'00000020',c_long)
1004 integer(C_LONG), parameter, public :: SQL_FN_TD_QUARTER = int(z'00000040',c_long)
1005 integer(C_LONG), parameter, public :: SQL_FN_TD_WEEK = int(z'00000080',c_long)
1006 integer(C_LONG), parameter, public :: SQL_FN_TD_YEAR = int(z'00000100',c_long)
1007 integer(C_LONG), parameter, public :: SQL_FN_TD_CURTIME = int(z'00000200',c_long)
1008 integer(C_LONG), parameter, public :: SQL_FN_TD_HOUR = int(z'00000400',c_long)
1009 integer(C_LONG), parameter, public :: SQL_FN_TD_MINUTE = int(z'00000800',c_long)
1010 integer(C_LONG), parameter, public :: SQL_FN_TD_SECOND = int(z'00001000',c_long)
1011 integer(C_LONG), parameter, public :: SQL_FN_TD_TIMESTAMPADD = int(z'00002000',c_long)
1012 integer(C_LONG), parameter, public :: SQL_FN_TD_TIMESTAMPDIFF = int(z'00004000',c_long)
1013 integer(C_LONG), parameter, public :: SQL_FN_TD_DAYNAME = int(z'00008000',c_long)
1014 integer(C_LONG), parameter, public :: SQL_FN_TD_MONTHNAME = int(z'00010000',c_long)
1015 integer(C_LONG), parameter, public :: SQL_FN_TD_CURRENT_DATE = int(z'00020000',c_long)
1016 integer(C_LONG), parameter, public :: SQL_FN_TD_CURRENT_TIME = int(z'00040000',c_long)
1017 integer(C_LONG), parameter, public :: SQL_FN_TD_CURRENT_TIMESTAMP = int(z'00080000',c_long)
1018 integer(C_LONG), parameter, public :: SQL_FN_TD_EXTRACT = int(z'00100000',c_long)
1019 integer(C_LONG), parameter, public :: SQL_SDF_CURRENT_DATE = int(z'00000001',c_long)
1020 integer(C_LONG), parameter, public :: SQL_SDF_CURRENT_TIME = int(z'00000002',c_long)
1021 integer(C_LONG), parameter, public :: SQL_SDF_CURRENT_TIMESTAMP = int(z'00000004',c_long)
1022 integer(C_LONG), parameter, public :: SQL_FN_SYS_USERNAME = int(z'00000001',c_long)
1023 integer(C_LONG), parameter, public :: SQL_FN_SYS_DBNAME = int(z'00000002',c_long)
1024 integer(C_LONG), parameter, public :: SQL_FN_SYS_IFNULL = int(z'00000004',c_long)
1025 integer(C_LONG), parameter, public :: SQL_FN_TSI_FRAC_SECOND = int(z'00000001',c_long)
1026 integer(C_LONG), parameter, public :: SQL_FN_TSI_SECOND = int(z'00000002',c_long)
1027 integer(C_LONG), parameter, public :: SQL_FN_TSI_MINUTE = int(z'00000004',c_long)
1028 integer(C_LONG), parameter, public :: SQL_FN_TSI_HOUR = int(z'00000008',c_long)
1029 integer(C_LONG), parameter, public :: SQL_FN_TSI_DAY = int(z'00000010',c_long)
1030 integer(C_LONG), parameter, public :: SQL_FN_TSI_WEEK = int(z'00000020',c_long)
1031 integer(C_LONG), parameter, public :: SQL_FN_TSI_MONTH = int(z'00000040',c_long)
1032 integer(C_LONG), parameter, public :: SQL_FN_TSI_QUARTER = int(z'00000080',c_long)
1033 integer(C_LONG), parameter, public :: SQL_FN_TSI_YEAR = int(z'00000100',c_long)
1034 integer(C_LONG), parameter, public :: SQL_CA1_NEXT = int(z'00000001',c_long)
1035 integer(C_LONG), parameter, public :: SQL_CA1_ABSOLUTE = int(z'00000002',c_long)
1036 integer(C_LONG), parameter, public :: SQL_CA1_RELATIVE = int(z'00000004',c_long)
1037 integer(C_LONG), parameter, public :: SQL_CA1_BOOKMARK = int(z'00000008',c_long)
1038 integer(C_LONG), parameter, public :: SQL_CA1_LOCK_NO_CHANGE = int(z'00000040',c_long)
1039 integer(C_LONG), parameter, public :: SQL_CA1_LOCK_EXCLUSIVE = int(z'00000080',c_long)
1040 integer(C_LONG), parameter, public :: SQL_CA1_LOCK_UNLOCK = int(z'00000100',c_long)
1041 integer(C_LONG), parameter, public :: SQL_CA1_POS_POSITION = int(z'00000200',c_long)
1042 integer(C_LONG), parameter, public :: SQL_CA1_POS_UPDATE = int(z'00000400',c_long)
1043 integer(C_LONG), parameter, public :: SQL_CA1_POS_DELETE = int(z'00000800',c_long)
1044 integer(C_LONG), parameter, public :: SQL_CA1_POS_REFRESH = int(z'00001000',c_long)
1045 integer(C_LONG), parameter, public :: SQL_CA1_POSITIONED_UPDATE = int(z'00002000',c_long)
1046 integer(C_LONG), parameter, public :: SQL_CA1_POSITIONED_DELETE = int(z'00004000',c_long)
1047 integer(C_LONG), parameter, public :: SQL_CA1_SELECT_FOR_UPDATE = int(z'00008000',c_long)
1048 integer(C_LONG), parameter, public :: SQL_CA1_BULK_ADD = int(z'00010000',c_long)
1049 integer(C_LONG), parameter, public :: SQL_CA1_BULK_UPDATE_BY_BOOKMARK = int(z'00020000',c_long)
1050 integer(C_LONG), parameter, public :: SQL_CA1_BULK_DELETE_BY_BOOKMARK = int(z'00040000',c_long)
1051 integer(C_LONG), parameter, public :: SQL_CA1_BULK_FETCH_BY_BOOKMARK = int(z'00080000',c_long)
1052 integer(C_LONG), parameter, public :: SQL_CA2_READ_ONLY_CONCURRENCY = int(z'00000001',c_long)
1053 integer(C_LONG), parameter, public :: SQL_CA2_LOCK_CONCURRENCY = int(z'00000002',c_long)
1054 integer(C_LONG), parameter, public :: SQL_CA2_OPT_ROWVER_CONCURRENCY = int(z'00000004',c_long)
1055 integer(C_LONG), parameter, public :: SQL_CA2_OPT_VALUES_CONCURRENCY = int(z'00000008',c_long)
1056 integer(C_LONG), parameter, public :: SQL_CA2_SENSITIVITY_ADDITIONS = int(z'00000010',c_long)
1057 integer(C_LONG), parameter, public :: SQL_CA2_SENSITIVITY_DELETIONS = int(z'00000020',c_long)
1058 integer(C_LONG), parameter, public :: SQL_CA2_SENSITIVITY_UPDATES = int(z'00000040',c_long)
1059 integer(C_LONG), parameter, public :: SQL_CA2_MAX_ROWS_SELECT = int(z'00000080',c_long)
1060 integer(C_LONG), parameter, public :: SQL_CA2_MAX_ROWS_INSERT = int(z'00000100',c_long)
1061 integer(C_LONG), parameter, public :: SQL_CA2_MAX_ROWS_DELETE = int(z'00000200',c_long)
1062 integer(C_LONG), parameter, public :: SQL_CA2_MAX_ROWS_UPDATE = int(z'00000400',c_long)
1063 integer(C_LONG), parameter, public :: SQL_CA2_MAX_ROWS_CATALOG = int(z'00000800',c_long)
1064 ! integer(C_LONG), parameter, public :: SQL_CA2_MAX_ROWS_AFFECTS_ALL = (int(z'00000080',C_LONG).or.int(z'00000100',C_LONG).or.int(z'00000200',C_LONG).or.int(z'00000400',C_LONG).or.int(z'00000800',C_LONG))
1065 integer(C_LONG), parameter, public :: SQL_CA2_CRC_EXACT = int(z'00001000',c_long)
1066 integer(C_LONG), parameter, public :: SQL_CA2_CRC_APPROXIMATE = int(z'00002000',c_long)
1067 integer(C_LONG), parameter, public :: SQL_CA2_SIMULATE_NON_UNIQUE = int(z'00004000',c_long)
1068 integer(C_LONG), parameter, public :: SQL_CA2_SIMULATE_TRY_UNIQUE = int(z'00008000',c_long)
1069 integer(C_LONG), parameter, public :: SQL_CA2_SIMULATE_UNIQUE = int(z'00010000',c_long)
1070 integer(C_SHORT), parameter, public :: SQL_OAC_NONE = int(z'0000', c_short)
1071 integer(C_SHORT), parameter, public :: SQL_OAC_LEVEL1 = int(z'0001', c_short)
1072 integer(C_SHORT), parameter, public :: SQL_OAC_LEVEL2 = int(z'0002', c_short)
1073 integer(C_SHORT), parameter, public :: SQL_OSCC_NOT_COMPLIANT = int(z'0000', c_short)
1074 integer(C_SHORT), parameter, public :: SQL_OSCC_COMPLIANT = int(z'0001', c_short)
1075 integer(C_SHORT), parameter, public :: SQL_OSC_MINIMUM = int(z'0000', c_short)
1076 integer(C_SHORT), parameter, public :: SQL_OSC_CORE = int(z'0001', c_short)
1077 integer(C_SHORT), parameter, public :: SQL_OSC_EXTENDED = int(z'0002', c_short)
1078 integer(C_SHORT), parameter, public :: SQL_CB_NULL = int(z'0000', c_short)
1079 integer(C_SHORT), parameter, public :: SQL_CB_NON_NULL = int(z'0001', c_short)
1080 integer(C_LONG), parameter, public :: SQL_SO_FORWARD_ONLY = int(z'00000001', c_long)
1081 integer(C_LONG), parameter, public :: SQL_SO_KEYSET_DRIVEN = int(z'00000002', c_long)
1082 integer(C_LONG), parameter, public :: SQL_SO_DYNAMIC = int(z'00000004', c_long)
1083 integer(C_LONG), parameter, public :: SQL_SO_MIXED = int(z'00000008', c_long)
1084 integer(C_LONG), parameter, public :: SQL_SO_STATIC = int(z'00000010', c_long)
1085 integer(C_LONG), parameter, public :: SQL_FD_FETCH_BOOKMARK = int(z'00000080', c_long)
1086 integer(C_SHORT), parameter, public :: SQL_CN_NONE = int(z'0000', c_long)
1087 integer(C_SHORT), parameter, public :: SQL_CN_DIFFERENT = int(z'0001', c_long)
1088 integer(C_SHORT), parameter, public :: SQL_CN_ANY = int(z'0002', c_long)
1089 integer(C_SHORT), parameter, public :: SQL_NNC_NULL = int(z'0000', c_long)
1090 integer(C_SHORT), parameter, public :: SQL_NNC_NON_NULL = int(z'0001', c_long)
1091 integer(C_SHORT), parameter, public :: SQL_NC_START = int(z'0002', c_long)
1092 integer(C_SHORT), parameter, public :: SQL_NC_END = int(z'0004', c_long)
1093 integer(C_SHORT), parameter, public :: SQL_FILE_NOT_SUPPORTED = int(z'0000', c_long)
1094 integer(C_SHORT), parameter, public :: SQL_FILE_TABLE = int(z'0001', c_long)
1095 integer(C_SHORT), parameter, public :: SQL_FILE_QUALIFIER = int(z'0002', c_long)
1096 integer(C_SHORT), parameter, public :: SQL_FILE_CATALOG = int(z'0002', c_long)
1097 integer(C_LONG), parameter, public :: SQL_GD_BLOCK = int(z'00000004', c_long)
1098 integer(C_LONG), parameter, public :: SQL_GD_BOUND = int(z'00000008', c_long)
1099 integer(C_LONG), parameter, public :: SQL_GD_OUTPUT_PARAMS = int(z'00000010', c_long)
1100 integer(C_LONG), parameter, public :: SQL_PS_POSITIONED_DELETE = int(z'00000001', c_long)
1101 integer(C_LONG), parameter, public :: SQL_PS_POSITIONED_UPDATE = int(z'00000002', c_long)
1102 integer(C_LONG), parameter, public :: SQL_PS_SELECT_FOR_UPDATE = int(z'00000004', c_long)
1103 integer(C_SHORT), parameter, public :: SQL_GB_NOT_SUPPORTED = int(z'0000', c_short)
1104 integer(C_SHORT), parameter, public :: SQL_GB_GROUP_BY_EQUALS_SELECT = int(z'0001', c_short)
1105 integer(C_SHORT), parameter, public :: SQL_GB_GROUP_BY_CONTAINS_SELECT = int(z'0002', c_short)
1106 integer(C_SHORT), parameter, public :: SQL_GB_NO_RELATION = int(z'0003', c_short)
1107 integer(C_SHORT), parameter, public :: SQL_GB_COLLATE = int(z'0004', c_short)
1108 integer(C_LONG), parameter, public :: SQL_OU_DML_STATEMENTS = int(z'00000001', c_long)
1109 integer(C_LONG), parameter, public :: SQL_OU_PROCEDURE_INVOCATION = int(z'00000002', c_long)
1110 integer(C_LONG), parameter, public :: SQL_OU_TABLE_DEFINITION = int(z'00000004', c_long)
1111 integer(C_LONG), parameter, public :: SQL_OU_INDEX_DEFINITION = int(z'00000008', c_long)
1112 integer(C_LONG), parameter, public :: SQL_OU_PRIVILEGE_DEFINITION = int(z'00000010', c_long)
1113 integer(C_LONG), parameter, public :: SQL_SU_DML_STATEMENTS = int(z'00000001', c_long)
1114 integer(C_LONG), parameter, public :: SQL_SU_PROCEDURE_INVOCATION = int(z'00000002', c_long)
1115 integer(C_LONG), parameter, public :: SQL_SU_TABLE_DEFINITION = int(z'00000004', c_long)
1116 integer(C_LONG), parameter, public :: SQL_SU_INDEX_DEFINITION = int(z'00000008', c_long)
1117 integer(C_LONG), parameter, public :: SQL_SU_PRIVILEGE_DEFINITION = int(z'00000010', c_long)
1118 integer(C_LONG), parameter, public :: SQL_QU_DML_STATEMENTS = int(z'00000001', c_long)
1119 integer(C_LONG), parameter, public :: SQL_QU_PROCEDURE_INVOCATION = int(z'00000002', c_long)
1120 integer(C_LONG), parameter, public :: SQL_QU_TABLE_DEFINITION = int(z'00000004', c_long)
1121 integer(C_LONG), parameter, public :: SQL_QU_INDEX_DEFINITION = int(z'00000008', c_long)
1122 integer(C_LONG), parameter, public :: SQL_QU_PRIVILEGE_DEFINITION = int(z'00000010', c_long)
1123 integer(C_LONG), parameter, public :: SQL_CU_DML_STATEMENTS = int(z'00000001', c_long)
1124 integer(C_LONG), parameter, public :: SQL_CU_PROCEDURE_INVOCATION = int(z'00000002', c_long)
1125 integer(C_LONG), parameter, public :: SQL_CU_TABLE_DEFINITION = int(z'00000004', c_long)
1126 integer(C_LONG), parameter, public :: SQL_CU_INDEX_DEFINITION = int(z'00000008', c_long)
1127 integer(C_LONG), parameter, public :: SQL_CU_PRIVILEGE_DEFINITION = int(z'00000010', c_long)
1128 integer(C_LONG), parameter, public :: SQL_SQ_COMPARISON = int(z'00000001', c_long)
1129 integer(C_LONG), parameter, public :: SQL_SQ_EXISTS = int(z'00000002', c_long)
1130 integer(C_LONG), parameter, public :: SQL_SQ_IN = int(z'00000004', c_long)
1131 integer(C_LONG), parameter, public :: SQL_SQ_QUANTIFIED = int(z'00000008', c_long)
1132 integer(C_LONG), parameter, public :: SQL_SQ_CORRELATED_SUBQUERIES = int(z'00000010', c_long)
1133 integer(C_LONG), parameter, public :: SQL_U_UNION = int(z'00000001', c_long)
1134 integer(C_LONG), parameter, public :: SQL_U_UNION_ALL = int(z'00000002', c_long)
1135 integer(C_LONG), parameter, public :: SQL_BP_CLOSE = int(z'00000001', c_long)
1136 integer(C_LONG), parameter, public :: SQL_BP_DELETE = int(z'00000002', c_long)
1137 integer(C_LONG), parameter, public :: SQL_BP_DROP = int(z'00000004', c_long)
1138 integer(C_LONG), parameter, public :: SQL_BP_TRANSACTION = int(z'00000008', c_long)
1139 integer(C_LONG), parameter, public :: SQL_BP_UPDATE = int(z'00000010', c_long)
1140 integer(C_LONG), parameter, public :: SQL_BP_OTHER_HSTMT = int(z'00000020', c_long)
1141 integer(C_LONG), parameter, public :: SQL_BP_SCROLL = int(z'00000040', c_long)
1142 integer(C_LONG), parameter, public :: SQL_SS_ADDITIONS = int(z'00000001', c_long)
1143 integer(C_LONG), parameter, public :: SQL_SS_DELETIONS = int(z'00000002', c_long)
1144 integer(C_LONG), parameter, public :: SQL_SS_UPDATES = int(z'00000004', c_long)
1145 integer(C_LONG), parameter, public :: SQL_CV_CREATE_VIEW = int(z'00000001', c_long)
1146 integer(C_LONG), parameter, public :: SQL_CV_CHECK_OPTION = int(z'00000002', c_long)
1147 integer(C_LONG), parameter, public :: SQL_CV_CASCADED = int(z'00000004', c_long)
1148 integer(C_LONG), parameter, public :: SQL_CV_LOCAL = int(z'00000008', c_long)
1149 integer(C_LONG), parameter, public :: SQL_LCK_NO_CHANGE = int(z'00000001', c_long)
1150 integer(C_LONG), parameter, public :: SQL_LCK_EXCLUSIVE = int(z'00000002', c_long)
1151 integer(C_LONG), parameter, public :: SQL_LCK_UNLOCK = int(z'00000004', c_long)
1152 integer(C_LONG), parameter, public :: SQL_POS_POSITION = int(z'00000001', c_long)
1153 integer(C_LONG), parameter, public :: SQL_POS_REFRESH = int(z'00000002', c_long)
1154 integer(C_LONG), parameter, public :: SQL_POS_UPDATE = int(z'00000004', c_long)
1155 integer(C_LONG), parameter, public :: SQL_POS_DELETE = int(z'00000008', c_long)
1156 integer(C_LONG), parameter, public :: SQL_POS_ADD = int(z'00000010', c_long)
1157 integer(C_SHORT), parameter, public :: SQL_QL_START = int(z'0001', c_long)
1158 integer(C_SHORT), parameter, public :: SQL_QL_END = int(z'0002', c_long)
1159 integer(C_LONG), parameter, public :: SQL_AF_AVG = int(z'00000001', c_long)
1160 integer(C_LONG), parameter, public :: SQL_AF_COUNT = int(z'00000002', c_long)
1161 integer(C_LONG), parameter, public :: SQL_AF_MAX = int(z'00000004', c_long)
1162 integer(C_LONG), parameter, public :: SQL_AF_MIN = int(z'00000008', c_long)
1163 integer(C_LONG), parameter, public :: SQL_AF_SUM = int(z'00000010', c_long)
1164 integer(C_LONG), parameter, public :: SQL_AF_DISTINCT = int(z'00000020', c_long)
1165 integer(C_LONG), parameter, public :: SQL_AF_ALL = int(z'00000040', c_long)
1166 integer(C_LONG), parameter, public :: SQL_SC_SQL92_ENTRY = int(z'00000001', c_long)
1167 integer(C_LONG), parameter, public :: SQL_SC_FIPS127_2_TRANSITIONAL = int(z'00000002', c_long)
1168 integer(C_LONG), parameter, public :: SQL_SC_SQL92_INTERMEDIATE = int(z'00000004', c_long)
1169 integer(C_LONG), parameter, public :: SQL_SC_SQL92_FULL = int(z'00000008', c_long)
1170 integer(C_LONG), parameter, public :: SQL_DL_SQL92_DATE = int(z'00000001', c_long)
1171 integer(C_LONG), parameter, public :: SQL_DL_SQL92_TIME = int(z'00000002', c_long)
1172 integer(C_LONG), parameter, public :: SQL_DL_SQL92_TIMESTAMP = int(z'00000004', c_long)
1173 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_YEAR = int(z'00000008', c_long)
1174 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_MONTH = int(z'00000010', c_long)
1175 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_DAY = int(z'00000020', c_long)
1176 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_HOUR = int(z'00000040', c_long)
1177 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_MINUTE = int(z'00000080', c_long)
1178 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_SECOND = int(z'00000100', c_long)
1179 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH = int(z'00000200', c_long)
1180 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR = int(z'00000400', c_long)
1181 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE = int(z'00000800', c_long)
1182 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND = int(z'00001000', c_long)
1183 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE = int(z'00002000', c_long)
1184 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND = int(z'00004000', c_long)
1185 integer(C_LONG), parameter, public :: SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND = int(z'00008000', c_long)
1186 integer(C_SHORT), parameter, public :: SQL_CL_START = int(z'0001', c_long)
1187 integer(C_SHORT), parameter, public :: SQL_CL_END = int(z'0002', c_long)
1188 integer(C_SHORT), parameter, public :: SQL_BRC_PROCEDURES = int(z'0000001', c_long)
1189 integer(C_SHORT), parameter, public :: SQL_BRC_EXPLICIT = int(z'0000002', c_long)
1190 integer(C_SHORT), parameter, public :: SQL_BRC_ROLLED_UP = int(z'0000004', c_long)
1191 integer(C_LONG), parameter, public :: SQL_BS_SELECT_EXPLICIT = int(z'00000001', c_long)
1192 integer(C_LONG), parameter, public :: SQL_BS_ROW_COUNT_EXPLICIT = int(z'00000002', c_long)
1193 integer(C_LONG), parameter, public :: SQL_BS_SELECT_PROC = int(z'00000004', c_long)
1194 integer(C_LONG), parameter, public :: SQL_BS_ROW_COUNT_PROC = int(z'00000008', c_long)
1195 integer(C_SHORT), parameter, public :: SQL_PARC_BATCH = 1
1196 integer(C_SHORT), parameter, public :: SQL_PARC_NO_BATCH = 2
1197 integer(C_SHORT), parameter, public :: SQL_PAS_BATCH = 1
1198 integer(C_SHORT), parameter, public :: SQL_PAS_NO_BATCH = 2
1199 integer(C_SHORT), parameter, public :: SQL_PAS_NO_SELECT = 3
1200 integer(C_LONG), parameter, public :: SQL_IK_NONE = int(z'00000000', c_long)
1201 integer(C_LONG), parameter, public :: SQL_IK_ASC = int(z'00000001', c_long)
1202 integer(C_LONG), parameter, public :: SQL_IK_DESC = int(z'00000002', c_long)
1203 ! integer(C_LONG), parameter, public :: SQL_IK_ALL = (int(z'00000001', C_LONG).or.int(z'00000002', C_LONG))
1204 integer(C_LONG), parameter, public :: SQL_ISV_ASSERTIONS = int(z'00000001', c_long)
1205 integer(C_LONG), parameter, public :: SQL_ISV_CHARACTER_SETS = int(z'00000002', c_long)
1206 integer(C_LONG), parameter, public :: SQL_ISV_CHECK_CONSTRAINTS = int(z'00000004', c_long)
1207 integer(C_LONG), parameter, public :: SQL_ISV_COLLATIONS = int(z'00000008', c_long)
1208 integer(C_LONG), parameter, public :: SQL_ISV_COLUMN_DOMAIN_USAGE = int(z'00000010', c_long)
1209 integer(C_LONG), parameter, public :: SQL_ISV_COLUMN_PRIVILEGES = int(z'00000020', c_long)
1210 integer(C_LONG), parameter, public :: SQL_ISV_COLUMNS = int(z'00000040', c_long)
1211 integer(C_LONG), parameter, public :: SQL_ISV_CONSTRAINT_COLUMN_USAGE = int(z'00000080', c_long)
1212 integer(C_LONG), parameter, public :: SQL_ISV_CONSTRAINT_TABLE_USAGE = int(z'00000100', c_long)
1213 integer(C_LONG), parameter, public :: SQL_ISV_DOMAIN_CONSTRAINTS = int(z'00000200', c_long)
1214 integer(C_LONG), parameter, public :: SQL_ISV_DOMAINS = int(z'00000400', c_long)
1215 integer(C_LONG), parameter, public :: SQL_ISV_KEY_COLUMN_USAGE = int(z'00000800', c_long)
1216 integer(C_LONG), parameter, public :: SQL_ISV_REFERENTIAL_CONSTRAINTS = int(z'00001000', c_long)
1217 integer(C_LONG), parameter, public :: SQL_ISV_SCHEMATA = int(z'00002000', c_long)
1218 integer(C_LONG), parameter, public :: SQL_ISV_SQL_LANGUAGES = int(z'00004000', c_long)
1219 integer(C_LONG), parameter, public :: SQL_ISV_TABLE_CONSTRAINTS = int(z'00008000', c_long)
1220 integer(C_LONG), parameter, public :: SQL_ISV_TABLE_PRIVILEGES = int(z'00010000', c_long)
1221 integer(C_LONG), parameter, public :: SQL_ISV_TABLES = int(z'00020000', c_long)
1222 integer(C_LONG), parameter, public :: SQL_ISV_TRANSLATIONS = int(z'00040000', c_long)
1223 integer(C_LONG), parameter, public :: SQL_ISV_USAGE_PRIVILEGES = int(z'00080000', c_long)
1224 integer(C_LONG), parameter, public :: SQL_ISV_VIEW_COLUMN_USAGE = int(z'00100000', c_long)
1225 integer(C_LONG), parameter, public :: SQL_ISV_VIEW_TABLE_USAGE = int(z'00200000', c_long)
1226 integer(C_LONG), parameter, public :: SQL_ISV_VIEWS = int(z'00400000', c_long)
1227 integer(C_SHORT), parameter, public :: SQL_AM_NONE = 0
1228 integer(C_SHORT), parameter, public :: SQL_AM_CONNECTION = 1
1229 integer(C_SHORT), parameter, public :: SQL_AM_STATEMENT = 2
1230 integer(C_LONG), parameter, public :: SQL_AD_CONSTRAINT_NAME_DEFINITION = int(z'00000001', c_long)
1231 integer(C_LONG), parameter, public :: SQL_AD_ADD_DOMAIN_CONSTRAINT = int(z'00000002', c_long)
1232 integer(C_LONG), parameter, public :: SQL_AD_DROP_DOMAIN_CONSTRAINT = int(z'00000004', c_long)
1233 integer(C_LONG), parameter, public :: SQL_AD_ADD_DOMAIN_DEFAULT = int(z'00000008', c_long)
1234 integer(C_LONG), parameter, public :: SQL_AD_DROP_DOMAIN_DEFAULT = int(z'00000010', c_long)
1235 integer(C_LONG), parameter, public :: SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED = int(z'00000020', c_long)
1236 integer(C_LONG), parameter, public :: SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE = int(z'00000040', c_long)
1237 integer(C_LONG), parameter, public :: SQL_AD_ADD_CONSTRAINT_DEFERRABLE = int(z'00000080', c_long)
1238 integer(C_LONG), parameter, public :: SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE = int(z'00000100', c_long)
1239 integer(C_LONG), parameter, public :: SQL_CS_CREATE_SCHEMA = int(z'00000001', c_long)
1240 integer(C_LONG), parameter, public :: SQL_CS_AUTHORIZATION = int(z'00000002', c_long)
1241 integer(C_LONG), parameter, public :: SQL_CS_DEFAULT_CHARACTER_SET = int(z'00000004', c_long)
1242 integer(C_LONG), parameter, public :: SQL_CTR_CREATE_TRANSLATION = int(z'00000001', c_long)
1243 integer(C_LONG), parameter, public :: SQL_CA_CREATE_ASSERTION = int(z'00000001', c_long)
1244 integer(C_LONG), parameter, public :: SQL_CA_CONSTRAINT_INITIALLY_DEFERRED = int(z'00000010', c_long)
1245 integer(C_LONG), parameter, public :: SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE = int(z'00000020', c_long)
1246 integer(C_LONG), parameter, public :: SQL_CA_CONSTRAINT_DEFERRABLE = int(z'00000040', c_long)
1247 integer(C_LONG), parameter, public :: SQL_CA_CONSTRAINT_NON_DEFERRABLE = int(z'00000080', c_long)
1248 integer(C_LONG), parameter, public :: SQL_CCS_CREATE_CHARACTER_SET = int(z'00000001', c_long)
1249 integer(C_LONG), parameter, public :: SQL_CCS_COLLATE_CLAUSE = int(z'00000002', c_long)
1250 integer(C_LONG), parameter, public :: SQL_CCS_LIMITED_COLLATION = int(z'00000004', c_long)
1251 integer(C_LONG), parameter, public :: SQL_CCOL_CREATE_COLLATION = int(z'00000001', c_long)
1252 integer(C_LONG), parameter, public :: SQL_CDO_CREATE_DOMAIN = int(z'00000001', c_long)
1253 integer(C_LONG), parameter, public :: SQL_CDO_DEFAULT = int(z'00000002', c_long)
1254 integer(C_LONG), parameter, public :: SQL_CDO_CONSTRAINT = int(z'00000004', c_long)
1255 integer(C_LONG), parameter, public :: SQL_CDO_COLLATION = int(z'00000008', c_long)
1256 integer(C_LONG), parameter, public :: SQL_CDO_CONSTRAINT_NAME_DEFINITION = int(z'00000010', c_long)
1257 integer(C_LONG), parameter, public :: SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED = int(z'00000020', c_long)
1258 integer(C_LONG), parameter, public :: SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE = int(z'00000040', c_long)
1259 integer(C_LONG), parameter, public :: SQL_CDO_CONSTRAINT_DEFERRABLE = int(z'00000080', c_long)
1260 integer(C_LONG), parameter, public :: SQL_CDO_CONSTRAINT_NON_DEFERRABLE = int(z'00000100', c_long)
1261 integer(C_LONG), parameter, public :: SQL_CT_CREATE_TABLE = int(z'00000001', c_long)
1262 integer(C_LONG), parameter, public :: SQL_CT_COMMIT_PRESERVE = int(z'00000002', c_long)
1263 integer(C_LONG), parameter, public :: SQL_CT_COMMIT_DELETE = int(z'00000004', c_long)
1264 integer(C_LONG), parameter, public :: SQL_CT_GLOBAL_TEMPORARY = int(z'00000008', c_long)
1265 integer(C_LONG), parameter, public :: SQL_CT_LOCAL_TEMPORARY = int(z'00000010', c_long)
1266 integer(C_LONG), parameter, public :: SQL_CT_CONSTRAINT_INITIALLY_DEFERRED = int(z'00000020', c_long)
1267 integer(C_LONG), parameter, public :: SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE = int(z'00000040', c_long)
1268 integer(C_LONG), parameter, public :: SQL_CT_CONSTRAINT_DEFERRABLE = int(z'00000080', c_long)
1269 integer(C_LONG), parameter, public :: SQL_CT_CONSTRAINT_NON_DEFERRABLE = int(z'00000100', c_long)
1270 integer(C_LONG), parameter, public :: SQL_CT_COLUMN_CONSTRAINT = int(z'00000200', c_long)
1271 integer(C_LONG), parameter, public :: SQL_CT_COLUMN_DEFAULT = int(z'00000400', c_long)
1272 integer(C_LONG), parameter, public :: SQL_CT_COLUMN_COLLATION = int(z'00000800', c_long)
1273 integer(C_LONG), parameter, public :: SQL_CT_TABLE_CONSTRAINT = int(z'00001000', c_long)
1274 integer(C_LONG), parameter, public :: SQL_CT_CONSTRAINT_NAME_DEFINITION = int(z'00002000', c_long)
1275 integer(C_LONG), parameter, public :: SQL_DI_CREATE_INDEX = int(z'00000001', c_long)
1276 integer(C_LONG), parameter, public :: SQL_DI_DROP_INDEX = int(z'00000002', c_long)
1277 integer(C_LONG), parameter, public :: SQL_DC_DROP_COLLATION = int(z'00000001', c_long)
1278 integer(C_LONG), parameter, public :: SQL_DD_DROP_DOMAIN = int(z'00000001', c_long)
1279 integer(C_LONG), parameter, public :: SQL_DD_RESTRICT = int(z'00000002', c_long)
1280 integer(C_LONG), parameter, public :: SQL_DD_CASCADE = int(z'00000004', c_long)
1281 integer(C_LONG), parameter, public :: SQL_DS_DROP_SCHEMA = int(z'00000001', c_long)
1282 integer(C_LONG), parameter, public :: SQL_DS_RESTRICT = int(z'00000002', c_long)
1283 integer(C_LONG), parameter, public :: SQL_DS_CASCADE = int(z'00000004', c_long)
1284 integer(C_LONG), parameter, public :: SQL_DCS_DROP_CHARACTER_SET = int(z'00000001', c_long)
1285 integer(C_LONG), parameter, public :: SQL_DA_DROP_ASSERTION = int(z'00000001', c_long)
1286 integer(C_LONG), parameter, public :: SQL_DT_DROP_TABLE = int(z'00000001', c_long)
1287 integer(C_LONG), parameter, public :: SQL_DT_RESTRICT = int(z'00000002', c_long)
1288 integer(C_LONG), parameter, public :: SQL_DT_CASCADE = int(z'00000004', c_long)
1289 integer(C_LONG), parameter, public :: SQL_DTR_DROP_TRANSLATION = int(z'00000001', c_long)
1290 integer(C_LONG), parameter, public :: SQL_DV_DROP_VIEW = int(z'00000001', c_long)
1291 integer(C_LONG), parameter, public :: SQL_DV_RESTRICT = int(z'00000002', c_long)
1292 integer(C_LONG), parameter, public :: SQL_DV_CASCADE = int(z'00000004', c_long)
1293 integer(C_LONG), parameter, public :: SQL_IS_INSERT_LITERALS = int(z'00000001', c_long)
1294 integer(C_LONG), parameter, public :: SQL_IS_INSERT_SEARCHED = int(z'00000002', c_long)
1295 integer(C_LONG), parameter, public :: SQL_IS_SELECT_INTO = int(z'00000004', c_long)
1296 integer(C_LONG), parameter, public :: SQL_OIC_CORE = 1
1297 integer(C_LONG), parameter, public :: SQL_OIC_LEVEL1 = 2
1298 integer(C_LONG), parameter, public :: SQL_OIC_LEVEL2 = 3
1299 integer(C_LONG), parameter, public :: SQL_SFKD_CASCADE = int(z'00000001', c_long)
1300 integer(C_LONG), parameter, public :: SQL_SFKD_NO_ACTION = int(z'00000002', c_long)
1301 integer(C_LONG), parameter, public :: SQL_SFKD_SET_DEFAULT = int(z'00000004', c_long)
1302 integer(C_LONG), parameter, public :: SQL_SFKD_SET_NULL = int(z'00000008', c_long)
1303 integer(C_LONG), parameter, public :: SQL_SFKU_CASCADE = int(z'00000001', c_long)
1304 integer(C_LONG), parameter, public :: SQL_SFKU_NO_ACTION = int(z'00000002', c_long)
1305 integer(C_LONG), parameter, public :: SQL_SFKU_SET_DEFAULT = int(z'00000004', c_long)
1306 integer(C_LONG), parameter, public :: SQL_SFKU_SET_NULL = int(z'00000008', c_long)
1307 integer(C_LONG), parameter, public :: SQL_SG_USAGE_ON_DOMAIN = int(z'00000001', c_long)
1308 integer(C_LONG), parameter, public :: SQL_SG_USAGE_ON_CHARACTER_SET = int(z'00000002', c_long)
1309 integer(C_LONG), parameter, public :: SQL_SG_USAGE_ON_COLLATION = int(z'00000004', c_long)
1310 integer(C_LONG), parameter, public :: SQL_SG_USAGE_ON_TRANSLATION = int(z'00000008', c_long)
1311 integer(C_LONG), parameter, public :: SQL_SG_WITH_GRANT_OPTION = int(z'00000010', c_long)
1312 integer(C_LONG), parameter, public :: SQL_SG_DELETE_TABLE = int(z'00000020', c_long)
1313 integer(C_LONG), parameter, public :: SQL_SG_INSERT_TABLE = int(z'00000040', c_long)
1314 integer(C_LONG), parameter, public :: SQL_SG_INSERT_COLUMN = int(z'00000080', c_long)
1315 integer(C_LONG), parameter, public :: SQL_SG_REFERENCES_TABLE = int(z'00000100', c_long)
1316 integer(C_LONG), parameter, public :: SQL_SG_REFERENCES_COLUMN = int(z'00000200', c_long)
1317 integer(C_LONG), parameter, public :: SQL_SG_SELECT_TABLE = int(z'00000400', c_long)
1318 integer(C_LONG), parameter, public :: SQL_SG_UPDATE_TABLE = int(z'00000800', c_long)
1319 integer(C_LONG), parameter, public :: SQL_SG_UPDATE_COLUMN = int(z'00001000', c_long)
1320 integer(C_LONG), parameter, public :: SQL_SP_EXISTS = int(z'00000001', c_long)
1321 integer(C_LONG), parameter, public :: SQL_SP_ISNOTNULL = int(z'00000002', c_long)
1322 integer(C_LONG), parameter, public :: SQL_SP_ISNULL = int(z'00000004', c_long)
1323 integer(C_LONG), parameter, public :: SQL_SP_MATCH_FULL = int(z'00000008', c_long)
1324 integer(C_LONG), parameter, public :: SQL_SP_MATCH_PARTIAL = int(z'00000010', c_long)
1325 integer(C_LONG), parameter, public :: SQL_SP_MATCH_UNIQUE_FULL = int(z'00000020', c_long)
1326 integer(C_LONG), parameter, public :: SQL_SP_MATCH_UNIQUE_PARTIAL = int(z'00000040', c_long)
1327 integer(C_LONG), parameter, public :: SQL_SP_OVERLAPS = int(z'00000080', c_long)
1328 integer(C_LONG), parameter, public :: SQL_SP_UNIQUE = int(z'00000100', c_long)
1329 integer(C_LONG), parameter, public :: SQL_SP_LIKE = int(z'00000200', c_long)
1330 integer(C_LONG), parameter, public :: SQL_SP_IN = int(z'00000400', c_long)
1331 integer(C_LONG), parameter, public :: SQL_SP_BETWEEN = int(z'00000800', c_long)
1332 integer(C_LONG), parameter, public :: SQL_SP_COMPARISON = int(z'00001000', c_long)
1333 integer(C_LONG), parameter, public :: SQL_SP_QUANTIFIED_COMPARISON = int(z'00002000', c_long)
1334 integer(C_LONG), parameter, public :: SQL_SRJO_CORRESPONDING_CLAUSE = int(z'00000001', c_long)
1335 integer(C_LONG), parameter, public :: SQL_SRJO_CROSS_JOIN = int(z'00000002', c_long)
1336 integer(C_LONG), parameter, public :: SQL_SRJO_EXCEPT_JOIN = int(z'00000004', c_long)
1337 integer(C_LONG), parameter, public :: SQL_SRJO_FULL_OUTER_JOIN = int(z'00000008', c_long)
1338 integer(C_LONG), parameter, public :: SQL_SRJO_INNER_JOIN = int(z'00000010', c_long)
1339 integer(C_LONG), parameter, public :: SQL_SRJO_INTERSECT_JOIN = int(z'00000020', c_long)
1340 integer(C_LONG), parameter, public :: SQL_SRJO_LEFT_OUTER_JOIN = int(z'00000040', c_long)
1341 integer(C_LONG), parameter, public :: SQL_SRJO_NATURAL_JOIN = int(z'00000080', c_long)
1342 integer(C_LONG), parameter, public :: SQL_SRJO_RIGHT_OUTER_JOIN = int(z'00000100', c_long)
1343 integer(C_LONG), parameter, public :: SQL_SRJO_UNION_JOIN = int(z'00000200', c_long)
1344 integer(C_LONG), parameter, public :: SQL_SR_USAGE_ON_DOMAIN = int(z'00000001', c_long)
1345 integer(C_LONG), parameter, public :: SQL_SR_USAGE_ON_CHARACTER_SET = int(z'00000002', c_long)
1346 integer(C_LONG), parameter, public :: SQL_SR_USAGE_ON_COLLATION = int(z'00000004', c_long)
1347 integer(C_LONG), parameter, public :: SQL_SR_USAGE_ON_TRANSLATION = int(z'00000008', c_long)
1348 integer(C_LONG), parameter, public :: SQL_SR_GRANT_OPTION_FOR = int(z'00000010', c_long)
1349 integer(C_LONG), parameter, public :: SQL_SR_CASCADE = int(z'00000020', c_long)
1350 integer(C_LONG), parameter, public :: SQL_SR_RESTRICT = int(z'00000040', c_long)
1351 integer(C_LONG), parameter, public :: SQL_SR_DELETE_TABLE = int(z'00000080', c_long)
1352 integer(C_LONG), parameter, public :: SQL_SR_INSERT_TABLE = int(z'00000100', c_long)
1353 integer(C_LONG), parameter, public :: SQL_SR_INSERT_COLUMN = int(z'00000200', c_long)
1354 integer(C_LONG), parameter, public :: SQL_SR_REFERENCES_TABLE = int(z'00000400', c_long)
1355 integer(C_LONG), parameter, public :: SQL_SR_REFERENCES_COLUMN = int(z'00000800', c_long)
1356 integer(C_LONG), parameter, public :: SQL_SR_SELECT_TABLE = int(z'00001000', c_long)
1357 integer(C_LONG), parameter, public :: SQL_SR_UPDATE_TABLE = int(z'00002000', c_long)
1358 integer(C_LONG), parameter, public :: SQL_SR_UPDATE_COLUMN = int(z'00004000', c_long)
1359 integer(C_LONG), parameter, public :: SQL_SRVC_VALUE_EXPRESSION = int(z'00000001', c_long)
1360 integer(C_LONG), parameter, public :: SQL_SRVC_NULL = int(z'00000002', c_long)
1361 integer(C_LONG), parameter, public :: SQL_SRVC_DEFAULT = int(z'00000004', c_long)
1362 integer(C_LONG), parameter, public :: SQL_SRVC_ROW_SUBQUERY = int(z'00000008', c_long)
1363 integer(C_LONG), parameter, public :: SQL_SVE_CASE = int(z'00000001', c_long)
1364 integer(C_LONG), parameter, public :: SQL_SVE_CAST = int(z'00000002', c_long)
1365 integer(C_LONG), parameter, public :: SQL_SVE_COALESCE = int(z'00000004', c_long)
1366 integer(C_LONG), parameter, public :: SQL_SVE_NULLIF = int(z'00000008', c_long)
1367 integer(C_LONG), parameter, public :: SQL_SCC_XOPEN_CLI_VERSION1 = int(z'00000001', c_long)
1368 integer(C_LONG), parameter, public :: SQL_SCC_ISO92_CLI = int(z'00000002', c_long)
1369 integer(C_LONG), parameter, public :: SQL_US_UNION = int(z'00000001', c_long)
1370 integer(C_LONG), parameter, public :: SQL_US_UNION_ALL = int(z'00000002', c_long)
1371 integer(C_LONG), parameter, public :: SQL_DRIVER_AWARE_POOLING_NOT_CAPABLE = int(z'00000000', c_long)
1372 integer(C_LONG), parameter, public :: SQL_DRIVER_AWARE_POOLING_CAPABLE = int(z'00000001', c_long)
1373 integer(C_LONG), parameter, public :: SQL_DTC_ENLIST_EXPENSIVE = int(z'00000001', c_long)
1374 integer(C_LONG), parameter, public :: SQL_DTC_UNENLIST_EXPENSIVE = int(z'00000002', c_long)
1375 integer(C_LONG), parameter, public :: SQL_ASYNC_DBC_NOT_CAPABLE = int(z'00000000', c_long)
1376 integer(C_LONG), parameter, public :: SQL_ASYNC_DBC_CAPABLE = int(z'00000001', c_long)
1377 integer(C_SHORT), parameter, public :: SQL_FETCH_FIRST_USER = 31
1378 integer(C_SHORT), parameter, public :: SQL_FETCH_FIRST_SYSTEM = 32
1379 integer(C_SHORT), parameter, public :: SQL_ENTIRE_ROWSET = 0
1380 integer(C_SHORT), parameter, public :: SQL_POSITION = 0
1381 integer(C_SHORT), parameter, public :: SQL_REFRESH = 1
1382 integer(C_SHORT), parameter, public :: SQL_UPDATE = 2
1383 integer(C_SHORT), parameter, public :: SQL_DELETE = 3
1384 integer(C_SHORT), parameter, public :: SQL_ADD = 4
1385 integer(C_SHORT), parameter, public :: SQL_SETPOS_MAX_OPTION_VALUE = 4
1386 integer(C_SHORT), parameter, public :: SQL_UPDATE_BY_BOOKMARK = 5
1387 integer(C_SHORT), parameter, public :: SQL_DELETE_BY_BOOKMARK = 6
1388 integer(C_SHORT), parameter, public :: SQL_FETCH_BY_BOOKMARK = 7
1389 integer(C_SHORT), parameter, public :: SQL_LOCK_NO_CHANGE = 0
1390 integer(C_SHORT), parameter, public :: SQL_LOCK_EXCLUSIVE = 1
1391 integer(C_SHORT), parameter, public :: SQL_LOCK_UNLOCK = 2
1392 integer(C_SHORT), parameter, public :: SQL_SETPOS_MAX_LOCK_VALUE = 2
1393 integer(C_SHORT), parameter, public :: SQL_BEST_ROWID = 1
1394 integer(C_SHORT), parameter, public :: SQL_ROWVER = 2
1395 integer(C_SHORT), parameter, public :: SQL_PC_NOT_PSEUDO = 1
1396 integer(C_SHORT), parameter, public :: SQL_QUICK = 0
1397 integer(C_SHORT), parameter, public :: SQL_ENSURE = 1
1398 integer(C_SHORT), parameter, public :: SQL_TABLE_STAT = 0
1399 character(kind=C_CHAR, len=*), parameter, public :: SQL_ALL_CATALOGS = "%"
1400 character(kind=C_CHAR, len=*), parameter, public :: SQL_ALL_SCHEMAS = "%"
1401 character(kind=C_CHAR, len=*), parameter, public :: SQL_ALL_TABLE_TYPES = "%"
1402 integer(C_SHORT), parameter, public :: SQL_DRIVER_NOPROMPT = 0
1403 integer(C_SHORT), parameter, public :: SQL_DRIVER_COMPLETE = 1
1404 integer(C_SHORT), parameter, public :: SQL_DRIVER_PROMPT = 2
1405 integer(C_SHORT), parameter, public :: SQL_DRIVER_COMPLETE_REQUIRED = 3
1406 integer(C_SHORT), parameter, public :: SQL_FETCH_BOOKMARK = 8
1407 integer(C_SHORT), parameter, public :: SQL_ROW_SUCCESS = 0
1408 integer(C_SHORT), parameter, public :: SQL_ROW_DELETED = 1
1409 integer(C_SHORT), parameter, public :: SQL_ROW_UPDATED = 2
1410 integer(C_SHORT), parameter, public :: SQL_ROW_NOROW = 3
1411 integer(C_SHORT), parameter, public :: SQL_ROW_ADDED = 4
1412 integer(C_SHORT), parameter, public :: SQL_ROW_ERROR = 5
1413 integer(C_SHORT), parameter, public :: SQL_ROW_SUCCESS_WITH_INFO = 6
1414 integer(C_SHORT), parameter, public :: SQL_ROW_PROCEED = 0
1415 integer(C_SHORT), parameter, public :: SQL_ROW_IGNORE = 1
1416 integer(C_SHORT), parameter, public :: SQL_PARAM_SUCCESS = 0
1417 integer(C_SHORT), parameter, public :: SQL_PARAM_SUCCESS_WITH_INFO = 6
1418 integer(C_SHORT), parameter, public :: SQL_PARAM_ERROR = 5
1419 integer(C_SHORT), parameter, public :: SQL_PARAM_UNUSED = 7
1420 integer(C_SHORT), parameter, public :: SQL_PARAM_DIAG_UNAVAILABLE = 1
1421 integer(C_SHORT), parameter, public :: SQL_PARAM_PROCEED = 0
1422 integer(C_SHORT), parameter, public :: SQL_PARAM_IGNORE = 1
1423 integer(C_SHORT), parameter, public :: SQL_CASCADE = 0
1424 integer(C_SHORT), parameter, public :: SQL_RESTRICT = 1
1425 integer(C_SHORT), parameter, public :: SQL_SET_NULL = 2
1426 integer(C_SHORT), parameter, public :: SQL_NO_ACTION = 3
1427 integer(C_SHORT), parameter, public :: SQL_SET_DEFAULT = 4
1428 integer(C_SHORT), parameter, public :: SQL_INITIALLY_DEFERRED = 5
1429 integer(C_SHORT), parameter, public :: SQL_INITIALLY_IMMEDIATE = 6
1430 integer(C_SHORT), parameter, public :: SQL_NOT_DEFERRABLE = 7
1431 integer(C_SHORT), parameter, public :: SQL_PARAM_TYPE_UNKNOWN = 0
1432 integer(C_SHORT), parameter, public :: SQL_PARAM_INPUT = 1
1433 integer(C_SHORT), parameter, public :: SQL_PARAM_INPUT_OUTPUT = 2
1434 integer(C_SHORT), parameter, public :: SQL_RESULT_COL = 3
1435 integer(C_SHORT), parameter, public :: SQL_PARAM_OUTPUT = 4
1436 integer(C_SHORT), parameter, public :: SQL_RETURN_VALUE = 5
1437 integer(C_SHORT), parameter, public :: SQL_PARAM_INPUT_OUTPUT_STREAM = 8
1438 integer(C_SHORT), parameter, public :: SQL_PARAM_OUTPUT_STREAM = 16
1439 integer(C_SHORT), parameter, public :: SQL_PT_UNKNOWN = 0
1440 integer(C_SHORT), parameter, public :: SQL_PT_PROCEDURE = 1
1441 integer(C_SHORT), parameter, public :: SQL_PT_FUNCTION = 2
1442 character(kind=C_CHAR, len=*), parameter, public :: SQL_ODBC_KEYWORDS = "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,ASC,ASSERTION,AT,AUTHORIZATION,AVG,BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,DISTINCT,DOMAIN,DOUBLE,DROP,ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,EXISTS,EXTERNAL,EXTRACT,FALSE,FETCH,FIRST,FLOAT,FOR,FOREIGN,FORTRAN,FOUND,FROM,FULL,GET,GLOBAL,GO,GOTO,GRANT,GROUP,HAVING,HOUR,IDENTITY,IMMEDIATE,IN,INCLUDE,INDEX,INDICATOR,INITIALLY,INNER,INPUT,INSENSITIVE,INSERT,INT,INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,JOIN,KEY,LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,MATCH,MAX,MIN,MINUTE,MODULE,MONTH,NAMES,NATIONAL,NATURAL,NCHAR,NEXT,NO,NONE,NOT,NULL,NULLIF,NUMERIC,OCTET_LENGTH,OF,ON,ONLY,OPEN,OPTION,OR,ORDER,OUTER,OUTPUT,OVERLAPS,PAD,PARTIAL,PASCAL,PLI,POSITION,PRECISION,PREPARE,PRESERVE,PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWSSCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,SIZE,SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,SUBSTRING,SUM,SYSTEM_USER,TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,YEAR,ZONE"
1443
1445 interface trim
1446 module procedure :: trim_c_char
1447 end interface
1448
1449contains
1450
1451 function trim_c_char(cchar) result(fchar)
1452 character(kind=c_char, len=1), intent(in) :: cchar(:)
1453 character(:), allocatable :: fchar
1454 !private
1455 integer :: i
1456
1457 allocate (character(size(cchar)) :: fchar)
1458 do i = 1, size(cchar)
1459 fchar(i:i) = cchar(i)
1460 end do
1461 fchar = trim(fchar)
1462 end function
1463end module
Triming of c-string returning fortran allocatable characters.