Products Support Documentation Download
sql.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Raima Database Manager *
3  * ODBC core header *
4  * *
5  * Copyright (c) 2010 Raima Inc. All rights reserved. *
6  * *
7  * Use of this software, whether in source code format, or in executable, *
8  * binary object code form, is governed by the Raima Inc. LICENSE *
9  * which is fully described in the LICENSE.TXT file, included within this *
10  * distribution of files. *
11  **************************************************************************/
12 
17 #if !defined(SQL_H_INCLUDED_)
18 #define SQL_H_INCLUDED_
19 
20 #define ODBCVER 0x0351
21 
22 #include "sqltypes.h"
23 
43 /* ------------------------------------------------------------------------
44  SQL return values
45 */
46 #define SQL_NULL_DATA (-1)
47 #define SQL_DATA_AT_EXEC (-2)
48 
49 #define SQL_SUCCESS 0
51 #define SQL_SUCCESS_WITH_INFO \
52  1
54 #if (ODBCVER >= 0x0300)
55 
56 #define SQL_NO_DATA 100
57 #endif
58 
59 #define SQL_ERROR \
60  (-1)
62 #define SQL_INVALID_HANDLE \
63  (-2)
66 #define SQL_NEED_DATA \
67  99
68 #define SQL_SUCCEEDED(rc) (((rc) & (~1)) == 0)
69 
70 /* ------------------------------------------------------------------------
71  SQL string termination markers
72 */
73 #define SQL_NTS (-3)
74 #define SQL_NTSL (-3L)
75 
76 /* ------------------------------------------------------------------------
77  maximum message length
78 */
79 #define SQL_MAX_MESSAGE_LENGTH 512
80 
81 /* ------------------------------------------------------------------------
82  date/time length constants
83 */
84 #define SQL_DATE_LEN 10
85 #define SQL_TIME_LEN 8 /* add P+1 if precision is nonzero */
86 #define SQL_TIMESTAMP_LEN 19 /* add P+1 if precision is nonzero */
87 
88 /* ------------------------------------------------------------------------
89  handle type identifiers
90 */
91 #define SQL_HANDLE_ENV 1
92 #define SQL_HANDLE_DBC 2
93 #define SQL_HANDLE_STMT 3
94 #define SQL_HANDLE_DESC 4
95 
96 /* ------------------------------------------------------------------------
97  environment attribute
98 */
99 #define SQL_ATTR_OUTPUT_NTS 10001
100 
101 /* ------------------------------------------------------------------------
102  connection attributes
103 */
104 #define SQL_ATTR_AUTO_IPD 10001
105 #define SQL_ATTR_METADATA_ID 10014
107 /* ------------------------------------------------------------------------
108  statement attributes
109 */
110 #define SQL_ATTR_APP_ROW_DESC 10010
111 #define SQL_ATTR_APP_PARAM_DESC 10011
112 #define SQL_ATTR_IMP_ROW_DESC 10012
113 #define SQL_ATTR_IMP_PARAM_DESC 10013
114 #define SQL_ATTR_CURSOR_SCROLLABLE (-1)
115 #define SQL_ATTR_CURSOR_SENSITIVITY (-2)
117 /* ------------------------------------------------------------------------
118  SQL_ATTR_CURSOR_SCROLLABLE values
119 */
120 #define SQL_NONSCROLLABLE 0
121 #define SQL_SCROLLABLE 1
123 /* ------------------------------------------------------------------------
124  identifiers of fields in the SQL descriptor
125 */
126 #define SQL_DESC_COUNT 1001
127 #define SQL_DESC_TYPE 1002
128 #define SQL_DESC_LENGTH 1003
129 #define SQL_DESC_OCTET_LENGTH_PTR 1004
130 #define SQL_DESC_PRECISION 1005
131 #define SQL_DESC_SCALE 1006
132 #define SQL_DESC_DATETIME_INTERVAL_CODE 1007
133 #define SQL_DESC_NULLABLE 1008
134 #define SQL_DESC_INDICATOR_PTR 1009
135 #define SQL_DESC_DATA_PTR 1010
136 #define SQL_DESC_NAME 1011
137 #define SQL_DESC_UNNAMED 1012
138 #define SQL_DESC_OCTET_LENGTH 1013
139 #define SQL_DESC_ALLOC_TYPE 1099
141 /* ------------------------------------------------------------------------
142  identifiers of fields in the diagnostics area
143 */
144 #define SQL_DIAG_RETURNCODE 1
145 #define SQL_DIAG_NUMBER 2
146 #define SQL_DIAG_ROW_COUNT 3
147 #define SQL_DIAG_SQLSTATE 4
148 #define SQL_DIAG_NATIVE 5
149 #define SQL_DIAG_MESSAGE_TEXT 6
150 #define SQL_DIAG_DYNAMIC_FUNCTION 7
151 #define SQL_DIAG_CLASS_ORIGIN 8
152 #define SQL_DIAG_SUBCLASS_ORIGIN 9
153 #define SQL_DIAG_CONNECTION_NAME 10
154 #define SQL_DIAG_SERVER_NAME 11
155 #define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12
157 /* ------------------------------------------------------------------------
158  dynamic function codes
159 */
160 #define SQL_DIAG_ALTER_DOMAIN 3
161 #define SQL_DIAG_ALTER_TABLE 4
162 #define SQL_DIAG_CALL 7
163 #define SQL_DIAG_CREATE_ASSERTION 6
164 #define SQL_DIAG_CREATE_CHARACTER_SET 8
165 #define SQL_DIAG_CREATE_COLLATION 10
166 #define SQL_DIAG_CREATE_DOMAIN 23
167 #define SQL_DIAG_CREATE_INDEX (-1)
168 #define SQL_DIAG_CREATE_SCHEMA 64
169 #define SQL_DIAG_CREATE_TABLE 77
170 #define SQL_DIAG_CREATE_TRANSLATION 79
171 #define SQL_DIAG_CREATE_VIEW 84
172 #define SQL_DIAG_DELETE_WHERE 19
173 #define SQL_DIAG_DROP_ASSERTION 24
174 #define SQL_DIAG_DROP_CHARACTER_SET 25
175 #define SQL_DIAG_DROP_COLLATION 26
176 #define SQL_DIAG_DROP_DOMAIN 27
177 #define SQL_DIAG_DROP_INDEX (-2)
178 #define SQL_DIAG_DROP_SCHEMA 31
179 #define SQL_DIAG_DROP_TABLE 32
180 #define SQL_DIAG_DROP_TRANSLATION 33
181 #define SQL_DIAG_DROP_VIEW 36
182 #define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38
183 #define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81
184 #define SQL_DIAG_GRANT 48
185 #define SQL_DIAG_INSERT 50
186 #define SQL_DIAG_REVOKE 59
187 #define SQL_DIAG_SELECT_CURSOR 85
188 #define SQL_DIAG_UNKNOWN_STATEMENT 0
189 #define SQL_DIAG_UPDATE_WHERE 82
191 /* ----------------------------------------------------------------------------
192  SQL data type codes
193 */
194 #define SQL_UNKNOWN_TYPE 0
195 #define SQL_CHAR 1
196 #define SQL_NUMERIC 2
197 #define SQL_DECIMAL 3
198 #define SQL_INTEGER 4
199 #define SQL_SMALLINT 5
200 #define SQL_FLOAT 6
201 #define SQL_REAL 7
202 #define SQL_DOUBLE 8
203 #define SQL_DATETIME 9
204 #define SQL_VARCHAR 12
206 /* ----------------------------------------------------------------------------
207  one-parameter shortcuts for date/time data types
208 */
209 #define SQL_TYPE_DATE 91
210 #define SQL_TYPE_TIME 92
211 #define SQL_TYPE_TIMESTAMP 93
213 /* ------------------------------------------------------------------------
214  statement attribute values for cursor sensitivity
215 */
216 #define SQL_UNSPECIFIED 0
217 #define SQL_INSENSITIVE 1
218 #define SQL_SENSITIVE 2
220 /* ------------------------------------------------------------------------
221  GetTypeInfo() request for all data types
222 */
223 #define SQL_ALL_TYPES 0
224 
225 /* ------------------------------------------------------------------------
226  default conversion code for SQLBindCol, SQLBindParam and SQLGetData
227  */
228 #define SQL_DEFAULT 99
229 
230 /* ------------------------------------------------------------------------
231  SQLGetData() code indicating that the ARD specifies the data type
232 */
233 #define SQL_ARD_TYPE (-99)
234 
235 /* ------------------------------------------------------------------------
236  SQL date/time type subcodes
237 */
238 #define SQL_CODE_DATE 1
239 #define SQL_CODE_TIME 2
240 #define SQL_CODE_TIMESTAMP 3
242 /* ------------------------------------------------------------------------
243  CLI option values
244 */
245 #define SQL_FALSE 0
246 #define SQL_TRUE 1
248 /* ------------------------------------------------------------------------
249  values of NULLABLE field in descriptor
250 */
251 #define SQL_NO_NULLS 0
252 #define SQL_NULLABLE 1
253 #define SQL_NULLABLE_UNKNOWN 2
255 /* ----------------------------------------------------------------------------
256  values returned by SQLGetTypeInfo() to show WHERE clause supported
257 */
258 #define SQL_PRED_NONE 0
259 #define SQL_PRED_CHAR 1
260 #define SQL_PRED_BASIC 2
262 /* ----------------------------------------------------------------------------
263  values of UNNAMED field in descriptor
264 */
265 #define SQL_NAMED 0
266 #define SQL_UNNAMED 1
268 /* ----------------------------------------------------------------------------
269  values of ALLOC_TYPE field in descriptor
270 */
271 #define SQL_DESC_ALLOC_AUTO 1
272 #define SQL_DESC_ALLOC_USER 2
274 /* ----------------------------------------------------------------------------
275  FreeStmt() options
276 */
277 #define SQL_CLOSE 0
278 #define SQL_DROP 1
279 #define SQL_UNBIND 2
280 #define SQL_RESET_PARAMS 3
282 /* ----------------------------------------------------------------------------
283  codes used for FetchOrientation in SQLFetchScroll()
284 */
285 #define SQL_FETCH_NEXT 1
286 #define SQL_FETCH_FIRST 2
287 #define SQL_FETCH_LAST 3
288 #define SQL_FETCH_PRIOR 4
289 #define SQL_FETCH_ABSOLUTE 5
290 #define SQL_FETCH_RELATIVE 6
292 /* ----------------------------------------------------------------------------
293  SQLEndTran() options
294 */
295 #define SQL_COMMIT 0
296 #define SQL_ROLLBACK 1
298 /* ----------------------------------------------------------------------------
299  null handles returned by SQLAllocHandle()
300 */
301 #define SQL_NULL_HENV NULL
302 #define SQL_NULL_HDBC NULL
303 #define SQL_NULL_HSTMT NULL
304 #define SQL_NULL_HDESC NULL
305 /* #define SQL_NULL_DESC NULL */
307 /* ----------------------------------------------------------------------------
308  null handle used in place of parent handle when allocating HENV
309 */
310 #define SQL_NULL_HANDLE NULL
311 
312 /* ----------------------------------------------------------------------------
313  values that may appear in the result set of SQLSpecialColumns()
314 */
315 #define SQL_SCOPE_CURROW 0
316 #define SQL_SCOPE_TRANSACTION 1
317 #define SQL_SCOPE_SESSION 2
319 #define SQL_PC_UNKNOWN 0
320 #define SQL_PC_NON_PSEUDO 1
321 #define SQL_PC_PSEUDO 2
323 /* ----------------------------------------------------------------------------
324  reserved value for the IdentifierType argument of SQLSpecialColumns()
325 */
326 #define SQL_ROW_IDENTIFIER 1
327 
328 /* ----------------------------------------------------------------------------
329  reserved values for UNIQUE argument of SQLStatistics()
330 */
331 #define SQL_INDEX_UNIQUE 0
332 #define SQL_INDEX_ALL 1
334 /* ----------------------------------------------------------------------------
335  values that may appear in the result set of SQLStatistics()
336 */
337 #define SQL_INDEX_CLUSTERED 1
338 #define SQL_INDEX_HASHED 2
339 #define SQL_INDEX_OTHER 3
341 /* ----------------------------------------------------------------------------
342  SQLGetFunctions() values to identify ODBC APIs
343 */
344 #define SQL_API_SQLALLOCCONNECT 1
345 #define SQL_API_SQLALLOCENV 2
346 #define SQL_API_SQLALLOCSTMT 3
347 #define SQL_API_SQLBINDCOL 4
348 #define SQL_API_SQLCANCEL 5
349 #define SQL_API_SQLCOLUMNS 40
350 #define SQL_API_SQLCONNECT 7
351 #define SQL_API_SQLDATASOURCES 57
352 #define SQL_API_SQLDESCRIBECOL 8
353 #define SQL_API_SQLDISCONNECT 9
354 #define SQL_API_SQLERROR 10
355 #define SQL_API_SQLEXECDIRECT 11
356 #define SQL_API_SQLEXECUTE 12
357 #define SQL_API_SQLFETCH 13
358 #define SQL_API_SQLFREECONNECT 14
359 #define SQL_API_SQLFREEENV 15
360 #define SQL_API_SQLFREESTMT 16
361 #define SQL_API_SQLGETCONNECTOPTION 42
362 #define SQL_API_SQLGETCURSORNAME 17
363 #define SQL_API_SQLGETDATA 43
364 #define SQL_API_SQLGETFUNCTIONS 44
365 #define SQL_API_SQLGETINFO 45
366 #define SQL_API_SQLGETSTMTOPTION 46
367 #define SQL_API_SQLGETTYPEINFO 47
368 #define SQL_API_SQLNUMRESULTCOLS 18
369 #define SQL_API_SQLPARAMDATA 48
370 #define SQL_API_SQLPREPARE 19
371 #define SQL_API_SQLPUTDATA 49
372 #define SQL_API_SQLROWCOUNT 20
373 #define SQL_API_SQLSETCONNECTOPTION 50
374 #define SQL_API_SQLSETCURSORNAME 21
375 #define SQL_API_SQLSETPARAM 22
376 #define SQL_API_SQLSETSTMTOPTION 51
377 #define SQL_API_SQLSPECIALCOLUMNS 52
378 #define SQL_API_SQLSTATISTICS 53
379 #define SQL_API_SQLTABLES 54
380 #define SQL_API_SQLTRANSACT 23
382 /* ODBC 3.51 codes */
383 #define SQL_API_SQLALLOCHANDLE 1001
384 #define SQL_API_SQLBINDPARAM 1002
385 #define SQL_API_SQLCLOSECURSOR 1003
386 #define SQL_API_SQLCOLATTRIBUTE 6
387 #define SQL_API_SQLCOPYDESC 1004
388 #define SQL_API_SQLENDTRAN 1005
389 #define SQL_API_SQLFETCHSCROLL 1021
390 #define SQL_API_SQLFREEHANDLE 1006
391 #define SQL_API_SQLGETCONNECTATTR 1007
392 #define SQL_API_SQLGETDESCFIELD 1008
393 #define SQL_API_SQLGETDESCREC 1009
394 #define SQL_API_SQLGETDIAGFIELD 1010
395 #define SQL_API_SQLGETDIAGREC 1011
396 #define SQL_API_SQLGETENVATTR 1012
397 #define SQL_API_SQLGETSTMTATTR 1014
398 #define SQL_API_SQLSETCONNECTATTR 1016
399 #define SQL_API_SQLSETDESCFIELD 1017
400 #define SQL_API_SQLSETDESCREC 1018
401 #define SQL_API_SQLSETENVATTR 1019
402 #define SQL_API_SQLSETSTMTATTR 1020
404 /* ----------------------------------------------------------------------------
405  information requested by SQLGetInfo()
406 */
407 #define SQL_MAX_DRIVER_CONNECTIONS 0
408 #define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS
409 #define SQL_MAX_CONCURRENT_ACTIVITIES 1
410 #define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIES
411 #define SQL_DATA_SOURCE_NAME 2
412 #define SQL_FETCH_DIRECTION 8
413 #define SQL_SERVER_NAME 13
414 #define SQL_SEARCH_PATTERN_ESCAPE 14
415 #define SQL_DBMS_NAME 17
416 #define SQL_DBMS_VER 18
417 #define SQL_ACCESSIBLE_TABLES 19
418 #define SQL_ACCESSIBLE_PROCEDURES 20
419 #define SQL_CURSOR_COMMIT_BEHAVIOR 23
420 #define SQL_DATA_SOURCE_READ_ONLY 25
421 #define SQL_DEFAULT_TXN_ISOLATION 26
422 #define SQL_IDENTIFIER_CASE 28
423 #define SQL_IDENTIFIER_QUOTE_CHAR 29
424 #define SQL_MAX_COLUMN_NAME_LEN 30
425 #define SQL_MAXIMUM_COLUMN_NAME_LENGTH SQL_MAX_COLUMN_NAME_LEN
426 #define SQL_MAX_CURSOR_NAME_LEN 31
427 #define SQL_MAXIMUM_CURSOR_NAME_LENGTH SQL_MAX_CURSOR_NAME_LEN
428 #define SQL_MAX_SCHEMA_NAME_LEN 32
429 #define SQL_MAXIMUM_SCHEMA_NAME_LENGTH SQL_MAX_SCHEMA_NAME_LEN
430 #define SQL_MAX_CATALOG_NAME_LEN 34
431 #define SQL_MAXIMUM_CATALOG_NAME_LENGTH SQL_MAX_CATALOG_NAME_LEN
432 #define SQL_MAX_TABLE_NAME_LEN 35
433 #define SQL_SCROLL_CONCURRENCY 43
434 #define SQL_TXN_CAPABLE 46
435 #define SQL_TRANSACTION_CAPABLE SQL_TXN_CAPABLE
436 #define SQL_USER_NAME 47
437 #define SQL_TXN_ISOLATION_OPTION 72
438 #define SQL_TRANSACTION_ISOLATION_OPTION SQL_TXN_ISOLATION_OPTION
439 #define SQL_INTEGRITY 73
440 #define SQL_GETDATA_EXTENSIONS 81
441 #define SQL_NULL_COLLATION 85
442 #define SQL_ALTER_TABLE 86
443 #define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
444 #define SQL_SPECIAL_CHARACTERS 94
445 #define SQL_MAX_COLUMNS_IN_GROUP_BY 97
446 #define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY SQL_MAX_COLUMNS_IN_GROUP_BY
447 #define SQL_MAX_COLUMNS_IN_INDEX 98
448 #define SQL_MAXIMUM_COLUMNS_IN_INDEX SQL_MAX_COLUMNS_IN_INDEX
449 #define SQL_MAX_COLUMNS_IN_ORDER_BY 99
450 #define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY SQL_MAX_COLUMNS_IN_ORDER_BY
451 #define SQL_MAX_COLUMNS_IN_SELECT 100
452 #define SQL_MAXIMUM_COLUMNS_IN_SELECT SQL_MAX_COLUMNS_IN_SELECT
453 #define SQL_MAX_COLUMNS_IN_TABLE 101
454 #define SQL_MAX_INDEX_SIZE 102
455 #define SQL_MAXIMUM_INDEX_SIZE SQL_MAX_INDEX_SIZE
456 #define SQL_MAX_ROW_SIZE 104
457 #define SQL_MAXIMUM_ROW_SIZE SQL_MAX_ROW_SIZE
458 #define SQL_MAX_STATEMENT_LEN 105
459 #define SQL_MAXIMUM_STATEMENT_LENGTH SQL_MAX_STATEMENT_LEN
460 #define SQL_MAX_TABLES_IN_SELECT 106
461 #define SQL_MAXIMUM_TABLES_IN_SELECT SQL_MAX_TABLES_IN_SELECT
462 #define SQL_MAX_USER_NAME_LEN 107
463 #define SQL_MAXIMUM_USER_NAME_LENGTH SQL_MAX_USER_NAME_LEN
464 #define SQL_OJ_CAPABILITIES 115
465 #define SQL_OUTER_JOIN_CAPABILITIES SQL_OJ_CAPABILITIES
467 #define SQL_XOPEN_CLI_YEAR 10000
468 #define SQL_CURSOR_SENSITIVITY 10001
469 #define SQL_DESCRIBE_PARAMETER 10002
470 #define SQL_CATALOG_NAME 10003
471 #define SQL_COLLATION_SEQ 10004
472 #define SQL_MAX_IDENTIFIER_LEN 10005
473 #define SQL_MAXIMUM_IDENTIFIER_LENGTH SQL_MAX_IDENTIFIER_LEN
475 /* ----------------------------------------------------------------------------
476  SQL_ALTER_TABLE bitmasks
477 */
478 #define SQL_AT_ADD_COLUMN 0x00000001L
479 #define SQL_AT_DROP_COLUMN 0x00000002L
480 #define SQL_AT_ADD_CONSTRAINT 0x00000008L
482 /* ----------------------------------------------------------------------------
483  SQL_ASYNC_MODE values
484 */
485 #define SQL_AM_NONE 0
486 #define SQL_AM_CONNECTION 1
487 #define SQL_AM_STATEMENT 2
489 /* ----------------------------------------------------------------------------
490  SQL_CURSOR_COMMIT_BEHAVIOR values
491 */
492 #define SQL_CB_DELETE 0
493 #define SQL_CB_CLOSE 1
494 #define SQL_CB_PRESERVE 2
496 /* ----------------------------------------------------------------------------
497  SQL_FETCH_DIRECTION bitmasks
498 */
499 #define SQL_FD_FETCH_NEXT 0x00000001L
500 #define SQL_FD_FETCH_FIRST 0x00000002L
501 #define SQL_FD_FETCH_LAST 0x00000004L
502 #define SQL_FD_FETCH_PRIOR 0x00000008L
503 #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
504 #define SQL_FD_FETCH_RELATIVE 0x00000020L
506 /* ----------------------------------------------------------------------------
507  SQL_GETDATA_EXTENSIONS bitmasks
508 */
509 #define SQL_GD_ANY_COLUMN 0x00000001L
510 #define SQL_GD_ANY_ORDER 0x00000002L
512 /* ----------------------------------------------------------------------------
513  SQL_IDENTIFIER_CASE values
514 */
515 #define SQL_IC_UPPER 1
516 #define SQL_IC_LOWER 2
517 #define SQL_IC_SENSITIVE 3
518 #define SQL_IC_MIXED 4
520 /* ----------------------------------------------------------------------------
521  SQL_OJ_CAPABILITIES bitmasks
522 */
523 #define SQL_OJ_LEFT 0x00000001L
524 #define SQL_OJ_RIGHT 0x00000002L
525 #define SQL_OJ_FULL 0x00000004L
526 #define SQL_OJ_NESTED 0x00000008L
527 #define SQL_OJ_NOT_ORDERED 0x00000010L
528 #define SQL_OJ_INNER 0x00000020L
529 #define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L
531 /* ----------------------------------------------------------------------------
532  SQL_SCROLL_CONCURRENCY bitmasks
533 */
534 #define SQL_SCCO_READ_ONLY 0x00000001L
535 #define SQL_SCCO_LOCK 0x00000002L
536 #define SQL_SCCO_OPT_ROWVER 0x00000004L
537 #define SQL_SCCO_OPT_VALUES 0x00000008L
539 /* ----------------------------------------------------------------------------
540  SQL_TXN_CAPABLE values
541 */
542 #define SQL_TC_NONE 0
543 #define SQL_TC_DML 1
544 #define SQL_TC_ALL 2
545 #define SQL_TC_DDL_COMMIT 3
546 #define SQL_TC_DDL_IGNORE 4
548 /* ----------------------------------------------------------------------------
549  SQL_TXN_ISOLATION_OPTION bitmasks
550 */
551 #define SQL_TXN_READ_UNCOMMITTED 0x00000001L
552 #define SQL_TXN_READ_COMMITTED 0x00000002L
553 #define SQL_TXN_REPEATABLE_READ 0x00000004L
554 #define SQL_TXN_SERIALIZABLE 0x00000008L
556 /* ----------------------------------------------------------------------------
557  SQL_NULL_COLLATION values
558 */
559 #define SQL_NC_HIGH 0
560 #define SQL_NC_LOW 1
562 /* ----------------------------------------------------------------------------
563  ODBC function prototypes
564 */
565 #if defined(RDM_WINDOWS) && defined(RDM_ODBC_DRV)
566 #if defined(RDM_32BIT)
567 #pragma comment(linker, "/export:[email protected]")
568 #pragma comment(linker, "/export:[email protected]")
569 #pragma comment(linker, "/export:[email protected]")
570 #pragma comment(linker, "/export:[email protected]")
571 #pragma comment(linker, "/export:[email protected]")
572 #pragma comment(linker, "/export:[email protected]")
573 #pragma comment(linker, "/export:[email protected]")
574 #pragma comment(linker, "/export:[email protected]")
575 #pragma comment(linker, "/export:[email protected]")
576 #pragma comment(linker, "/export:[email protected]")
577 #pragma comment(linker, "/export:[email protected]")
578 #pragma comment(linker, "/export:[email protected]")
579 #pragma comment(linker, "/export:[email protected]")
580 #pragma comment(linker, "/export:[email protected]")
581 #pragma comment(linker, "/export:[email protected]")
582 #pragma comment(linker, "/export:[email protected]")
583 #pragma comment(linker, "/export:[email protected]")
584 #pragma comment(linker, "/export:[email protected]")
585 #pragma comment(linker, "/export:[email protected]")
586 #pragma comment(linker, "/export:[email protected]")
587 #pragma comment(linker, "/export:[email protected]")
588 #pragma comment(linker, "/export:[email protected]")
589 #pragma comment(linker, "/export:[email protected]")
590 #pragma comment(linker, "/export:[email protected]")
591 #pragma comment(linker, "/export:[email protected]")
592 #pragma comment(linker, "/export:[email protected]")
593 #pragma comment(linker, "/export:[email protected]")
594 #pragma comment(linker, "/export:[email protected]")
595 #pragma comment(linker, "/export:[email protected]")
596 #pragma comment(linker, "/export:[email protected]")
597 #pragma comment(linker, "/export:[email protected]")
598 #pragma comment(linker, "/export:[email protected]")
599 #pragma comment(linker, "/export:[email protected]")
600 #pragma comment(linker, "/export:[email protected]")
601 #pragma comment(linker, "/export:[email protected]")
602 #pragma comment(linker, "/export:[email protected]")
603 #pragma comment(linker, "/export:[email protected]")
604 #pragma comment(linker, "/export:[email protected]")
605 #pragma comment(linker, "/export:[email protected]")
606 #pragma comment(linker, "/export:[email protected]")
607 #pragma comment(linker, "/export:[email protected]")
608 #pragma comment(linker, "/export:[email protected]")
609 #pragma comment(linker, "/export:[email protected]")
610 #pragma comment(linker, "/export:[email protected]")
611 #else
612 #pragma comment(linker, "/export:SQLAllocHandle")
613 #pragma comment(linker, "/export:SQLBindCol")
614 #pragma comment(linker, "/export:SQLBindParam")
615 #pragma comment(linker, "/export:SQLCancel")
616 #pragma comment(linker, "/export:SQLCloseCursor")
617 #pragma comment(linker, "/export:SQLColAttribute")
618 #pragma comment(linker, "/export:SQLColumns")
619 #pragma comment(linker, "/export:SQLConnect")
620 #pragma comment(linker, "/export:SQLCopyDesc")
621 #pragma comment(linker, "/export:SQLDescribeCol")
622 #pragma comment(linker, "/export:SQLDisconnect")
623 #pragma comment(linker, "/export:SQLEndTran")
624 #pragma comment(linker, "/export:SQLExecDirect")
625 #pragma comment(linker, "/export:SQLExecute")
626 #pragma comment(linker, "/export:SQLFetch")
627 #pragma comment(linker, "/export:SQLFetchScroll")
628 #pragma comment(linker, "/export:SQLFreeHandle")
629 #pragma comment(linker, "/export:SQLFreeStmt")
630 #pragma comment(linker, "/export:SQLGetConnectAttr")
631 #pragma comment(linker, "/export:SQLGetCursorName")
632 #pragma comment(linker, "/export:SQLGetData")
633 #pragma comment(linker, "/export:SQLGetDescField")
634 #pragma comment(linker, "/export:SQLGetDescRec")
635 #pragma comment(linker, "/export:SQLGetDiagField")
636 #pragma comment(linker, "/export:SQLGetDiagRec")
637 #pragma comment(linker, "/export:SQLGetEnvAttr")
638 #pragma comment(linker, "/export:SQLGetFunctions")
639 #pragma comment(linker, "/export:SQLGetInfo")
640 #pragma comment(linker, "/export:SQLGetStmtAttr")
641 #pragma comment(linker, "/export:SQLGetTypeInfo")
642 #pragma comment(linker, "/export:SQLNumResultCols")
643 #pragma comment(linker, "/export:SQLParamData")
644 #pragma comment(linker, "/export:SQLPrepare")
645 #pragma comment(linker, "/export:SQLPutData")
646 #pragma comment(linker, "/export:SQLRowCount")
647 #pragma comment(linker, "/export:SQLSetConnectAttr")
648 #pragma comment(linker, "/export:SQLSetCursorName")
649 #pragma comment(linker, "/export:SQLSetDescField")
650 #pragma comment(linker, "/export:SQLSetDescRec")
651 #pragma comment(linker, "/export:SQLSetEnvAttr")
652 #pragma comment(linker, "/export:SQLSetStmtAttr")
653 #pragma comment(linker, "/export:SQLSpecialColumns")
654 #pragma comment(linker, "/export:SQLStatistics")
655 #pragma comment(linker, "/export:SQLTables")
656 #endif
657 #endif
658 
659 #if defined(__cplusplus)
660 extern "C" {
661 #endif
662 
666 RDBC_EXPORT SQLRETURN SQL_API SQLAllocHandle (
667  SQLSMALLINT HandleType,
668  SQLHANDLE InputHandle,
669  SQLHANDLE *OutputHandle);
670 
674 RDBC_EXPORT SQLRETURN SQL_API SQLBindCol (
675  SQLHSTMT StatementHandle,
676  SQLUSMALLINT ColumnNumber,
677  SQLSMALLINT TargetType,
678  SQLPOINTER TargetValue,
679  SQLLEN BufferLength,
680  SQLLEN *StrLen_or_Ind);
681 
682 RDBC_EXPORT SQLRETURN SQL_API SQLBindParam (
683  SQLHSTMT StatementHandle,
684  SQLUSMALLINT ParameterNumber,
685  SQLSMALLINT ValueType,
686  SQLSMALLINT ParameterType,
687  SQLULEN LengthPrecision,
688  SQLSMALLINT ParameterScale,
689  SQLPOINTER ParameterValue,
690  SQLLEN *StrLen_or_Ind);
691 
695 RDBC_EXPORT SQLRETURN SQL_API SQLCancel (SQLHSTMT StatementHandle);
696 
700 RDBC_EXPORT SQLRETURN SQL_API SQLCloseCursor (SQLHSTMT StatementHandle);
701 
705 RDBC_EXPORT SQLRETURN SQL_API SQLColAttribute (
706  SQLHSTMT StatementHandle,
707  SQLUSMALLINT ColumnNumber,
708  SQLUSMALLINT FieldIdentifier,
709  SQLPOINTER CharacterAttributePtr,
710  SQLSMALLINT BufferLength,
711  SQLSMALLINT *StringLength,
712  SQLLEN *NumericAttributePtr);
713 
717 RDBC_EXPORT SQLRETURN SQL_API SQLColumns (
718  SQLHSTMT StatementHandle,
719  SQLCHAR *CatalogName,
720  SQLSMALLINT NameLength1,
721  SQLCHAR *SchemaName,
722  SQLSMALLINT NameLength2,
723  SQLCHAR *TableName,
724  SQLSMALLINT NameLength3,
725  SQLCHAR *ColumnName,
726  SQLSMALLINT NameLength4);
727 
731 RDBC_EXPORT SQLRETURN SQL_API SQLConnect (
732  SQLHDBC ConnectionHandle,
733  const SQLCHAR *ServerName,
734  SQLSMALLINT NameLength1,
735  const SQLCHAR *UserName,
736  SQLSMALLINT NameLength2,
737  const SQLCHAR *Authentication,
738  SQLSMALLINT NameLength3);
739 
743 RDBC_EXPORT SQLRETURN SQL_API
744 SQLCopyDesc (SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle);
745 
749 RDBC_EXPORT SQLRETURN SQL_API SQLDataSources (
750  SQLHENV EnvironmentHandle,
751  SQLUSMALLINT Direction,
752  SQLCHAR *ServerName,
753  SQLSMALLINT BufferLength1,
754  SQLSMALLINT *NameLength1,
755  SQLCHAR *Description,
756  SQLSMALLINT BufferLength2,
757  SQLSMALLINT *NameLength2);
758 
762 RDBC_EXPORT SQLRETURN SQL_API SQLDescribeCol (
763  SQLHSTMT StatementHandle,
764  SQLUSMALLINT ColumnNumber,
765  SQLCHAR *ColumnName,
766  SQLSMALLINT BufferLength,
767  SQLSMALLINT *NameLengthPtr,
768  SQLSMALLINT *DataTypePtr,
769  SQLULEN *ColumnSizePtr,
770  SQLSMALLINT *DecimalDigitsPtr,
771  SQLSMALLINT *NullablePtr);
772 
776 RDBC_EXPORT SQLRETURN SQL_API SQLDisconnect (SQLHDBC ConnectionHandle);
777 
781 RDBC_EXPORT SQLRETURN SQL_API
782 SQLEndTran (SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType);
783 
787 RDBC_EXPORT SQLRETURN SQL_API SQLExecDirect (
788  SQLHSTMT StatementHandle,
789  const SQLCHAR *StatementText,
790  SQLINTEGER TextLength);
791 
795 RDBC_EXPORT SQLRETURN SQL_API SQLExecute (SQLHSTMT StatementHandle);
796 
800 RDBC_EXPORT SQLRETURN SQL_API SQLFetch (SQLHSTMT StatementHandle);
801 
805 RDBC_EXPORT SQLRETURN SQL_API SQLFetchScroll (
806  SQLHSTMT StatementHandle,
807  SQLSMALLINT FetchOrientation,
808  SQLLEN FetchOffset);
809 
813 RDBC_EXPORT SQLRETURN SQL_API
814 SQLFreeHandle (SQLSMALLINT HandleType, SQLHANDLE Handle);
815 
819 RDBC_EXPORT SQLRETURN SQL_API
820 SQLFreeStmt (SQLHSTMT StatementHandle, SQLUSMALLINT Option);
821 
825 RDBC_EXPORT SQLRETURN SQL_API SQLGetConnectAttr (
826  SQLHDBC ConnectionHandle,
827  SQLINTEGER Attribute,
828  SQLPOINTER Value,
829  SQLINTEGER BufferLength,
830  SQLINTEGER *StringLength);
831 
835 RDBC_EXPORT SQLRETURN SQL_API SQLGetCursorName (
836  SQLHSTMT StatementHandle,
837  SQLCHAR *CursorName,
838  SQLSMALLINT BufferLength,
839  SQLSMALLINT *NameLength);
840 
844 RDBC_EXPORT SQLRETURN SQL_API SQLGetData (
845  SQLHSTMT StatementHandle,
846  SQLUSMALLINT ColumnNumber,
847  SQLSMALLINT TargetType,
848  SQLPOINTER TargetValue,
849  SQLLEN BufferLength,
850  SQLLEN *StrLen_or_Ind);
851 
855 RDBC_EXPORT SQLRETURN SQL_API SQLGetDescField (
856  SQLHDESC DescriptorHandle,
857  SQLSMALLINT RecNumber,
858  SQLSMALLINT FieldIdentifier,
859  SQLPOINTER Value,
860  SQLINTEGER BufferLength,
861  SQLINTEGER *StringLength);
862 
866 RDBC_EXPORT SQLRETURN SQL_API SQLGetDescRec (
867  SQLHDESC DescriptorHandle,
868  SQLSMALLINT RecNumber,
869  SQLCHAR *Name,
870  SQLSMALLINT BufferLength,
871  SQLSMALLINT *StringLengthPtr,
872  SQLSMALLINT *TypePtr,
873  SQLSMALLINT *SubTypePtr,
874  SQLLEN *LengthPtr,
875  SQLSMALLINT *PrecisionPtr,
876  SQLSMALLINT *ScalePtr,
877  SQLSMALLINT *NullablePtr);
878 
882 RDBC_EXPORT SQLRETURN SQL_API SQLGetDiagField (
883  SQLSMALLINT HandleType,
884  SQLHANDLE Handle,
885  SQLSMALLINT RecNumber,
886  SQLSMALLINT DiagIdentifier,
887  SQLPOINTER DiagInfo,
888  SQLSMALLINT BufferLength,
889  SQLSMALLINT *StringLength);
890 
897 RDBC_EXPORT SQLRETURN SQL_API SQLGetDiagRec (
898  SQLSMALLINT HandleType,
899  SQLHANDLE Handle,
900  SQLSMALLINT RecNumber,
901  SQLCHAR *Sqlstate,
902  SQLINTEGER *NativeError,
903  SQLCHAR *MessageText,
904  SQLSMALLINT BufferLength,
905  SQLSMALLINT *TextLength);
906 
910 RDBC_EXPORT SQLRETURN SQL_API SQLGetEnvAttr (
911  SQLHENV EnvironmentHandle,
912  SQLINTEGER Attribute,
913  SQLPOINTER Value,
914  SQLINTEGER BufferLength,
915  SQLINTEGER *StringLength);
916 
920 RDBC_EXPORT SQLRETURN SQL_API SQLGetFunctions (
921  SQLHDBC ConnectionHandle,
922  SQLUSMALLINT FunctionId,
923  SQLUSMALLINT *Supported);
924 
928 RDBC_EXPORT SQLRETURN SQL_API SQLGetInfo (
929  SQLHDBC ConnectionHandle,
930  SQLUSMALLINT InfoType,
931  SQLPOINTER InfoValue,
932  SQLSMALLINT BufferLength,
933  SQLSMALLINT *StringLength);
934 
938 RDBC_EXPORT SQLRETURN SQL_API SQLGetStmtAttr (
939  SQLHSTMT StatementHandle,
940  SQLINTEGER Attribute,
941  SQLPOINTER Value,
942  SQLINTEGER BufferLength,
943  SQLINTEGER *StringLength);
944 
948 RDBC_EXPORT SQLRETURN SQL_API
949 SQLGetTypeInfo (SQLHSTMT StatementHandle, SQLSMALLINT DataType);
950 
954 RDBC_EXPORT SQLRETURN SQL_API
955 SQLNumResultCols (SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount);
956 
960 RDBC_EXPORT SQLRETURN SQL_API
961 SQLParamData (SQLHSTMT StatementHandle, SQLPOINTER *Value);
962 
966 RDBC_EXPORT SQLRETURN SQL_API SQLPrepare (
967  SQLHSTMT StatementHandle,
968  const SQLCHAR *StatementText,
969  SQLINTEGER TextLength);
970 
974 RDBC_EXPORT SQLRETURN SQL_API
975 SQLPutData (SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN StrLen_or_Ind);
976 
980 RDBC_EXPORT SQLRETURN SQL_API
981 SQLRowCount (SQLHSTMT StatementHandle, SQLLEN *RowCount);
982 
986 RDBC_EXPORT SQLRETURN SQL_API SQLSetConnectAttr (
987  SQLHDBC ConnectionHandle,
988  SQLINTEGER Attribute,
989  SQLPOINTER Value,
990  SQLINTEGER StringLength);
991 
995 RDBC_EXPORT SQLRETURN SQL_API SQLSetCursorName (
996  SQLHSTMT StatementHandle,
997  const SQLCHAR *CursorName,
998  SQLSMALLINT NameLength);
999 
1003 RDBC_EXPORT SQLRETURN SQL_API SQLSetDescField (
1004  SQLHDESC DescriptorHandle,
1005  SQLSMALLINT RecNumber,
1006  SQLSMALLINT FieldIdentifier,
1007  SQLPOINTER Value,
1008  SQLINTEGER BufferLength);
1009 
1013 RDBC_EXPORT SQLRETURN SQL_API SQLSetDescRec (
1014  SQLHDESC DescriptorHandle,
1015  SQLSMALLINT RecNumber,
1016  SQLSMALLINT Type,
1017  SQLSMALLINT SubType,
1018  SQLLEN Length,
1019  SQLSMALLINT Precision,
1020  SQLSMALLINT Scale,
1021  SQLPOINTER Data,
1022  SQLLEN *StringLength,
1023  SQLLEN *Indicator);
1024 
1028 RDBC_EXPORT SQLRETURN SQL_API SQLSetEnvAttr (
1029  SQLHENV EnvironmentHandle,
1030  SQLINTEGER Attribute,
1031  SQLPOINTER Value,
1032  SQLINTEGER StringLength);
1033 
1037 RDBC_EXPORT SQLRETURN SQL_API SQLSetStmtAttr (
1038  SQLHSTMT StatementHandle,
1039  SQLINTEGER Attribute,
1040  SQLPOINTER Value,
1041  SQLINTEGER StringLength);
1042 
1046 RDBC_EXPORT SQLRETURN SQL_API SQLSpecialColumns (
1047  SQLHSTMT StatementHandle,
1048  SQLUSMALLINT IdentifierType,
1049  SQLCHAR *CatalogName,
1050  SQLSMALLINT NameLength1,
1051  SQLCHAR *SchemaName,
1052  SQLSMALLINT NameLength2,
1053  SQLCHAR *TableName,
1054  SQLSMALLINT NameLength3,
1055  SQLUSMALLINT Scope,
1056  SQLUSMALLINT Nullable);
1057 
1061 RDBC_EXPORT SQLRETURN SQL_API SQLStatistics (
1062  SQLHSTMT StatementHandle,
1063  SQLCHAR *CatalogName,
1064  SQLSMALLINT NameLength1,
1065  SQLCHAR *SchemaName,
1066  SQLSMALLINT NameLength2,
1067  SQLCHAR *TableName,
1068  SQLSMALLINT NameLength3,
1069  SQLUSMALLINT Unique,
1070  SQLUSMALLINT Reserved);
1071 
1075 RDBC_EXPORT SQLRETURN SQL_API SQLTables (
1076  SQLHSTMT StatementHandle,
1077  SQLCHAR *CatalogName,
1078  SQLSMALLINT NameLength1,
1079  SQLCHAR *SchemaName,
1080  SQLSMALLINT NameLength2,
1081  SQLCHAR *TableName,
1082  SQLSMALLINT NameLength3,
1083  SQLCHAR *TableType,
1084  SQLSMALLINT NameLength4);
1085 
1086 #if defined(__cplusplus)
1087 }
1088 #endif
1089 
1090 #endif /* SQL_H_INCLUDED_ */
RDBC_EXPORT SQLRETURN SQLFetch(SQLHSTMT StatementHandle)
Fetch the next set of rows from the result set.
int32_t SQLINTEGER
Definition: sqltypes.h:55
RDBC_EXPORT SQLRETURN SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved)
Retrieve the statistics about the specified tables.
RDBC_EXPORT SQLRETURN SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)
Set an attribute of the SQL API connection.
RDBC_EXPORT SQLRETURN SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
Obtain an attribute of an SQL API environment.
RDBC_EXPORT SQLRETURN SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
Obtain an attribute of an SQL API statement.
RDBC_EXPORT SQLRETURN SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
Allocate an SQL API handle.
RDBC_EXPORT SQLRETURN SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT Type, SQLSMALLINT SubType, SQLINTEGER Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLINTEGER *StringLength, SQLINTEGER *Indicator)
Set the value of multiple descriptor record fields.
Header for the types used in ODBC.
RDBC_EXPORT SQLRETURN SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText, SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
Obtain the information about multiple diagnostic record fields.
RDBC_EXPORT SQLRETURN SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLINTEGER *StrLen_or_Ind)
RDBC_EXPORT SQLRETURN SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)
Obtain an attribute of an SQL API environment.
RDBC_EXPORT SQLRETURN SQLRowCount(SQLHSTMT StatementHandle, SQLINTEGER *RowCount)
Return the number of rows affected by INSERT/UPDATE/DELETE.
RDBC_EXPORT SQLRETURN SQLExecDirect(SQLHSTMT StatementHandle, const SQLCHAR *StatementText, SQLINTEGER TextLength)
Prepare and execute an SQL statement.
RDBC_EXPORT SQLRETURN SQLPrepare(SQLHSTMT StatementHandle, const SQLCHAR *StatementText, SQLINTEGER TextLength)
Prepare an SQL statement.
RDBC_EXPORT SQLRETURN SQLConnect(SQLHDBC ConnectionHandle, const SQLCHAR *ServerName, SQLSMALLINT NameLength1, const SQLCHAR *UserName, SQLSMALLINT NameLength2, const SQLCHAR *Authentication, SQLSMALLINT NameLength3)
Establish a connection to the database source.
RDBC_EXPORT SQLRETURN SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *TableType, SQLSMALLINT NameLength4)
Retrieve the list of table names for a catalog/database.
RDBC_EXPORT SQLRETURN SQLCopyDesc(SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle)
Copy one descriptor to another.
RDBC_EXPORT SQLRETURN SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value)
Retrieve parameter data for the statement waiting to be executed.
RDBC_EXPORT SQLRETURN SQLGetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
Obtain the information about a single descriptor header/record field.
RDBC_EXPORT SQLRETURN SQLDataSources(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLCHAR *ServerName, SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2)
Browse data sources.
RDBC_EXPORT SQLRETURN SQLGetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLCHAR *Name, SQLSMALLINT BufferLength, SQLSMALLINT *StringLengthPtr, SQLSMALLINT *TypePtr, SQLSMALLINT *SubTypePtr, SQLINTEGER *LengthPtr, SQLSMALLINT *PrecisionPtr, SQLSMALLINT *ScalePtr, SQLSMALLINT *NullablePtr)
Obtain the information about multiple descriptor header/record fields.
int16_t SQLRETURN
SQL API Return Codes.
Definition: sqltypes.h:76
RDBC_EXPORT SQLRETURN SQLColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4)
Retrieve the list of column names for a table.
RDBC_EXPORT SQLRETURN SQLCloseCursor(SQLHSTMT StatementHandle)
Close a cursor.
RDBC_EXPORT SQLRETURN SQLBindCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_Ind)
Bind an application variable to the column.
RDBC_EXPORT SQLRETURN SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
Free a SQL API handle.
uint8_t SQLCHAR
Definition: sqltypes.h:52
RDBC_EXPORT SQLRETURN SQLExecute(SQLHSTMT StatementHandle)
Execute a prepared SQL statement.
const void * SQLHANDLE
Definition: sqltypes.h:98
RDBC_EXPORT SQLRETURN SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLINTEGER StrLen_or_Ind)
Send parameterised data for insert/update.
RDBC_EXPORT SQLRETURN SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)
Set an attribute of an SQL API statement.
void * SQLPOINTER
Definition: sqltypes.h:64
RDBC_EXPORT SQLRETURN SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_Ind)
Fetch a single next row from the result set.
RDBC_EXPORT SQLRETURN SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable)
Retrieve the information about special columns.
RDBC_EXPORT SQLRETURN SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLengthPtr, SQLSMALLINT *DataTypePtr, SQLUINTEGER *ColumnSizePtr, SQLSMALLINT *DecimalDigitsPtr, SQLSMALLINT *NullablePtr)
Retrieve the detailed description of a column.
RDBC_EXPORT SQLRETURN SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength)
Return the information about the SQL API driver and data source.
RDBC_EXPORT SQLRETURN SQLSetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength)
Set the value of a single descriptor record field.
uint16_t SQLUSMALLINT
Definition: sqltypes.h:54
#define SQLULEN
Definition: sqltypes.h:92
RDBC_EXPORT SQLRETURN SQLDisconnect(SQLHDBC ConnectionHandle)
Disconnect from the database source.
RDBC_EXPORT SQLRETURN SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength)
Obtain the name of the current open cursor.
RDBC_EXPORT SQLRETURN SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType)
Commit or rollback a transaction.
RDBC_EXPORT SQLRETURN SQLCancel(SQLHSTMT StatementHandle)
Cancel a statement processing.
RDBC_EXPORT SQLRETURN SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType)
Return the information about the SQL API data types.
RDBC_EXPORT SQLRETURN SQLSetCursorName(SQLHSTMT StatementHandle, const SQLCHAR *CursorName, SQLSMALLINT NameLength)
Set the name of the current open cursor.
RDBC_EXPORT SQLRETURN SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option)
Stops a statement processing.
RDBC_EXPORT SQLRETURN SQLColAttribute(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLINTEGER *NumericAttributePtr)
Retrieve attributes of a column.
RDBC_EXPORT SQLRETURN SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount)
Return the number of columns in a result set.
RDBC_EXPORT SQLRETURN SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported)
Return whether or not a specific SQL API function is supported.
#define SQLLEN
Definition: sqltypes.h:91
#define SQL_API
Definition: sqltypes.h:43
RDBC_EXPORT SQLRETURN SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset)
Fetch the next set of rows from the result set.
int16_t SQLSMALLINT
Definition: sqltypes.h:53
RDBC_EXPORT SQLRETURN SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
Obtain an attribute of the SQL API connection.
RDBC_EXPORT SQLRETURN SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength)
Obtain the information about a single diagnostic record field.