/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/isqlext.h
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/isqlext.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 37876 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 /*
2 *
3 * isqlext.h
4 *
5 * $Id: isqlext.h 30070 2004-10-22 19:11:07Z KH $
6 *
7 * iODBC defines (ext)
8 *
9 * The iODBC driver manager.
10 *
11 * Copyright (C) 1995 by Ke Jin <kejin@empress.com>
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
22 *
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27 #ifndef _ISQLEXT_H
28 #define _ISQLEXT_H
29
30 #include "wx/isql.h"
31
32 /*
33 * Generic constants
34 */
35 #define SQL_MAX_OPTION_STRING_LENGTH 256
36
37 /*
38 * Additional return codes
39 */
40 #define SQL_STILL_EXECUTING 2
41 #define SQL_NEED_DATA 99
42
43 /*
44 * SQL extended datatypes
45 */
46 #define SQL_DATE 9
47 #define SQL_TIME 10
48 #define SQL_TIMESTAMP 11
49 #define SQL_LONGVARCHAR (-1)
50 #define SQL_BINARY (-2)
51 #define SQL_VARBINARY (-3)
52 #define SQL_LONGVARBINARY (-4)
53 #define SQL_BIGINT (-5)
54 #define SQL_TINYINT (-6)
55 #define SQL_BIT (-7)
56
57 #define SQL_INTERVAL_YEAR (-80)
58 #define SQL_INTERVAL_MONTH (-81)
59 #define SQL_INTERVAL_YEAR_TO_MONTH (-82)
60 #define SQL_INTERVAL_DAY (-83)
61 #define SQL_INTERVAL_HOUR (-84)
62 #define SQL_INTERVAL_MINUTE (-85)
63 #define SQL_INTERVAL_SECOND (-86)
64 #define SQL_INTERVAL_DAY_TO_HOUR (-87)
65 #define SQL_INTERVAL_DAY_TO_MINUTE (-88)
66 #define SQL_INTERVAL_DAY_TO_SECOND (-89)
67 #define SQL_INTERVAL_HOUR_TO_MINUTE (-90)
68 #define SQL_INTERVAL_HOUR_TO_SECOND (-91)
69 #define SQL_INTERVAL_MINUTE_TO_SECOND (-92)
70 #define SQL_UNICODE (-95)
71
72 #define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR
73 #define SQL_TYPE_DRIVER_END SQL_UNICODE
74
75 #define SQL_SIGNED_OFFSET (-20)
76 #define SQL_UNSIGNED_OFFSET (-22)
77
78 /*
79 * C datatype to SQL datatype mapping
80 */
81 #define SQL_C_DATE SQL_DATE
82 #define SQL_C_TIME SQL_TIME
83 #define SQL_C_TIMESTAMP SQL_TIMESTAMP
84 #define SQL_C_BINARY SQL_BINARY
85 #define SQL_C_BIT SQL_BIT
86 #define SQL_C_TINYINT SQL_TINYINT
87 #define SQL_C_SLONG SQL_C_LONG+SQL_SIGNED_OFFSET
88 #define SQL_C_SSHORT SQL_C_SHORT+SQL_SIGNED_OFFSET
89 #define SQL_C_STINYINT SQL_TINYINT+SQL_SIGNED_OFFSET
90 #define SQL_C_ULONG SQL_C_LONG+SQL_UNSIGNED_OFFSET
91 #define SQL_C_USHORT SQL_C_SHORT+SQL_UNSIGNED_OFFSET
92 #define SQL_C_UTINYINT SQL_TINYINT+SQL_UNSIGNED_OFFSET
93 #define SQL_C_BOOKMARK SQL_C_ULONG
94
95 /*
96 * Extended data types override sql.h defined
97 */
98 #undef SQL_TYPE_MIN
99 #define SQL_TYPE_MIN SQL_BIT
100 #define SQL_ALL_TYPES 0
101
102 /*
103 * SQL portable types for C - DATE, TIME, TIMESTAMP
104 */
105 typedef struct _DATE_STRUCT
106 {
107 SWORD year;
108 UWORD month;
109 UWORD day;
110 }
111 DATE_STRUCT;
112
113 typedef struct _TIME_STRUCT
114 {
115 UWORD hour;
116 UWORD minute;
117 UWORD second;
118 }
119 TIME_STRUCT;
120
121 typedef struct _TIMESTAMP_STRUCT
122 {
123 SWORD year;
124 UWORD month;
125 UWORD day;
126 UWORD hour;
127 UWORD minute;
128 UWORD second;
129 UDWORD fraction;
130 }
131 TIMESTAMP_STRUCT;
132
133 typedef unsigned long int BOOKMARK;
134
135 /*
136 * ----------------------------------------------------------------------
137 * Level 1 Functions
138 * ----------------------------------------------------------------------
139 */
140
141 /*
142 * SQLDriverConnect
143 */
144 #define SQL_DRIVER_NOPROMPT 0
145 #define SQL_DRIVER_COMPLETE 1
146 #define SQL_DRIVER_PROMPT 2
147 #define SQL_DRIVER_COMPLETE_REQUIRED 3
148
149 /*
150 * SQLGetData
151 */
152 #define SQL_NO_TOTAL (-4)
153
154 /*
155 * SQLBindParameter
156 */
157 #define SQL_DEFAULT_PARAM (-5)
158 #define SQL_IGNORE (-6)
159 #define SQL_LEN_DATA_AT_EXEC_OFFSET (-100)
160 #define SQL_LEN_DATA_AT_EXEC(length) (-length+SQL_LEN_DATA_AT_EXEC_OFFSET)
161
162 /*
163 * SQLGetFunctions
164 */
165 #define SQL_API_SQLALLOCCONNECT 1 /* Core Functions */
166 #define SQL_API_SQLALLOCENV 2
167 #define SQL_API_SQLALLOCSTMT 3
168 #define SQL_API_SQLBINDCOL 4
169 #define SQL_API_SQLCANCEL 5
170 #define SQL_API_SQLCOLATTRIBUTES 6
171 #define SQL_API_SQLCONNECT 7
172 #define SQL_API_SQLDESCRIBECOL 8
173 #define SQL_API_SQLDISCONNECT 9
174 #define SQL_API_SQLERROR 10
175 #define SQL_API_SQLEXECDIRECT 11
176 #define SQL_API_SQLEXECUTE 12
177 #define SQL_API_SQLFETCH 13
178 #define SQL_API_SQLFREECONNECT 14
179 #define SQL_API_SQLFREEENV 15
180 #define SQL_API_SQLFREESTMT 16
181 #define SQL_API_SQLGETCURSORNAME 17
182 #define SQL_API_SQLNUMRESULTCOLS 18
183 #define SQL_API_SQLPREPARE 19
184 #define SQL_API_SQLROWCOUNT 20
185 #define SQL_API_SQLSETCURSORNAME 21
186 #define SQL_API_SQLSETPARAM 22
187 #define SQL_API_SQLTRANSACT 23
188
189 #define SQL_NUM_FUNCTIONS 23
190
191 #define SQL_EXT_API_START 40
192
193 #define SQL_API_SQLCOLUMNS 40 /* Level 1 Functions */
194 #define SQL_API_SQLDRIVERCONNECT 41
195 #define SQL_API_SQLGETCONNECTOPTION 42
196 #define SQL_API_SQLGETDATA 43
197 #define SQL_API_SQLGETFUNCTIONS 44
198 #define SQL_API_SQLGETINFO 45
199 #define SQL_API_SQLGETSTMTOPTION 46
200 #define SQL_API_SQLGETTYPEINFO 47
201 #define SQL_API_SQLPARAMDATA 48
202 #define SQL_API_SQLPUTDATA 49
203 #define SQL_API_SQLSETCONNECTOPTION 50
204 #define SQL_API_SQLSETSTMTOPTION 51
205 #define SQL_API_SQLSPECIALCOLUMNS 52
206 #define SQL_API_SQLSTATISTICS 53
207 #define SQL_API_SQLTABLES 54
208
209 #define SQL_API_SQLBROWSECONNECT 55 /* Level 2 Functions */
210 #define SQL_API_SQLCOLUMNPRIVILEGES 56
211 #define SQL_API_SQLDATASOURCES 57
212 #define SQL_API_SQLDESCRIBEPARAM 58
213 #define SQL_API_SQLEXTENDEDFETCH 59
214 #define SQL_API_SQLFOREIGNKEYS 60
215 #define SQL_API_SQLMORERESULTS 61
216 #define SQL_API_SQLNATIVESQL 62
217 #define SQL_API_SQLNUMPARAMS 63
218 #define SQL_API_SQLPARAMOPTIONS 64
219 #define SQL_API_SQLPRIMARYKEYS 65
220 #define SQL_API_SQLPROCEDURECOLUMNS 66
221 #define SQL_API_SQLPROCEDURES 67
222 #define SQL_API_SQLSETPOS 68
223 #define SQL_API_SQLSETSCROLLOPTIONS 69
224 #define SQL_API_SQLTABLEPRIVILEGES 70
225
226 #define SQL_API_SQLDRIVERS 71
227 #define SQL_API_SQLBINDPARAMETER 72
228 #define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER
229
230 #define SQL_API_ALL_FUNCTIONS 0
231
232 #define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1)
233
234 /*
235 * SQLGetInfo
236 */
237 #define SQL_INFO_FIRST 0
238 #define SQL_ACTIVE_CONNECTIONS 0
239 #define SQL_ACTIVE_STATEMENTS 1
240 #define SQL_DATA_SOURCE_NAME 2
241 #define SQL_DRIVER_HDBC 3
242 #define SQL_DRIVER_HENV 4
243 #define SQL_DRIVER_HSTMT 5
244 #define SQL_DRIVER_NAME 6
245 #define SQL_DRIVER_VER 7
246 #define SQL_FETCH_DIRECTION 8
247 #define SQL_ODBC_API_CONFORMANCE 9
248 #define SQL_ODBC_VER 10
249 #define SQL_ROW_UPDATES 11
250 #define SQL_ODBC_SAG_CLI_CONFORMANCE 12
251 #define SQL_SERVER_NAME 13
252 #define SQL_SEARCH_PATTERN_ESCAPE 14
253 #define SQL_ODBC_SQL_CONFORMANCE 15
254 #define SQL_DBMS_NAME 17
255 #define SQL_DBMS_VER 18
256 #define SQL_ACCESSIBLE_TABLES 19
257 #define SQL_ACCESSIBLE_PROCEDURES 20
258 #define SQL_PROCEDURES 21
259 #define SQL_CONCAT_NULL_BEHAVIOR 22
260 #define SQL_CURSOR_COMMIT_BEHAVIOR 23
261 #define SQL_CURSOR_ROLLBACK_BEHAVIOR 24
262 #define SQL_DATA_SOURCE_READ_ONLY 25
263 #define SQL_DEFAULT_TXN_ISOLATION 26
264 #define SQL_EXPRESSIONS_IN_ORDERBY 27
265 #define SQL_IDENTIFIER_CASE 28
266 #define SQL_IDENTIFIER_QUOTE_CHAR 29
267 #define SQL_MAX_COLUMN_NAME_LEN 30
268 #define SQL_MAX_CURSOR_NAME_LEN 31
269 #define SQL_MAX_OWNER_NAME_LEN 32
270 #define SQL_MAX_PROCEDURE_NAME_LEN 33
271 #define SQL_MAX_QUALIFIER_NAME_LEN 34
272 #define SQL_MAX_TABLE_NAME_LEN 35
273 #define SQL_MULT_RESULT_SETS 36
274 #define SQL_MULTIPLE_ACTIVE_TXN 37
275 #define SQL_OUTER_JOINS 38
276 #define SQL_OWNER_TERM 39
277 #define SQL_PROCEDURE_TERM 40
278 #define SQL_QUALIFIER_NAME_SEPARATOR 41
279 #define SQL_QUALIFIER_TERM 42
280 #define SQL_SCROLL_CONCURRENCY 43
281 #define SQL_SCROLL_OPTIONS 44
282 #define SQL_TABLE_TERM 45
283 #define SQL_TXN_CAPABLE 46
284 #define SQL_USER_NAME 47
285 #define SQL_CONVERT_FUNCTIONS 48
286 #define SQL_NUMERIC_FUNCTIONS 49
287 #define SQL_STRING_FUNCTIONS 50
288 #define SQL_SYSTEM_FUNCTIONS 51
289 #define SQL_TIMEDATE_FUNCTIONS 52
290 #define SQL_CONVERT_BIGINT 53
291 #define SQL_CONVERT_BINARY 54
292 #define SQL_CONVERT_BIT 55
293 #define SQL_CONVERT_CHAR 56
294 #define SQL_CONVERT_DATE 57
295 #define SQL_CONVERT_DECIMAL 58
296 #define SQL_CONVERT_DOUBLE 59
297 #define SQL_CONVERT_FLOAT 60
298 #define SQL_CONVERT_INTEGER 61
299 #define SQL_CONVERT_LONGVARCHAR 62
300 #define SQL_CONVERT_NUMERIC 63
301 #define SQL_CONVERT_REAL 64
302 #define SQL_CONVERT_SMALLINT 65
303 #define SQL_CONVERT_TIME 66
304 #define SQL_CONVERT_TIMESTAMP 67
305 #define SQL_CONVERT_TINYINT 68
306 #define SQL_CONVERT_VARBINARY 69
307 #define SQL_CONVERT_VARCHAR 70
308 #define SQL_CONVERT_LONGVARBINARY 71
309 #define SQL_TXN_ISOLATION_OPTION 72
310 #define SQL_ODBC_SQL_OPT_IEF 73
311
312 /*
313 * ODBC SDK 1.0 Additions
314 */
315 #define SQL_CORRELATION_NAME 74
316 #define SQL_NON_NULLABLE_COLUMNS 75
317
318 /*
319 * ODBC SDK 2.0 Additions
320 */
321 #define SQL_DRIVER_HLIB 76
322 #define SQL_DRIVER_ODBC_VER 77
323 #define SQL_LOCK_TYPES 78
324 #define SQL_POS_OPERATIONS 79
325 #define SQL_POSITIONED_STATEMENTS 80
326 #define SQL_GETDATA_EXTENSIONS 81
327 #define SQL_BOOKMARK_PERSISTENCE 82
328 #define SQL_STATIC_SENSITIVITY 83
329 #define SQL_FILE_USAGE 84
330 #define SQL_NULL_COLLATION 85
331 #define SQL_ALTER_TABLE 86
332 #define SQL_COLUMN_ALIAS 87
333 #define SQL_GROUP_BY 88
334 #define SQL_KEYWORDS 89
335 #define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
336 #define SQL_OWNER_USAGE 91
337 #define SQL_QUALIFIER_USAGE 92
338 #define SQL_QUOTED_IDENTIFIER_CASE 93
339 #define SQL_SPECIAL_CHARACTERS 94
340 #define SQL_SUBQUERIES 95
341 #define SQL_UNION 96
342 #define SQL_MAX_COLUMNS_IN_GROUP_BY 97
343 #define SQL_MAX_COLUMNS_IN_INDEX 98
344 #define SQL_MAX_COLUMNS_IN_ORDER_BY 99
345 #define SQL_MAX_COLUMNS_IN_SELECT 100
346 #define SQL_MAX_COLUMNS_IN_TABLE 101
347 #define SQL_MAX_INDEX_SIZE 102
348 #define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103
349 #define SQL_MAX_ROW_SIZE 104
350 #define SQL_MAX_STATEMENT_LEN 105
351 #define SQL_MAX_TABLES_IN_SELECT 106
352 #define SQL_MAX_USER_NAME_LEN 107
353 #define SQL_MAX_CHAR_LITERAL_LEN 108
354 #define SQL_TIMEDATE_ADD_INTERVALS 109
355 #define SQL_TIMEDATE_DIFF_INTERVALS 110
356 #define SQL_NEED_LONG_DATA_LEN 111
357 #define SQL_MAX_BINARY_LITERAL_LEN 112
358 #define SQL_LIKE_ESCAPE_CLAUSE 113
359 #define SQL_QUALIFIER_LOCATION 114
360
361 /*
362 * ODBC SDK 2.01 Additions
363 */
364 #define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */
365
366 #define SQL_INFO_LAST SQL_QUALIFIER_LOCATION
367 #define SQL_INFO_DRIVER_START 1000
368
369
370 /*
371 * SQL_CONVERT_* bitmask values
372 */
373 #define SQL_CVT_CHAR 0x00000001L
374 #define SQL_CVT_NUMERIC 0x00000002L
375 #define SQL_CVT_DECIMAL 0x00000004L
376 #define SQL_CVT_INTEGER 0x00000008L
377 #define SQL_CVT_SMALLINT 0x00000010L
378 #define SQL_CVT_FLOAT 0x00000020L
379 #define SQL_CVT_REAL 0x00000040L
380 #define SQL_CVT_DOUBLE 0x00000080L
381 #define SQL_CVT_VARCHAR 0x00000100L
382 #define SQL_CVT_LONGVARCHAR 0x00000200L
383 #define SQL_CVT_BINARY 0x00000400L
384 #define SQL_CVT_VARBINARY 0x00000800L
385 #define SQL_CVT_BIT 0x00001000L
386 #define SQL_CVT_TINYINT 0x00002000L
387 #define SQL_CVT_BIGINT 0x00004000L
388 #define SQL_CVT_DATE 0x00008000L
389 #define SQL_CVT_TIME 0x00010000L
390 #define SQL_CVT_TIMESTAMP 0x00020000L
391 #define SQL_CVT_LONGVARBINARY 0x00040000L
392
393 /*
394 * SQL_CONVERT_FUNCTIONS
395 */
396 #define SQL_FN_CVT_CONVERT 0x00000001L
397
398 /*
399 * SQL_STRING_FUNCTIONS
400 */
401 #define SQL_FN_STR_CONCAT 0x00000001L
402 #define SQL_FN_STR_INSERT 0x00000002L
403 #define SQL_FN_STR_LEFT 0x00000004L
404 #define SQL_FN_STR_LTRIM 0x00000008L
405 #define SQL_FN_STR_LENGTH 0x00000010L
406 #define SQL_FN_STR_LOCATE 0x00000020L
407 #define SQL_FN_STR_LCASE 0x00000040L
408 #define SQL_FN_STR_REPEAT 0x00000080L
409 #define SQL_FN_STR_REPLACE 0x00000100L
410 #define SQL_FN_STR_RIGHT 0x00000200L
411 #define SQL_FN_STR_RTRIM 0x00000400L
412 #define SQL_FN_STR_SUBSTRING 0x00000800L
413 #define SQL_FN_STR_UCASE 0x00001000L
414 #define SQL_FN_STR_ASCII 0x00002000L
415 #define SQL_FN_STR_CHAR 0x00004000L
416 #define SQL_FN_STR_DIFFERENCE 0x00008000L
417 #define SQL_FN_STR_LOCATE_2 0x00010000L
418 #define SQL_FN_STR_SOUNDEX 0x00020000L
419 #define SQL_FN_STR_SPACE 0x00040000L
420
421 /*
422 * SQL_NUMERIC_FUNCTIONS
423 */
424 #define SQL_FN_NUM_ABS 0x00000001L
425 #define SQL_FN_NUM_ACOS 0x00000002L
426 #define SQL_FN_NUM_ASIN 0x00000004L
427 #define SQL_FN_NUM_ATAN 0x00000008L
428 #define SQL_FN_NUM_ATAN2 0x00000010L
429 #define SQL_FN_NUM_CEILING 0x00000020L
430 #define SQL_FN_NUM_COS 0x00000040L
431 #define SQL_FN_NUM_COT 0x00000080L
432 #define SQL_FN_NUM_EXP 0x00000100L
433 #define SQL_FN_NUM_FLOOR 0x00000200L
434 #define SQL_FN_NUM_LOG 0x00000400L
435 #define SQL_FN_NUM_MOD 0x00000800L
436 #define SQL_FN_NUM_SIGN 0x00001000L
437 #define SQL_FN_NUM_SIN 0x00002000L
438 #define SQL_FN_NUM_SQRT 0x00004000L
439 #define SQL_FN_NUM_TAN 0x00008000L
440 #define SQL_FN_NUM_PI 0x00010000L
441 #define SQL_FN_NUM_RAND 0x00020000L
442 #define SQL_FN_NUM_DEGREES 0x00040000L
443 #define SQL_FN_NUM_LOG10 0x00080000L
444 #define SQL_FN_NUM_POWER 0x00100000L
445 #define SQL_FN_NUM_RADIANS 0x00200000L
446 #define SQL_FN_NUM_ROUND 0x00400000L
447 #define SQL_FN_NUM_TRUNCATE 0x00800000L
448
449 /*
450 * SQL_TIMEDATE_FUNCTIONS
451 */
452 #define SQL_FN_TD_NOW 0x00000001L
453 #define SQL_FN_TD_CURDATE 0x00000002L
454 #define SQL_FN_TD_DAYOFMONTH 0x00000004L
455 #define SQL_FN_TD_DAYOFWEEK 0x00000008L
456 #define SQL_FN_TD_DAYOFYEAR 0x00000010L
457 #define SQL_FN_TD_MONTH 0x00000020L
458 #define SQL_FN_TD_QUARTER 0x00000040L
459 #define SQL_FN_TD_WEEK 0x00000080L
460 #define SQL_FN_TD_YEAR 0x00000100L
461 #define SQL_FN_TD_CURTIME 0x00000200L
462 #define SQL_FN_TD_HOUR 0x00000400L
463 #define SQL_FN_TD_MINUTE 0x00000800L
464 #define SQL_FN_TD_SECOND 0x00001000L
465 #define SQL_FN_TD_TIMESTAMPADD 0x00002000L
466 #define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L
467 #define SQL_FN_TD_DAYNAME 0x00008000L
468 #define SQL_FN_TD_MONTHNAME 0x00010000L
469
470 /*
471 * SQL_SYSTEM_FUNCTIONS
472 */
473 #define SQL_FN_SYS_USERNAME 0x00000001L
474 #define SQL_FN_SYS_DBNAME 0x00000002L
475 #define SQL_FN_SYS_IFNULL 0x00000004L
476
477 /*
478 * SQL_TIMEDATE_ADD_INTERVALS
479 * SQL_TIMEDATE_DIFF_INTERVALS
480 */
481 #define SQL_FN_TSI_FRAC_SECOND 0x00000001L
482 #define SQL_FN_TSI_SECOND 0x00000002L
483 #define SQL_FN_TSI_MINUTE 0x00000004L
484 #define SQL_FN_TSI_HOUR 0x00000008L
485 #define SQL_FN_TSI_DAY 0x00000010L
486 #define SQL_FN_TSI_WEEK 0x00000020L
487 #define SQL_FN_TSI_MONTH 0x00000040L
488 #define SQL_FN_TSI_QUARTER 0x00000080L
489 #define SQL_FN_TSI_YEAR 0x00000100L
490
491 /*
492 * SQL_ODBC_API_CONFORMANCE
493 */
494 #define SQL_OAC_NONE 0x0000
495 #define SQL_OAC_LEVEL1 0x0001
496 #define SQL_OAC_LEVEL2 0x0002
497
498 /*
499 * SQL_ODBC_SAG_CLI_CONFORMANCE
500 */
501 #define SQL_OSCC_NOT_COMPLIANT 0x0000
502 #define SQL_OSCC_COMPLIANT 0x0001
503
504 /*
505 * SQL_ODBC_SQL_CONFORMANCE
506 */
507 #define SQL_OSC_MINIMUM 0x0000
508 #define SQL_OSC_CORE 0x0001
509 #define SQL_OSC_EXTENDED 0x0002
510
511 /*
512 * SQL_CONCAT_NULL_BEHAVIOR
513 */
514 #define SQL_CB_NULL 0x0000
515 #define SQL_CB_NON_NULL 0x0001
516
517 /*
518 * SQL_CURSOR_COMMIT_BEHAVIOR
519 * SQL_CURSOR_ROLLBACK_BEHAVIOR
520 */
521 #define SQL_CB_DELETE 0x0000
522 #define SQL_CB_CLOSE 0x0001
523 #define SQL_CB_PRESERVE 0x0002
524
525 /*
526 * SQL_IDENTIFIER_CASE
527 */
528 #define SQL_IC_UPPER 0x0001
529 #define SQL_IC_LOWER 0x0002
530 #define SQL_IC_SENSITIVE 0x0003
531 #define SQL_IC_MIXED 0x0004
532
533 /*
534 * SQL_TXN_CAPABLE
535 */
536 #define SQL_TC_NONE 0x0000
537 #define SQL_TC_DML 0x0001
538 #define SQL_TC_ALL 0x0002
539 #define SQL_TC_DDL_COMMIT 0x0003
540 #define SQL_TC_DDL_IGNORE 0x0004
541
542 /*
543 * SQL_SCROLL_OPTIONS
544 */
545 #define SQL_SO_FORWARD_ONLY 0x00000001L
546 #define SQL_SO_KEYSET_DRIVEN 0x00000002L
547 #define SQL_SO_DYNAMIC 0x00000004L
548 #define SQL_SO_MIXED 0x00000008L
549 #define SQL_SO_STATIC 0x00000010L
550
551 /*
552 * SQL_SCROLL_CONCURRENCY
553 */
554 #define SQL_SCCO_READ_ONLY 0x00000001L
555 #define SQL_SCCO_LOCK 0x00000002L
556 #define SQL_SCCO_OPT_ROWVER 0x00000004L
557 #define SQL_SCCO_OPT_VALUES 0x00000008L
558
559 /*
560 * SQL_FETCH_DIRECTION
561 */
562 #define SQL_FD_FETCH_NEXT 0x00000001L
563 #define SQL_FD_FETCH_FIRST 0x00000002L
564 #define SQL_FD_FETCH_LAST 0x00000004L
565 #define SQL_FD_FETCH_PRIOR 0x00000008L
566 #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
567 #define SQL_FD_FETCH_RELATIVE 0x00000020L
568 #define SQL_FD_FETCH_RESUME 0x00000040L
569 #define SQL_FD_FETCH_BOOKMARK 0x00000080L
570
571 /*
572 * SQL_TXN_ISOLATION_OPTION
573 */
574 #define SQL_TXN_READ_UNCOMMITTED 0x00000001L
575 #define SQL_TXN_READ_COMMITTED 0x00000002L
576 #define SQL_TXN_REPEATABLE_READ 0x00000004L
577 #define SQL_TXN_SERIALIZABLE 0x00000008L
578 #define SQL_TXN_VERSIONING 0x00000010L
579
580 /*
581 * SQL_CORRELATION_NAME
582 */
583 #define SQL_CN_NONE 0x0000
584 #define SQL_CN_DIFFERENT 0x0001
585 #define SQL_CN_ANY 0x0002
586
587 /*
588 * SQL_NON_NULLABLE_COLUMNS
589 */
590 #define SQL_NNC_NULL 0x0000
591 #define SQL_NNC_NON_NULL 0x0001
592
593 /*
594 * SQL_NULL_COLLATION
595 */
596 #define SQL_NC_HIGH 0x0000
597 #define SQL_NC_LOW 0x0001
598 #define SQL_NC_START 0x0002
599 #define SQL_NC_END 0x0004
600
601 /*
602 * SQL_FILE_USAGE
603 */
604 #define SQL_FILE_NOT_SUPPORTED 0x0000
605 #define SQL_FILE_TABLE 0x0001
606 #define SQL_FILE_QUALIFIER 0x0002
607
608 /*
609 * SQL_GETDATA_EXTENSIONS
610 */
611 #define SQL_GD_ANY_COLUMN 0x00000001L
612 #define SQL_GD_ANY_ORDER 0x00000002L
613 #define SQL_GD_BLOCK 0x00000004L
614 #define SQL_GD_BOUND 0x00000008L
615
616 /*
617 * SQL_ALTER_TABLE
618 */
619 #define SQL_AT_ADD_COLUMN 0x00000001L
620 #define SQL_AT_DROP_COLUMN 0x00000002L
621
622 /*
623 * SQL_POSITIONED_STATEMENTS
624 */
625 #define SQL_PS_POSITIONED_DELETE 0x00000001L
626 #define SQL_PS_POSITIONED_UPDATE 0x00000002L
627 #define SQL_PS_SELECT_FOR_UPDATE 0x00000004L
628
629 /*
630 * SQL_GROUP_BY
631 */
632 #define SQL_GB_NOT_SUPPORTED 0x0000
633 #define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001
634 #define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002
635 #define SQL_GB_NO_RELATION 0x0003
636
637 /*
638 * SQL_OWNER_USAGE
639 */
640 #define SQL_OU_DML_STATEMENTS 0x00000001L
641 #define SQL_OU_PROCEDURE_INVOCATION 0x00000002L
642 #define SQL_OU_TABLE_DEFINITION 0x00000004L
643 #define SQL_OU_INDEX_DEFINITION 0x00000008L
644 #define SQL_OU_PRIVILEGE_DEFINITION 0x00000010L
645
646 /*
647 * SQL_QUALIFIER_USAGE
648 */
649 #define SQL_QU_DML_STATEMENTS 0x00000001L
650 #define SQL_QU_PROCEDURE_INVOCATION 0x00000002L
651 #define SQL_QU_TABLE_DEFINITION 0x00000004L
652 #define SQL_QU_INDEX_DEFINITION 0x00000008L
653 #define SQL_QU_PRIVILEGE_DEFINITION 0x00000010L
654
655 /*
656 * SQL_SUBQUERIES
657 */
658 #define SQL_SQ_COMPARISON 0x00000001L
659 #define SQL_SQ_EXISTS 0x00000002L
660 #define SQL_SQ_IN 0x00000004L
661 #define SQL_SQ_QUANTIFIED 0x00000008L
662 #define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L
663
664 /*
665 * SQL_UNION
666 */
667 #define SQL_U_UNION 0x00000001L
668 #define SQL_U_UNION_ALL 0x00000002L
669
670 /*
671 * SQL_BOOKMARK_PERSISTENCE
672 */
673 #define SQL_BP_CLOSE 0x00000001L
674 #define SQL_BP_DELETE 0x00000002L
675 #define SQL_BP_DROP 0x00000004L
676 #define SQL_BP_TRANSACTION 0x00000008L
677 #define SQL_BP_UPDATE 0x00000010L
678 #define SQL_BP_OTHER_HSTMT 0x00000020L
679 #define SQL_BP_SCROLL 0x00000040L
680
681 /*
682 * SQL_STATIC_SENSITIVITY
683 */
684 #define SQL_SS_ADDITIONS 0x00000001L
685 #define SQL_SS_DELETIONS 0x00000002L
686 #define SQL_SS_UPDATES 0x00000004L
687
688 /*
689 * SQL_LOCK_TYPES
690 */
691 #define SQL_LCK_NO_CHANGE 0x00000001L
692 #define SQL_LCK_EXCLUSIVE 0x00000002L
693 #define SQL_LCK_UNLOCK 0x00000004L
694
695 /*
696 * SQL_POS_OPERATIONS
697 */
698 #define SQL_POS_POSITION 0x00000001L
699 #define SQL_POS_REFRESH 0x00000002L
700 #define SQL_POS_UPDATE 0x00000004L
701 #define SQL_POS_DELETE 0x00000008L
702 #define SQL_POS_ADD 0x00000010L
703
704 /*
705 * SQL_QUALIFIER_LOCATION
706 */
707 #define SQL_QL_START 0x0001L
708 #define SQL_QL_END 0x0002L
709
710 /*
711 * SQL_OJ_CAPABILITIES
712 */
713 #define SQL_OJ_LEFT 0x00000001L
714 #define SQL_OJ_RIGHT 0x00000002L
715 #define SQL_OJ_FULL 0x00000004L
716 #define SQL_OJ_NESTED 0x00000008L
717 #define SQL_OJ_NOT_ORDERED 0x00000010L
718 #define SQL_OJ_INNER 0x00000020L
719 #define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L
720
721 /*
722 * SQLGetStmtOption/SQLSetStmtOption
723 */
724 #define SQL_QUERY_TIMEOUT 0
725 #define SQL_MAX_ROWS 1
726 #define SQL_NOSCAN 2
727 #define SQL_MAX_LENGTH 3
728 #define SQL_ASYNC_ENABLE 4
729 #define SQL_BIND_TYPE 5
730 #define SQL_CURSOR_TYPE 6
731 #define SQL_CONCURRENCY 7
732 #define SQL_KEYSET_SIZE 8
733 #define SQL_ROWSET_SIZE 9
734 #define SQL_SIMULATE_CURSOR 10
735 #define SQL_RETRIEVE_DATA 11
736 #define SQL_USE_BOOKMARKS 12
737 #define SQL_GET_BOOKMARK 13
738 #define SQL_ROW_NUMBER 14
739
740 #define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT
741 #define SQL_STMT_OPT_MAX SQL_ROW_NUMBER
742
743
744 /*
745 * SQL_QUERY_TIMEOUT
746 */
747 #define SQL_QUERY_TIMEOUT_DEFAULT 0UL
748
749 /*
750 * SQL_MAX_ROWS
751 */
752 #define SQL_MAX_ROWS_DEFAULT 0UL
753
754 /*
755 * SQL_NOSCAN
756 */
757 #define SQL_NOSCAN_OFF 0UL /* 1.0 FALSE */
758 #define SQL_NOSCAN_ON 1UL /* 1.0 TRUE */
759 #define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF
760
761 /*
762 * SQL_MAX_LENGTH
763 */
764 #define SQL_MAX_LENGTH_DEFAULT 0UL
765
766 /*
767 * SQL_ASYNC_ENABLE
768 */
769 #define SQL_ASYNC_ENABLE_OFF 0UL
770 #define SQL_ASYNC_ENABLE_ON 1UL
771 #define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF
772
773 /*
774 * SQL_BIND_TYPE
775 */
776 #define SQL_BIND_BY_COLUMN 0UL
777 #define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN
778
779 /*
780 * SQL_CONCURRENCY
781 */
782 #define SQL_CONCUR_READ_ONLY 1
783 #define SQL_CONCUR_LOCK 2
784 #define SQL_CONCUR_ROWVER 3
785 #define SQL_CONCUR_VALUES 4
786 #define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY
787
788 /*
789 * SQL_CURSOR_TYPE
790 */
791 #define SQL_CURSOR_FORWARD_ONLY 0UL
792 #define SQL_CURSOR_KEYSET_DRIVEN 1UL
793 #define SQL_CURSOR_DYNAMIC 2UL
794 #define SQL_CURSOR_STATIC 3UL
795 #define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY
796
797 /*
798 * SQL_ROWSET_SIZE
799 */
800 #define SQL_ROWSET_SIZE_DEFAULT 1UL
801
802 /*
803 * SQL_KEYSET_SIZE
804 */
805 #define SQL_KEYSET_SIZE_DEFAULT 0UL
806
807 /*
808 * SQL_SIMULATE_CURSOR
809 */
810 #define SQL_SC_NON_UNIQUE 0UL
811 #define SQL_SC_TRY_UNIQUE 1UL
812 #define SQL_SC_UNIQUE 2UL
813
814 /*
815 * SQL_RETRIEVE_DATA
816 */
817 #define SQL_RD_OFF 0UL
818 #define SQL_RD_ON 1UL
819 #define SQL_RD_DEFAULT SQL_RD_ON
820
821 /*
822 * SQL_USE_BOOKMARKS
823 */
824 #define SQL_UB_OFF 0UL
825 #define SQL_UB_ON 1UL
826 #define SQL_UB_DEFAULT SQL_UB_OFF
827
828 /*
829 * SQLSetConnectOption/SQLGetConnectOption
830 */
831 #define SQL_ACCESS_MODE 101
832 #define SQL_AUTOCOMMIT 102
833 #define SQL_LOGIN_TIMEOUT 103
834 #define SQL_OPT_TRACE 104
835 #define SQL_OPT_TRACEFILE 105
836 #define SQL_TRANSLATE_DLL 106
837 #define SQL_TRANSLATE_OPTION 107
838 #define SQL_TXN_ISOLATION 108
839 #define SQL_CURRENT_QUALIFIER 109
840 #define SQL_ODBC_CURSORS 110
841 #define SQL_QUIET_MODE 111
842 #define SQL_PACKET_SIZE 112
843
844 #define SQL_CONN_OPT_MIN SQL_ACCESS_MODE
845 #define SQL_CONN_OPT_MAX SQL_PACKET_SIZE
846 #define SQL_CONNECT_OPT_DRVR_START 1000
847
848
849 /*
850 * SQL_ACCESS_MODE
851 */
852 #define SQL_MODE_READ_WRITE 0UL
853 #define SQL_MODE_READ_ONLY 1UL
854 #define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE
855
856 /*
857 * SQL_AUTOCOMMIT
858 */
859 #define SQL_AUTOCOMMIT_OFF 0UL
860 #define SQL_AUTOCOMMIT_ON 1UL
861 #define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON
862
863 /*
864 * SQL_LOGIN_TIMEOUT
865 */
866 #define SQL_LOGIN_TIMEOUT_DEFAULT 15UL
867
868 /*
869 * SQL_OPT_TRACE
870 */
871 #define SQL_OPT_TRACE_OFF 0UL
872 #define SQL_OPT_TRACE_ON 1UL
873 #define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF
874 #define SQL_OPT_TRACE_FILE_DEFAULT "odbc.log"
875
876 /*
877 * SQL_ODBC_CURSORS
878 */
879 #define SQL_CUR_USE_IF_NEEDED 0UL
880 #define SQL_CUR_USE_ODBC 1UL
881 #define SQL_CUR_USE_DRIVER 2UL
882 #define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER
883
884 /*
885 * SQLSpecialColumns - Column types and scopes
886 */
887 #define SQL_BEST_ROWID 1
888 #define SQL_ROWVER 2
889
890 #define SQL_SCOPE_CURROW 0
891 #define SQL_SCOPE_TRANSACTION 1
892 #define SQL_SCOPE_SESSION 2
893
894 /*
895 * SQLSetPos
896 */
897 #define SQL_ENTIRE_ROWSET 0
898
899 /*
900 * SQLSetPos
901 */
902 #define SQL_POSITION 0
903 #define SQL_REFRESH 1
904 #define SQL_UPDATE 2
905 #define SQL_DELETE 3
906 #define SQL_ADD 4
907
908 /*
909 * SQLSetPos
910 */
911 #define SQL_LOCK_NO_CHANGE 0
912 #define SQL_LOCK_EXCLUSIVE 1
913 #define SQL_LOCK_UNLOCK 2
914
915 /*
916 * SQLSetPos
917 */
918 #define SQL_POSITION_TO(hstmt,irow) \
919 SQLSetPos(hstmt,irow,SQL_POSITION,SQL_LOCK_NO_CHANGE)
920 #define SQL_LOCK_RECORD(hstmt,irow,fLock) \
921 SQLSetPos(hstmt,irow,SQL_POSITION,fLock)
922 #define SQL_REFRESH_RECORD(hstmt,irow,fLock) \
923 SQLSetPos(hstmt,irow,SQL_REFRESH,fLock)
924 #define SQL_UPDATE_RECORD(hstmt,irow) \
925 SQLSetPos(hstmt,irow,SQL_UPDATE,SQL_LOCK_NO_CHANGE)
926 #define SQL_DELETE_RECORD(hstmt,irow) \
927 SQLSetPos(hstmt,irow,SQL_DELETE,SQL_LOCK_NO_CHANGE)
928 #define SQL_ADD_RECORD(hstmt,irow) \
929 SQLSetPos(hstmt,irow,SQL_ADD,SQL_LOCK_NO_CHANGE)
930
931 /*
932 * All the ODBC keywords
933 */
934 #define SQL_ODBC_KEYWORDS \
935 "ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,"\
936 "ASC,ASSERTION,AT,AUTHORIZATION,AVG,"\
937 "BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,"\
938 "CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,"\
939 "COBOL,COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"\
940 "CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"\
941 "CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"\
942 "DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"\
943 "DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,"\
944 "DISTINCT,DOMAIN,DOUBLE,DROP,"\
945 "ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,"\
946 "EXISTS,EXTERNAL,EXTRACT,"\
947 "FALSE,FETCH,FIRST,FLOAT,FOR,FOREIGN,FORTRAN,FOUND,FROM,FULL,"\
948 "GET,GLOBAL,GO,GOTO,GRANT,GROUP,HAVING,HOUR,"\
949 "IDENTITY,IMMEDIATE,IN,INCLUDE,INDEX,INDICATOR,INITIALLY,INNER,"\
950 "INPUT,INSENSITIVE,INSERT,INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,"\
951 "JOIN,KEY,LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,"\
952 "MATCH,MAX,MIN,MINUTE,MODULE,MONTH,MUMPS,"\
953 "NAMES,NATIONAL,NATURAL,NCHAR,NEXT,NO,NONE,NOT,NULL,NULLIF,NUMERIC,"\
954 "OCTET_LENGTH,OF,ON,ONLY,OPEN,OPTION,OR,ORDER,OUTER,OUTPUT,OVERLAPS,"\
955 "PAD,PARTIAL,PASCAL,PLI,POSITION,PRECISION,PREPARE,PRESERVE,"\
956 "PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,"\
957 "REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS,"\
958 "SCHEMA,SCROLL,SECOND,SECTION,SELECT,SEQUENCE,SESSION,SESSION_USER,SET,SIZE,"\
959 "SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,"\
960 "SUBSTRING,SUM,SYSTEM_USER,"\
961 "TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"\
962 "TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"\
963 "UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"\
964 "VALUE,,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,YEAR"
965
966 /*
967 * ----------------------------------------------------------------------
968 * Level 2 Functions
969 * ----------------------------------------------------------------------
970 */
971
972 /*
973 * SQLExtendedFetch - fFetchType
974 */
975 #define SQL_FETCH_NEXT 1
976 #define SQL_FETCH_FIRST 2
977 #define SQL_FETCH_LAST 3
978 #define SQL_FETCH_PRIOR 4
979 #define SQL_FETCH_ABSOLUTE 5
980 #define SQL_FETCH_RELATIVE 6
981 #define SQL_FETCH_BOOKMARK 8
982
983 /*
984 * SQLExtendedFetch - rgfRowStatus
985 */
986 #define SQL_ROW_SUCCESS 0
987 #define SQL_ROW_DELETED 1
988 #define SQL_ROW_UPDATED 2
989 #define SQL_ROW_NOROW 3
990 #define SQL_ROW_ADDED 4
991 #define SQL_ROW_ERROR 5
992
993 /*
994 * SQLForeignKeys - UPDATE_RULE/DELETE_RULE
995 */
996 #define SQL_CASCADE 0
997 #define SQL_RESTRICT 1
998 #define SQL_SET_NULL 2
999
1000 /*
1001 * SQLBindParameter - fParamType
1002 * SQLProcedureColumns - COLUMN_TYPE
1003 */
1004 #define SQL_PARAM_TYPE_UNKNOWN 0
1005 #define SQL_PARAM_INPUT 1
1006 #define SQL_PARAM_INPUT_OUTPUT 2
1007 #define SQL_RESULT_COL 3
1008 #define SQL_PARAM_OUTPUT 4
1009 #define SQL_RETURN_VALUE 5
1010
1011 /*
1012 * SQLSetParam to SQLBindParameter conversion
1013 */
1014 #define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT
1015 #define SQL_SETPARAM_VALUE_MAX (-1L)
1016
1017 /*
1018 * SQLStatistics - fUnique
1019 */
1020 #define SQL_INDEX_UNIQUE 0
1021 #define SQL_INDEX_ALL 1
1022
1023 /*
1024 * SQLStatistics - fAccuracy
1025 */
1026 #define SQL_QUICK 0
1027 #define SQL_ENSURE 1
1028
1029 /*
1030 * SQLStatistics - TYPE
1031 */
1032 #define SQL_TABLE_STAT 0
1033 #define SQL_INDEX_CLUSTERED 1
1034 #define SQL_INDEX_HASHED 2
1035 #define SQL_INDEX_OTHER 3
1036
1037 /*
1038 * SQLProcedures - PROCEDURE_TYPE
1039 */
1040 #define SQL_PT_UNKNOWN 0
1041 #define SQL_PT_PROCEDURE 1
1042 #define SQL_PT_FUNCTION 2
1043
1044 /*
1045 * SQLSpecialColumns - PSEUDO_COLUMN
1046 */
1047 #define SQL_PC_UNKNOWN 0
1048 #define SQL_PC_NOT_PSEUDO 1
1049 #define SQL_PC_PSEUDO 2
1050
1051 /*
1052 * Deprecated defines from prior versions of ODBC
1053 */
1054 #define SQL_DATABASE_NAME 16
1055 #define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR
1056 #define SQL_FETCH_PREV SQL_FETCH_PRIOR
1057 #define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER
1058 #define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER
1059 #define SQL_CC_DELETE SQL_CB_DELETE
1060 #define SQL_CR_DELETE SQL_CB_DELETE
1061 #define SQL_CC_CLOSE SQL_CB_CLOSE
1062 #define SQL_CR_CLOSE SQL_CB_CLOSE
1063 #define SQL_CC_PRESERVE SQL_CB_PRESERVE
1064 #define SQL_CR_PRESERVE SQL_CB_PRESERVE
1065 #define SQL_FETCH_RESUME 7
1066 #define SQL_SCROLL_FORWARD_ONLY 0L
1067 #define SQL_SCROLL_KEYSET_DRIVEN (-1L)
1068 #define SQL_SCROLL_DYNAMIC (-2L)
1069 #define SQL_SCROLL_STATIC (-3L)
1070 #define SQL_PC_NON_PSEUDO SQL_PC_NOT_PSEUDO
1071
1072 #ifdef __cplusplus
1073 extern "C" {
1074 #endif
1075 /*
1076 * Level 1 function prototypes
1077 */
1078 RETCODE SQL_API SQLColumns (HSTMT hstmt, UCHAR FAR * szTableQualifier,
1079 SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner,
1080 UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szColumnName,
1081 SWORD cbColumnName);
1082 /* glt - Changed HWND to SQLHWND to match MSW header typing */
1083 RETCODE SQL_API SQLDriverConnect (HDBC hdbc, SQLHWND hwnd,
1084 UCHAR FAR * szConnStrIn, SWORD cbConnStrIn, UCHAR FAR * szConnStrOut,
1085 SWORD cbConnStrOutMax, SWORD FAR * pcbConnStrOut, UWORD fDriverCompletion);
1086 RETCODE SQL_API SQLGetConnectOption (HDBC hdbc, UWORD fOption, PTR pvParam);
1087 RETCODE SQL_API SQLGetData (HSTMT hstmt, UWORD icol, SWORD fCType,
1088 PTR rgbValue, SDWORD cbValueMax, SDWORD FAR * pcbValue);
1089 RETCODE SQL_API SQLGetFunctions (HDBC hdbc, UWORD fFunction,
1090 UWORD FAR * pfExists);
1091 RETCODE SQL_API SQLGetInfo (HDBC hdbc, UWORD fInfoType, PTR rgbInfoValue,
1092 SWORD cbInfoValueMax, SWORD FAR * pcbInfoValue);
1093 RETCODE SQL_API SQLGetStmtOption (HSTMT hstmt, UWORD fOption, PTR pvParam);
1094 RETCODE SQL_API SQLGetTypeInfo (HSTMT hstmt, SWORD fSqlType);
1095 RETCODE SQL_API SQLParamData (HSTMT hstmt, PTR FAR * prgbValue);
1096 RETCODE SQL_API SQLPutData (HSTMT hstmt, PTR rgbValue, SDWORD cbValue);
1097 RETCODE SQL_API SQLSetConnectOption (HDBC hdbc, UWORD fOption, UDWORD vParam);
1098 RETCODE SQL_API SQLSetStmtOption (HSTMT hstmt, UWORD fOption, UDWORD vParam);
1099 RETCODE SQL_API SQLSpecialColumns (HSTMT hstmt, UWORD fColType,
1100 UCHAR FAR * szTableQualifier, SWORD cbTableQualifier,
1101 UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName,
1102 SWORD cbTableName, UWORD fScope, UWORD fNullable);
1103 RETCODE SQL_API SQLStatistics (HSTMT hstmt, UCHAR FAR * szTableQualifier,
1104 SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner,
1105 UCHAR FAR * szTableName, SWORD cbTableName, UWORD fUnique, UWORD fAccuracy);
1106 RETCODE SQL_API SQLTables (HSTMT hstmt, UCHAR FAR * szTableQualifier,
1107 SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner,
1108 UCHAR FAR * szTableName, SWORD cbTableName, UCHAR FAR * szTableType,
1109 SWORD cbTableType);
1110
1111 /*
1112 * Level 2 function prototypes
1113 */
1114 RETCODE SQL_API SQLBrowseConnect (HDBC hdbc,
1115 UCHAR FAR * szConnStrIn, SWORD cbConnStrIn, UCHAR FAR * szConnStrOut,
1116 SWORD cbConnStrOutMax, SWORD FAR * pcbConnStrOut);
1117 RETCODE SQL_API SQLColumnPrivileges (HSTMT hstmt,
1118 UCHAR FAR * szTableQualifier, SWORD cbTableQualifier,
1119 UCHAR FAR * szTableOwner, SWORD cbTableOwner, UCHAR FAR * szTableName,
1120 SWORD cbTableName, UCHAR FAR * szColumnName, SWORD cbColumnName);
1121 RETCODE SQL_API SQLDataSources (HENV henv, UWORD fDirection,
1122 UCHAR FAR * szDSN, SWORD cbDSNMax, SWORD FAR * pcbDSN,
1123 UCHAR FAR * szDescription, SWORD cbDescriptionMax,
1124 SWORD FAR * pcbDescription);
1125 RETCODE SQL_API SQLDescribeParam (HSTMT hstmt, UWORD ipar,
1126 SWORD FAR * pfSqlType, UDWORD FAR * pcbColDef, SWORD FAR * pibScale,
1127 SWORD FAR * pfNullable);
1128 RETCODE SQL_API SQLExtendedFetch (HSTMT hstmt, UWORD fFetchType, SDWORD irow,
1129 UDWORD FAR * pcrow, UWORD FAR * rgfRowStatus);
1130 RETCODE SQL_API SQLForeignKeys (HSTMT hstmt, UCHAR FAR * szPkTableQualifier,
1131 SWORD cbPkTableQualifier, UCHAR FAR * szPkTableOwner, SWORD cbPkTableOwner,
1132 UCHAR FAR * szPkTableName, SWORD cbPkTableName,
1133 UCHAR FAR * szFkTableQualifier, SWORD cbFkTableQualifier,
1134 UCHAR FAR * szFkTableOwner, SWORD cbFkTableOwner, UCHAR FAR * szFkTableName,
1135 SWORD cbFkTableName);
1136 RETCODE SQL_API SQLMoreResults (HSTMT hstmt);
1137 RETCODE SQL_API SQLNativeSql (HDBC hdbc, UCHAR FAR * szSqlStrIn,
1138 SDWORD cbSqlStrIn, UCHAR FAR * szSqlStr, SDWORD cbSqlStrMax,
1139 SDWORD FAR * pcbSqlStr);
1140 RETCODE SQL_API SQLNumParams (HSTMT hstmt, SWORD FAR * pcpar);
1141 RETCODE SQL_API SQLParamOptions (HSTMT hstmt, UDWORD crow, UDWORD FAR * pirow);
1142 RETCODE SQL_API SQLPrimaryKeys (HSTMT hstmt, UCHAR FAR * szTableQualifier,
1143 SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner,
1144 UCHAR FAR * szTableName, SWORD cbTableName);
1145 RETCODE SQL_API SQLProcedureColumns (HSTMT hstmt, UCHAR FAR * szProcQualifier,
1146 SWORD cbProcQualifier, UCHAR FAR * szProcOwner, SWORD cbProcOwner,
1147 UCHAR FAR * szProcName, SWORD cbProcName, UCHAR FAR * szColumnName,
1148 SWORD cbColumnName);
1149 RETCODE SQL_API SQLProcedures (HSTMT hstmt, UCHAR FAR * szProcQualifier,
1150 SWORD cbProcQualifier, UCHAR FAR * szProcOwner, SWORD cbProcOwner,
1151 UCHAR FAR * szProcName, SWORD cbProcName);
1152 RETCODE SQL_API SQLSetPos (HSTMT hstmt, UWORD irow, UWORD fOption, UWORD fLock);
1153 RETCODE SQL_API SQLTablePrivileges (HSTMT hstmt, UCHAR FAR * szTableQualifier,
1154 SWORD cbTableQualifier, UCHAR FAR * szTableOwner, SWORD cbTableOwner,
1155 UCHAR FAR * szTableName, SWORD cbTableName);
1156
1157 /*
1158 * SDK 2.0 Additional function prototypes
1159 */
1160 RETCODE SQL_API SQLDrivers (HENV henv, UWORD fDirection,
1161 UCHAR FAR * szDriverDesc, SWORD cbDriverDescMax, SWORD FAR * pcbDriverDesc,
1162 UCHAR FAR * szDriverAttributes, SWORD cbDrvrAttrMax,
1163 SWORD FAR * pcbDrvrAttr);
1164 RETCODE SQL_API SQLBindParameter (HSTMT hstmt, UWORD ipar, SWORD fParamType,
1165 SWORD fCType, SWORD fSqlType, UDWORD cbColDef, SWORD ibScale, PTR rgbValue,
1166 SDWORD cbValueMax, SDWORD FAR * pcbValue);
1167
1168 /*
1169 * Deprecated - use SQLSetStmtOptions
1170 */
1171 RETCODE SQL_API SQLSetScrollOptions (HSTMT hstmt, UWORD fConcurrency,
1172 SDWORD crowKeyset, UWORD crowRowset);
1173
1174 #ifdef __cplusplus
1175 }
1176 #endif
1177
1178 #endif

  ViewVC Help
Powered by ViewVC 1.1.22