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 #if defined(__cplusplus) && !defined(CPP_HEADER_INCLUDED)
23 #error sql.h is only for C applications. Do not include it directly in C++ applications. Use cpp-sql.h instead
24 #endif
25 
26 #include "sqltypes.h"
27 
28 
48 /* ------------------------------------------------------------------------
49  SQL return values
50 */
51 #define SQL_NULL_DATA (-1)
52 #define SQL_DATA_AT_EXEC (-2)
53 
54 #define SQL_SUCCESS 0
56 #define SQL_SUCCESS_WITH_INFO 1
57 #if (ODBCVER >= 0x0300)
58 
59 #define SQL_NO_DATA 100
60 #endif
61 
62 #define SQL_ERROR (-1)
64 #define SQL_INVALID_HANDLE (-2)
66 #define SQL_NEED_DATA 99
67 #define SQL_SUCCEEDED(rc) (((rc)&(~1))==0)
68 
69 /* ------------------------------------------------------------------------
70  SQL string termination markers
71 */
72 #define SQL_NTS (-3)
73 #define SQL_NTSL (-3L)
74 
75 /* ------------------------------------------------------------------------
76  maximum message length
77 */
78 #define SQL_MAX_MESSAGE_LENGTH 512
79 
80 /* ------------------------------------------------------------------------
81  date/time length constants
82 */
83 #define SQL_DATE_LEN 10
84 #define SQL_TIME_LEN 8 /* add P+1 if precision is nonzero */
85 #define SQL_TIMESTAMP_LEN 19 /* add P+1 if precision is nonzero */
86 
87 /* ------------------------------------------------------------------------
88  handle type identifiers
89 */
90 #define SQL_HANDLE_ENV 1
91 #define SQL_HANDLE_DBC 2
92 #define SQL_HANDLE_STMT 3
93 #define SQL_HANDLE_DESC 4
94 
95 /* ------------------------------------------------------------------------
96  environment attribute
97 */
98 #define SQL_ATTR_OUTPUT_NTS 10001
99 
100 /* ------------------------------------------------------------------------
101  connection attributes
102 */
103 #define SQL_ATTR_AUTO_IPD 10001
104 #define SQL_ATTR_METADATA_ID 10014
105 
106 /* ------------------------------------------------------------------------
107  statement attributes
108 */
109 #define SQL_ATTR_APP_ROW_DESC 10010
110 #define SQL_ATTR_APP_PARAM_DESC 10011
111 #define SQL_ATTR_IMP_ROW_DESC 10012
112 #define SQL_ATTR_IMP_PARAM_DESC 10013
113 #define SQL_ATTR_CURSOR_SCROLLABLE (-1)
114 #define SQL_ATTR_CURSOR_SENSITIVITY (-2)
115 
116 /* ------------------------------------------------------------------------
117  SQL_ATTR_CURSOR_SCROLLABLE values
118 */
119 #define SQL_NONSCROLLABLE 0
120 #define SQL_SCROLLABLE 1
121 
122 /* ------------------------------------------------------------------------
123  identifiers of fields in the SQL descriptor
124 */
125 #define SQL_DESC_COUNT 1001
126 #define SQL_DESC_TYPE 1002
127 #define SQL_DESC_LENGTH 1003
128 #define SQL_DESC_OCTET_LENGTH_PTR 1004
129 #define SQL_DESC_PRECISION 1005
130 #define SQL_DESC_SCALE 1006
131 #define SQL_DESC_DATETIME_INTERVAL_CODE 1007
132 #define SQL_DESC_NULLABLE 1008
133 #define SQL_DESC_INDICATOR_PTR 1009
134 #define SQL_DESC_DATA_PTR 1010
135 #define SQL_DESC_NAME 1011
136 #define SQL_DESC_UNNAMED 1012
137 #define SQL_DESC_OCTET_LENGTH 1013
138 #define SQL_DESC_ALLOC_TYPE 1099
139 
140 /* ------------------------------------------------------------------------
141  identifiers of fields in the diagnostics area
142 */
143 #define SQL_DIAG_RETURNCODE 1
144 #define SQL_DIAG_NUMBER 2
145 #define SQL_DIAG_ROW_COUNT 3
146 #define SQL_DIAG_SQLSTATE 4
147 #define SQL_DIAG_NATIVE 5
148 #define SQL_DIAG_MESSAGE_TEXT 6
149 #define SQL_DIAG_DYNAMIC_FUNCTION 7
150 #define SQL_DIAG_CLASS_ORIGIN 8
151 #define SQL_DIAG_SUBCLASS_ORIGIN 9
152 #define SQL_DIAG_CONNECTION_NAME 10
153 #define SQL_DIAG_SERVER_NAME 11
154 #define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12
155 
156 /* ------------------------------------------------------------------------
157  dynamic function codes
158 */
159 #define SQL_DIAG_ALTER_DOMAIN 3
160 #define SQL_DIAG_ALTER_TABLE 4
161 #define SQL_DIAG_CALL 7
162 #define SQL_DIAG_CREATE_ASSERTION 6
163 #define SQL_DIAG_CREATE_CHARACTER_SET 8
164 #define SQL_DIAG_CREATE_COLLATION 10
165 #define SQL_DIAG_CREATE_DOMAIN 23
166 #define SQL_DIAG_CREATE_INDEX (-1)
167 #define SQL_DIAG_CREATE_SCHEMA 64
168 #define SQL_DIAG_CREATE_TABLE 77
169 #define SQL_DIAG_CREATE_TRANSLATION 79
170 #define SQL_DIAG_CREATE_VIEW 84
171 #define SQL_DIAG_DELETE_WHERE 19
172 #define SQL_DIAG_DROP_ASSERTION 24
173 #define SQL_DIAG_DROP_CHARACTER_SET 25
174 #define SQL_DIAG_DROP_COLLATION 26
175 #define SQL_DIAG_DROP_DOMAIN 27
176 #define SQL_DIAG_DROP_INDEX (-2)
177 #define SQL_DIAG_DROP_SCHEMA 31
178 #define SQL_DIAG_DROP_TABLE 32
179 #define SQL_DIAG_DROP_TRANSLATION 33
180 #define SQL_DIAG_DROP_VIEW 36
181 #define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38
182 #define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81
183 #define SQL_DIAG_GRANT 48
184 #define SQL_DIAG_INSERT 50
185 #define SQL_DIAG_REVOKE 59
186 #define SQL_DIAG_SELECT_CURSOR 85
187 #define SQL_DIAG_UNKNOWN_STATEMENT 0
188 #define SQL_DIAG_UPDATE_WHERE 82
189 
190 /* ----------------------------------------------------------------------------
191  SQL data type codes
192 */
193 #define SQL_UNKNOWN_TYPE 0
194 #define SQL_CHAR 1
195 #define SQL_NUMERIC 2
196 #define SQL_DECIMAL 3
197 #define SQL_INTEGER 4
198 #define SQL_SMALLINT 5
199 #define SQL_FLOAT 6
200 #define SQL_REAL 7
201 #define SQL_DOUBLE 8
202 #define SQL_DATETIME 9
203 #define SQL_VARCHAR 12
204 
205 /* ----------------------------------------------------------------------------
206  one-parameter shortcuts for date/time data types
207 */
208 #define SQL_TYPE_DATE 91
209 #define SQL_TYPE_TIME 92
210 #define SQL_TYPE_TIMESTAMP 93
211 
212 /* ------------------------------------------------------------------------
213  statement attribute values for cursor sensitivity
214 */
215 #define SQL_UNSPECIFIED 0
216 #define SQL_INSENSITIVE 1
217 #define SQL_SENSITIVE 2
218 
219 /* ------------------------------------------------------------------------
220  GetTypeInfo() request for all data types
221 */
222 #define SQL_ALL_TYPES 0
223 
224 /* ------------------------------------------------------------------------
225  default conversion code for SQLBindCol, SQLBindParam and SQLGetData
226  */
227 #define SQL_DEFAULT 99
228 
229 /* ------------------------------------------------------------------------
230  SQLGetData() code indicating that the ARD specifies the data type
231 */
232 #define SQL_ARD_TYPE (-99)
233 
234 /* ------------------------------------------------------------------------
235  SQL date/time type subcodes
236 */
237 #define SQL_CODE_DATE 1
238 #define SQL_CODE_TIME 2
239 #define SQL_CODE_TIMESTAMP 3
240 
241 /* ------------------------------------------------------------------------
242  CLI option values
243 */
244 #define SQL_FALSE 0
245 #define SQL_TRUE 1
246 
247 /* ------------------------------------------------------------------------
248  values of NULLABLE field in descriptor
249 */
250 #define SQL_NO_NULLS 0
251 #define SQL_NULLABLE 1
252 #define SQL_NULLABLE_UNKNOWN 2
253 
254 /* ----------------------------------------------------------------------------
255  values returned by SQLGetTypeInfo() to show WHERE clause supported
256 */
257 #define SQL_PRED_NONE 0
258 #define SQL_PRED_CHAR 1
259 #define SQL_PRED_BASIC 2
260 
261 /* ----------------------------------------------------------------------------
262  values of UNNAMED field in descriptor
263 */
264 #define SQL_NAMED 0
265 #define SQL_UNNAMED 1
266 
267 /* ----------------------------------------------------------------------------
268  values of ALLOC_TYPE field in descriptor
269 */
270 #define SQL_DESC_ALLOC_AUTO 1
271 #define SQL_DESC_ALLOC_USER 2
272 
273 /* ----------------------------------------------------------------------------
274  FreeStmt() options
275 */
276 #define SQL_CLOSE 0
277 #define SQL_DROP 1
278 #define SQL_UNBIND 2
279 #define SQL_RESET_PARAMS 3
280 
281 /* ----------------------------------------------------------------------------
282  codes used for FetchOrientation in SQLFetchScroll()
283 */
284 #define SQL_FETCH_NEXT 1
285 #define SQL_FETCH_FIRST 2
286 #define SQL_FETCH_LAST 3
287 #define SQL_FETCH_PRIOR 4
288 #define SQL_FETCH_ABSOLUTE 5
289 #define SQL_FETCH_RELATIVE 6
290 
291 /* ----------------------------------------------------------------------------
292  SQLEndTran() options
293 */
294 #define SQL_COMMIT 0
295 #define SQL_ROLLBACK 1
296 
297 /* ----------------------------------------------------------------------------
298  null handles returned by SQLAllocHandle()
299 */
300 #define SQL_NULL_HENV NULL
301 #define SQL_NULL_HDBC NULL
302 #define SQL_NULL_HSTMT NULL
303 #define SQL_NULL_HDESC NULL
304 /* #define SQL_NULL_DESC NULL */
305 
306 /* ----------------------------------------------------------------------------
307  null handle used in place of parent handle when allocating HENV
308 */
309 #define SQL_NULL_HANDLE NULL
310 
311 /* ----------------------------------------------------------------------------
312  values that may appear in the result set of SQLSpecialColumns()
313 */
314 #define SQL_SCOPE_CURROW 0
315 #define SQL_SCOPE_TRANSACTION 1
316 #define SQL_SCOPE_SESSION 2
317 
318 #define SQL_PC_UNKNOWN 0
319 #define SQL_PC_NON_PSEUDO 1
320 #define SQL_PC_PSEUDO 2
321 
322 /* ----------------------------------------------------------------------------
323  reserved value for the IdentifierType argument of SQLSpecialColumns()
324 */
325 #define SQL_ROW_IDENTIFIER 1
326 
327 /* ----------------------------------------------------------------------------
328  reserved values for UNIQUE argument of SQLStatistics()
329 */
330 #define SQL_INDEX_UNIQUE 0
331 #define SQL_INDEX_ALL 1
332 
333 /* ----------------------------------------------------------------------------
334  values that may appear in the result set of SQLStatistics()
335 */
336 #define SQL_INDEX_CLUSTERED 1
337 #define SQL_INDEX_HASHED 2
338 #define SQL_INDEX_OTHER 3
339 
340 /* ----------------------------------------------------------------------------
341  SQLGetFunctions() values to identify ODBC APIs
342 */
343 #define SQL_API_SQLALLOCCONNECT 1
344 #define SQL_API_SQLALLOCENV 2
345 #define SQL_API_SQLALLOCSTMT 3
346 #define SQL_API_SQLBINDCOL 4
347 #define SQL_API_SQLCANCEL 5
348 #define SQL_API_SQLCOLUMNS 40
349 #define SQL_API_SQLCONNECT 7
350 #define SQL_API_SQLDATASOURCES 57
351 #define SQL_API_SQLDESCRIBECOL 8
352 #define SQL_API_SQLDISCONNECT 9
353 #define SQL_API_SQLERROR 10
354 #define SQL_API_SQLEXECDIRECT 11
355 #define SQL_API_SQLEXECUTE 12
356 #define SQL_API_SQLFETCH 13
357 #define SQL_API_SQLFREECONNECT 14
358 #define SQL_API_SQLFREEENV 15
359 #define SQL_API_SQLFREESTMT 16
360 #define SQL_API_SQLGETCONNECTOPTION 42
361 #define SQL_API_SQLGETCURSORNAME 17
362 #define SQL_API_SQLGETDATA 43
363 #define SQL_API_SQLGETFUNCTIONS 44
364 #define SQL_API_SQLGETINFO 45
365 #define SQL_API_SQLGETSTMTOPTION 46
366 #define SQL_API_SQLGETTYPEINFO 47
367 #define SQL_API_SQLNUMRESULTCOLS 18
368 #define SQL_API_SQLPARAMDATA 48
369 #define SQL_API_SQLPREPARE 19
370 #define SQL_API_SQLPUTDATA 49
371 #define SQL_API_SQLROWCOUNT 20
372 #define SQL_API_SQLSETCONNECTOPTION 50
373 #define SQL_API_SQLSETCURSORNAME 21
374 #define SQL_API_SQLSETPARAM 22
375 #define SQL_API_SQLSETSTMTOPTION 51
376 #define SQL_API_SQLSPECIALCOLUMNS 52
377 #define SQL_API_SQLSTATISTICS 53
378 #define SQL_API_SQLTABLES 54
379 #define SQL_API_SQLTRANSACT 23
380 
381 /* ODBC 3.51 codes */
382 #define SQL_API_SQLALLOCHANDLE 1001
383 #define SQL_API_SQLBINDPARAM 1002
384 #define SQL_API_SQLCLOSECURSOR 1003
385 #define SQL_API_SQLCOLATTRIBUTE 6
386 #define SQL_API_SQLCOPYDESC 1004
387 #define SQL_API_SQLENDTRAN 1005
388 #define SQL_API_SQLFETCHSCROLL 1021
389 #define SQL_API_SQLFREEHANDLE 1006
390 #define SQL_API_SQLGETCONNECTATTR 1007
391 #define SQL_API_SQLGETDESCFIELD 1008
392 #define SQL_API_SQLGETDESCREC 1009
393 #define SQL_API_SQLGETDIAGFIELD 1010
394 #define SQL_API_SQLGETDIAGREC 1011
395 #define SQL_API_SQLGETENVATTR 1012
396 #define SQL_API_SQLGETSTMTATTR 1014
397 #define SQL_API_SQLSETCONNECTATTR 1016
398 #define SQL_API_SQLSETDESCFIELD 1017
399 #define SQL_API_SQLSETDESCREC 1018
400 #define SQL_API_SQLSETENVATTR 1019
401 #define SQL_API_SQLSETSTMTATTR 1020
402 
403 /* ----------------------------------------------------------------------------
404  information requested by SQLGetInfo()
405 */
406 #define SQL_MAX_DRIVER_CONNECTIONS 0
407 #define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS
408 #define SQL_MAX_CONCURRENT_ACTIVITIES 1
409 #define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIES
410 #define SQL_DATA_SOURCE_NAME 2
411 #define SQL_FETCH_DIRECTION 8
412 #define SQL_SERVER_NAME 13
413 #define SQL_SEARCH_PATTERN_ESCAPE 14
414 #define SQL_DBMS_NAME 17
415 #define SQL_DBMS_VER 18
416 #define SQL_ACCESSIBLE_TABLES 19
417 #define SQL_ACCESSIBLE_PROCEDURES 20
418 #define SQL_CURSOR_COMMIT_BEHAVIOR 23
419 #define SQL_DATA_SOURCE_READ_ONLY 25
420 #define SQL_DEFAULT_TXN_ISOLATION 26
421 #define SQL_IDENTIFIER_CASE 28
422 #define SQL_IDENTIFIER_QUOTE_CHAR 29
423 #define SQL_MAX_COLUMN_NAME_LEN 30
424 #define SQL_MAXIMUM_COLUMN_NAME_LENGTH SQL_MAX_COLUMN_NAME_LEN
425 #define SQL_MAX_CURSOR_NAME_LEN 31
426 #define SQL_MAXIMUM_CURSOR_NAME_LENGTH SQL_MAX_CURSOR_NAME_LEN
427 #define SQL_MAX_SCHEMA_NAME_LEN 32
428 #define SQL_MAXIMUM_SCHEMA_NAME_LENGTH SQL_MAX_SCHEMA_NAME_LEN
429 #define SQL_MAX_CATALOG_NAME_LEN 34
430 #define SQL_MAXIMUM_CATALOG_NAME_LENGTH SQL_MAX_CATALOG_NAME_LEN
431 #define SQL_MAX_TABLE_NAME_LEN 35
432 #define SQL_SCROLL_CONCURRENCY 43
433 #define SQL_TXN_CAPABLE 46
434 #define SQL_TRANSACTION_CAPABLE SQL_TXN_CAPABLE
435 #define SQL_USER_NAME 47
436 #define SQL_TXN_ISOLATION_OPTION 72
437 #define SQL_TRANSACTION_ISOLATION_OPTION SQL_TXN_ISOLATION_OPTION
438 #define SQL_INTEGRITY 73
439 #define SQL_GETDATA_EXTENSIONS 81
440 #define SQL_NULL_COLLATION 85
441 #define SQL_ALTER_TABLE 86
442 #define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
443 #define SQL_SPECIAL_CHARACTERS 94
444 #define SQL_MAX_COLUMNS_IN_GROUP_BY 97
445 #define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY SQL_MAX_COLUMNS_IN_GROUP_BY
446 #define SQL_MAX_COLUMNS_IN_INDEX 98
447 #define SQL_MAXIMUM_COLUMNS_IN_INDEX SQL_MAX_COLUMNS_IN_INDEX
448 #define SQL_MAX_COLUMNS_IN_ORDER_BY 99
449 #define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY SQL_MAX_COLUMNS_IN_ORDER_BY
450 #define SQL_MAX_COLUMNS_IN_SELECT 100
451 #define SQL_MAXIMUM_COLUMNS_IN_SELECT SQL_MAX_COLUMNS_IN_SELECT
452 #define SQL_MAX_COLUMNS_IN_TABLE 101
453 #define SQL_MAX_INDEX_SIZE 102
454 #define SQL_MAXIMUM_INDEX_SIZE SQL_MAX_INDEX_SIZE
455 #define SQL_MAX_ROW_SIZE 104
456 #define SQL_MAXIMUM_ROW_SIZE SQL_MAX_ROW_SIZE
457 #define SQL_MAX_STATEMENT_LEN 105
458 #define SQL_MAXIMUM_STATEMENT_LENGTH SQL_MAX_STATEMENT_LEN
459 #define SQL_MAX_TABLES_IN_SELECT 106
460 #define SQL_MAXIMUM_TABLES_IN_SELECT SQL_MAX_TABLES_IN_SELECT
461 #define SQL_MAX_USER_NAME_LEN 107
462 #define SQL_MAXIMUM_USER_NAME_LENGTH SQL_MAX_USER_NAME_LEN
463 #define SQL_OJ_CAPABILITIES 115
464 #define SQL_OUTER_JOIN_CAPABILITIES SQL_OJ_CAPABILITIES
465 
466 #define SQL_XOPEN_CLI_YEAR 10000
467 #define SQL_CURSOR_SENSITIVITY 10001
468 #define SQL_DESCRIBE_PARAMETER 10002
469 #define SQL_CATALOG_NAME 10003
470 #define SQL_COLLATION_SEQ 10004
471 #define SQL_MAX_IDENTIFIER_LEN 10005
472 #define SQL_MAXIMUM_IDENTIFIER_LENGTH SQL_MAX_IDENTIFIER_LEN
473 
474 /* ----------------------------------------------------------------------------
475  SQL_ALTER_TABLE bitmasks
476 */
477 #define SQL_AT_ADD_COLUMN 0x00000001L
478 #define SQL_AT_DROP_COLUMN 0x00000002L
479 #define SQL_AT_ADD_CONSTRAINT 0x00000008L
480 
481 /* ----------------------------------------------------------------------------
482  SQL_ASYNC_MODE values
483 */
484 #define SQL_AM_NONE 0
485 #define SQL_AM_CONNECTION 1
486 #define SQL_AM_STATEMENT 2
487 
488 /* ----------------------------------------------------------------------------
489  SQL_CURSOR_COMMIT_BEHAVIOR values
490 */
491 #define SQL_CB_DELETE 0
492 #define SQL_CB_CLOSE 1
493 #define SQL_CB_PRESERVE 2
494 
495 /* ----------------------------------------------------------------------------
496  SQL_FETCH_DIRECTION bitmasks
497 */
498 #define SQL_FD_FETCH_NEXT 0x00000001L
499 #define SQL_FD_FETCH_FIRST 0x00000002L
500 #define SQL_FD_FETCH_LAST 0x00000004L
501 #define SQL_FD_FETCH_PRIOR 0x00000008L
502 #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
503 #define SQL_FD_FETCH_RELATIVE 0x00000020L
504 
505 /* ----------------------------------------------------------------------------
506  SQL_GETDATA_EXTENSIONS bitmasks
507 */
508 #define SQL_GD_ANY_COLUMN 0x00000001L
509 #define SQL_GD_ANY_ORDER 0x00000002L
510 
511 /* ----------------------------------------------------------------------------
512  SQL_IDENTIFIER_CASE values
513 */
514 #define SQL_IC_UPPER 1
515 #define SQL_IC_LOWER 2
516 #define SQL_IC_SENSITIVE 3
517 #define SQL_IC_MIXED 4
518 
519 /* ----------------------------------------------------------------------------
520  SQL_OJ_CAPABILITIES bitmasks
521 */
522 #define SQL_OJ_LEFT 0x00000001L
523 #define SQL_OJ_RIGHT 0x00000002L
524 #define SQL_OJ_FULL 0x00000004L
525 #define SQL_OJ_NESTED 0x00000008L
526 #define SQL_OJ_NOT_ORDERED 0x00000010L
527 #define SQL_OJ_INNER 0x00000020L
528 #define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L
529 
530 /* ----------------------------------------------------------------------------
531  SQL_SCROLL_CONCURRENCY bitmasks
532 */
533 #define SQL_SCCO_READ_ONLY 0x00000001L
534 #define SQL_SCCO_LOCK 0x00000002L
535 #define SQL_SCCO_OPT_ROWVER 0x00000004L
536 #define SQL_SCCO_OPT_VALUES 0x00000008L
537 
538 /* ----------------------------------------------------------------------------
539  SQL_TXN_CAPABLE values
540 */
541 #define SQL_TC_NONE 0
542 #define SQL_TC_DML 1
543 #define SQL_TC_ALL 2
544 #define SQL_TC_DDL_COMMIT 3
545 #define SQL_TC_DDL_IGNORE 4
546 
547 /* ----------------------------------------------------------------------------
548  SQL_TXN_ISOLATION_OPTION bitmasks
549 */
550 #define SQL_TXN_READ_UNCOMMITTED 0x00000001L
551 #define SQL_TXN_READ_COMMITTED 0x00000002L
552 #define SQL_TXN_REPEATABLE_READ 0x00000004L
553 #define SQL_TXN_SERIALIZABLE 0x00000008L
554 
555 /* ----------------------------------------------------------------------------
556  SQL_NULL_COLLATION values
557 */
558 #define SQL_NC_HIGH 0
559 #define SQL_NC_LOW 1
560 
561 /* ----------------------------------------------------------------------------
562  ODBC function prototypes
563 */
564 #if defined(RDM_WINDOWS) && defined(RDM_ODBC_DRV)
565  #if defined(RDM_32BIT)
566  #pragma comment(linker, "/export:[email protected]")
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:SQLGetDi[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  #else
611  #pragma comment(linker, "/export:SQLAllocHandle")
612  #pragma comment(linker, "/export:SQLBindCol")
613  #pragma comment(linker, "/export:SQLBindParam")
614  #pragma comment(linker, "/export:SQLCancel")
615  #pragma comment(linker, "/export:SQLCloseCursor")
616  #pragma comment(linker, "/export:SQLColAttribute")
617  #pragma comment(linker, "/export:SQLColumns")
618  #pragma comment(linker, "/export:SQLConnect")
619  #pragma comment(linker, "/export:SQLCopyDesc")
620  #pragma comment(linker, "/export:SQLDescribeCol")
621  #pragma comment(linker, "/export:SQLDisconnect")
622  #pragma comment(linker, "/export:SQLEndTran")
623  #pragma comment(linker, "/export:SQLExecDirect")
624  #pragma comment(linker, "/export:SQLExecute")
625  #pragma comment(linker, "/export:SQLFetch")
626  #pragma comment(linker, "/export:SQLFetchScroll")
627  #pragma comment(linker, "/export:SQLFreeHandle")
628  #pragma comment(linker, "/export:SQLFreeStmt")
629  #pragma comment(linker, "/export:SQLGetConnectAttr")
630  #pragma comment(linker, "/export:SQLGetCursorName")
631  #pragma comment(linker, "/export:SQLGetData")
632  #pragma comment(linker, "/export:SQLGetDescField")
633  #pragma comment(linker, "/export:SQLGetDescRec")
634  #pragma comment(linker, "/export:SQLGetDiagField")
635  #pragma comment(linker, "/export:SQLGetDiagRec")
636  #pragma comment(linker, "/export:SQLGetEnvAttr")
637  #pragma comment(linker, "/export:SQLGetFunctions")
638  #pragma comment(linker, "/export:SQLGetInfo")
639  #pragma comment(linker, "/export:SQLGetStmtAttr")
640  #pragma comment(linker, "/export:SQLGetTypeInfo")
641  #pragma comment(linker, "/export:SQLNumResultCols")
642  #pragma comment(linker, "/export:SQLParamData")
643  #pragma comment(linker, "/export:SQLPrepare")
644  #pragma comment(linker, "/export:SQLPutData")
645  #pragma comment(linker, "/export:SQLRowCount")
646  #pragma comment(linker, "/export:SQLSetConnectAttr")
647  #pragma comment(linker, "/export:SQLSetCursorName")
648  #pragma comment(linker, "/export:SQLSetDescField")
649  #pragma comment(linker, "/export:SQLSetDescRec")
650  #pragma comment(linker, "/export:SQLSetEnvAttr")
651  #pragma comment(linker, "/export:SQLSetStmtAttr")
652  #pragma comment(linker, "/export:SQLSpecialColumns")
653  #pragma comment(linker, "/export:SQLStatistics")
654  #pragma comment(linker, "/export:SQLTables")
655  #endif
656 #endif
657 
661 RDBC_EXPORT SQLRETURN SQL_API SQLAllocHandle (
662  SQLSMALLINT HandleType,
663  SQLHANDLE InputHandle,
664  SQLHANDLE *OutputHandle);
665 
669 RDBC_EXPORT SQLRETURN SQL_API SQLBindCol (
670  SQLHSTMT StatementHandle,
671  SQLUSMALLINT ColumnNumber,
672  SQLSMALLINT TargetType,
673  SQLPOINTER TargetValue,
674  SQLLEN BufferLength,
675  SQLLEN *StrLen_or_Ind);
676 
677 RDBC_EXPORT SQLRETURN SQL_API SQLBindParam (
678  SQLHSTMT StatementHandle,
679  SQLUSMALLINT ParameterNumber,
680  SQLSMALLINT ValueType,
681  SQLSMALLINT ParameterType,
682  SQLULEN LengthPrecision,
683  SQLSMALLINT ParameterScale,
684  SQLPOINTER ParameterValue,
685  SQLLEN *StrLen_or_Ind);
686 
690 RDBC_EXPORT SQLRETURN SQL_API SQLCancel(
691  SQLHSTMT StatementHandle);
692 
696 RDBC_EXPORT SQLRETURN SQL_API SQLCloseCursor (
697  SQLHSTMT StatementHandle);
698 
702 RDBC_EXPORT SQLRETURN SQL_API SQLColAttribute (
703  SQLHSTMT StatementHandle,
704  SQLUSMALLINT ColumnNumber,
705  SQLUSMALLINT FieldIdentifier,
706  SQLPOINTER CharacterAttributePtr,
707  SQLSMALLINT BufferLength,
708  SQLSMALLINT *StringLength,
709  SQLLEN *NumericAttributePtr);
710 
714 RDBC_EXPORT SQLRETURN SQL_API SQLColumns (
715  SQLHSTMT StatementHandle,
716  SQLCHAR *CatalogName,
717  SQLSMALLINT NameLength1,
718  SQLCHAR *SchemaName,
719  SQLSMALLINT NameLength2,
720  SQLCHAR *TableName,
721  SQLSMALLINT NameLength3,
722  SQLCHAR *ColumnName,
723  SQLSMALLINT NameLength4);
724 
728 RDBC_EXPORT SQLRETURN SQL_API SQLConnect (
729  SQLHDBC ConnectionHandle,
730  const SQLCHAR *ServerName,
731  SQLSMALLINT NameLength1,
732  const SQLCHAR *UserName,
733  SQLSMALLINT NameLength2,
734  const SQLCHAR *Authentication,
735  SQLSMALLINT NameLength3);
736 
740 RDBC_EXPORT SQLRETURN SQL_API SQLCopyDesc (
741  SQLHDESC SourceDescHandle,
742  SQLHDESC TargetDescHandle);
743 
747 RDBC_EXPORT SQLRETURN SQL_API SQLDataSources (
748  SQLHENV EnvironmentHandle,
749  SQLUSMALLINT Direction,
750  SQLCHAR *ServerName,
751  SQLSMALLINT BufferLength1,
752  SQLSMALLINT *NameLength1,
753  SQLCHAR *Description,
754  SQLSMALLINT BufferLength2,
755  SQLSMALLINT *NameLength2);
756 
760 RDBC_EXPORT SQLRETURN SQL_API SQLDescribeCol (
761  SQLHSTMT StatementHandle,
762  SQLUSMALLINT ColumnNumber,
763  SQLCHAR *ColumnName,
764  SQLSMALLINT BufferLength,
765  SQLSMALLINT *NameLengthPtr,
766  SQLSMALLINT *DataTypePtr,
767  SQLULEN *ColumnSizePtr,
768  SQLSMALLINT *DecimalDigitsPtr,
769  SQLSMALLINT *NullablePtr);
770 
774 RDBC_EXPORT SQLRETURN SQL_API SQLDisconnect (
775  SQLHDBC ConnectionHandle);
776 
780 RDBC_EXPORT SQLRETURN SQL_API SQLEndTran (
781  SQLSMALLINT HandleType,
782  SQLHANDLE Handle,
783  SQLSMALLINT CompletionType);
784 
788 RDBC_EXPORT SQLRETURN SQL_API SQLExecDirect (
789  SQLHSTMT StatementHandle,
790  const SQLCHAR *StatementText,
791  SQLINTEGER TextLength);
792 
796 RDBC_EXPORT SQLRETURN SQL_API SQLExecute (
797  SQLHSTMT StatementHandle);
798 
802 RDBC_EXPORT SQLRETURN SQL_API SQLFetch(
803  SQLHSTMT StatementHandle);
804 
808 RDBC_EXPORT SQLRETURN SQL_API SQLFetchScroll (
809  SQLHSTMT StatementHandle,
810  SQLSMALLINT FetchOrientation,
811  SQLLEN FetchOffset);
812 
816 RDBC_EXPORT SQLRETURN SQL_API SQLFreeHandle (
817  SQLSMALLINT HandleType,
818  SQLHANDLE Handle);
819 
823 RDBC_EXPORT SQLRETURN SQL_API SQLFreeStmt (
824  SQLHSTMT StatementHandle,
825  SQLUSMALLINT Option);
826 
830 RDBC_EXPORT SQLRETURN SQL_API SQLGetConnectAttr (
831  SQLHDBC ConnectionHandle,
832  SQLINTEGER Attribute,
833  SQLPOINTER Value,
834  SQLINTEGER BufferLength,
835  SQLINTEGER *StringLength);
836 
840 RDBC_EXPORT SQLRETURN SQL_API SQLGetCursorName (
841  SQLHSTMT StatementHandle,
842  SQLCHAR *CursorName,
843  SQLSMALLINT BufferLength,
844  SQLSMALLINT *NameLength);
845 
849 RDBC_EXPORT SQLRETURN SQL_API SQLGetData (
850  SQLHSTMT StatementHandle,
851  SQLUSMALLINT ColumnNumber,
852  SQLSMALLINT TargetType,
853  SQLPOINTER TargetValue,
854  SQLLEN BufferLength,
855  SQLLEN *StrLen_or_Ind);
856 
860 RDBC_EXPORT SQLRETURN SQL_API SQLGetDescField (
861  SQLHDESC DescriptorHandle,
862  SQLSMALLINT RecNumber,
863  SQLSMALLINT FieldIdentifier,
864  SQLPOINTER Value,
865  SQLINTEGER BufferLength,
866  SQLINTEGER *StringLength);
867 
871 RDBC_EXPORT SQLRETURN SQL_API SQLGetDescRec (
872  SQLHDESC DescriptorHandle,
873  SQLSMALLINT RecNumber,
874  SQLCHAR *Name,
875  SQLSMALLINT BufferLength,
876  SQLSMALLINT *StringLengthPtr,
877  SQLSMALLINT *TypePtr,
878  SQLSMALLINT *SubTypePtr,
879  SQLLEN *LengthPtr,
880  SQLSMALLINT *PrecisionPtr,
881  SQLSMALLINT *ScalePtr,
882  SQLSMALLINT *NullablePtr);
883 
887 RDBC_EXPORT SQLRETURN SQL_API SQLGetDiagField (
888  SQLSMALLINT HandleType,
889  SQLHANDLE Handle,
890  SQLSMALLINT RecNumber,
891  SQLSMALLINT DiagIdentifier,
892  SQLPOINTER DiagInfo,
893  SQLSMALLINT BufferLength,
894  SQLSMALLINT *StringLength);
895 
902 RDBC_EXPORT SQLRETURN SQL_API SQLGetDiagRec (
903  SQLSMALLINT HandleType,
904  SQLHANDLE Handle,
905  SQLSMALLINT RecNumber,
906  SQLCHAR *Sqlstate,
907  SQLINTEGER *NativeError,
908  SQLCHAR *MessageText,
909  SQLSMALLINT BufferLength,
910  SQLSMALLINT *TextLength);
911 
915 RDBC_EXPORT SQLRETURN SQL_API SQLGetEnvAttr (
916  SQLHENV EnvironmentHandle,
917  SQLINTEGER Attribute,
918  SQLPOINTER Value,
919  SQLINTEGER BufferLength,
920  SQLINTEGER *StringLength);
921 
925 RDBC_EXPORT SQLRETURN SQL_API SQLGetFunctions (
926  SQLHDBC ConnectionHandle,
927  SQLUSMALLINT FunctionId,
928  SQLUSMALLINT *Supported);
929 
933 RDBC_EXPORT SQLRETURN SQL_API SQLGetInfo (
934  SQLHDBC ConnectionHandle,
935  SQLUSMALLINT InfoType,
936  SQLPOINTER InfoValue,
937  SQLSMALLINT BufferLength,
938  SQLSMALLINT *StringLength);
939 
943 RDBC_EXPORT SQLRETURN SQL_API SQLGetStmtAttr (
944  SQLHSTMT StatementHandle,
945  SQLINTEGER Attribute,
946  SQLPOINTER Value,
947  SQLINTEGER BufferLength,
948  SQLINTEGER *StringLength);
949 
953 RDBC_EXPORT SQLRETURN SQL_API SQLGetTypeInfo (
954  SQLHSTMT StatementHandle,
955  SQLSMALLINT DataType);
956 
960 RDBC_EXPORT SQLRETURN SQL_API SQLNumResultCols (
961  SQLHSTMT StatementHandle,
962  SQLSMALLINT *ColumnCount);
963 
967 RDBC_EXPORT SQLRETURN SQL_API SQLParamData (
968  SQLHSTMT StatementHandle,
969  SQLPOINTER *Value);
970 
974 RDBC_EXPORT SQLRETURN SQL_API SQLPrepare (
975  SQLHSTMT StatementHandle,
976  const SQLCHAR *StatementText,
977  SQLINTEGER TextLength);
978 
982 RDBC_EXPORT SQLRETURN SQL_API SQLPutData (
983  SQLHSTMT StatementHandle,
984  SQLPOINTER Data,
985  SQLLEN StrLen_or_Ind);
986 
990 RDBC_EXPORT SQLRETURN SQL_API SQLRowCount (
991  SQLHSTMT StatementHandle,
992  SQLLEN *RowCount);
993 
997 RDBC_EXPORT SQLRETURN SQL_API SQLSetConnectAttr (
998  SQLHDBC ConnectionHandle,
999  SQLINTEGER Attribute,
1000  SQLPOINTER Value,
1001  SQLINTEGER StringLength);
1002 
1006 RDBC_EXPORT SQLRETURN SQL_API SQLSetCursorName (
1007  SQLHSTMT StatementHandle,
1008  const SQLCHAR *CursorName,
1009  SQLSMALLINT NameLength);
1010 
1014 RDBC_EXPORT SQLRETURN SQL_API SQLSetDescField (
1015  SQLHDESC DescriptorHandle,
1016  SQLSMALLINT RecNumber,
1017  SQLSMALLINT FieldIdentifier,
1018  SQLPOINTER Value,
1019  SQLINTEGER BufferLength);
1020 
1024 RDBC_EXPORT SQLRETURN SQL_API SQLSetDescRec (
1025  SQLHDESC DescriptorHandle,
1026  SQLSMALLINT RecNumber,
1027  SQLSMALLINT Type,
1028  SQLSMALLINT SubType,
1029  SQLLEN Length,
1030  SQLSMALLINT Precision,
1031  SQLSMALLINT Scale,
1032  SQLPOINTER Data,
1033  SQLLEN *StringLength,
1034  SQLLEN *Indicator);
1035 
1039 RDBC_EXPORT SQLRETURN SQL_API SQLSetEnvAttr (
1040  SQLHENV EnvironmentHandle,
1041  SQLINTEGER Attribute,
1042  SQLPOINTER Value,
1043  SQLINTEGER StringLength);
1044 
1048 RDBC_EXPORT SQLRETURN SQL_API SQLSetStmtAttr(
1049  SQLHSTMT StatementHandle,
1050  SQLINTEGER Attribute,
1051  SQLPOINTER Value,
1052  SQLINTEGER StringLength);
1053 
1057 RDBC_EXPORT SQLRETURN SQL_API SQLSpecialColumns (
1058  SQLHSTMT StatementHandle,
1059  SQLUSMALLINT IdentifierType,
1060  SQLCHAR *CatalogName,
1061  SQLSMALLINT NameLength1,
1062  SQLCHAR *SchemaName,
1063  SQLSMALLINT NameLength2,
1064  SQLCHAR *TableName,
1065  SQLSMALLINT NameLength3,
1066  SQLUSMALLINT Scope,
1067  SQLUSMALLINT Nullable);
1068 
1072 RDBC_EXPORT SQLRETURN SQL_API SQLStatistics (
1073  SQLHSTMT StatementHandle,
1074  SQLCHAR *CatalogName,
1075  SQLSMALLINT NameLength1,
1076  SQLCHAR *SchemaName,
1077  SQLSMALLINT NameLength2,
1078  SQLCHAR *TableName,
1079  SQLSMALLINT NameLength3,
1080  SQLUSMALLINT Unique,
1081  SQLUSMALLINT Reserved);
1082 
1086 RDBC_EXPORT SQLRETURN SQL_API SQLTables (
1087  SQLHSTMT StatementHandle,
1088  SQLCHAR *CatalogName,
1089  SQLSMALLINT NameLength1,
1090  SQLCHAR *SchemaName,
1091  SQLSMALLINT NameLength2,
1092  SQLCHAR *TableName,
1093  SQLSMALLINT NameLength3,
1094  SQLCHAR *TableType,
1095  SQLSMALLINT NameLength4);
1096 
1097 #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:50
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:71
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:47
RDBC_EXPORT SQLRETURN SQLExecute(SQLHSTMT StatementHandle)
Execute a prepared SQL statement.
const void * SQLHANDLE
Definition: sqltypes.h:93
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:59
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:49
#define SQLULEN
Definition: sqltypes.h:87
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:86
#define SQL_API
Definition: sqltypes.h:38
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:48
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.