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 
45 /* ------------------------------------------------------------------------
46  SQL return values
47 */
48 #define SQL_NULL_DATA (-1)
49 #define SQL_DATA_AT_EXEC (-2)
50 #define SQL_SUCCESS 0
51 #define SQL_SUCCESS_WITH_INFO 1
52 #if (ODBCVER >= 0x0300)
53 #define SQL_NO_DATA 100
54 #endif
55 #define SQL_ERROR (-1)
56 #define SQL_INVALID_HANDLE (-2)
57 #define SQL_STILL_EXECUTING 2
58 #define SQL_NEED_DATA 99
59 #define SQL_SUCCEEDED(rc) (((rc)&(~1))==0)
60 
61 /* ------------------------------------------------------------------------
62  SQL string termination markers
63 */
64 #define SQL_NTS (-3)
65 #define SQL_NTSL (-3L)
66 
67 /* ------------------------------------------------------------------------
68  maximum message length
69 */
70 #define SQL_MAX_MESSAGE_LENGTH 512
71 
72 /* ------------------------------------------------------------------------
73  date/time length constants
74 */
75 #define SQL_DATE_LEN 10
76 #define SQL_TIME_LEN 8 /* add P+1 if precision is nonzero */
77 #define SQL_TIMESTAMP_LEN 19 /* add P+1 if precision is nonzero */
78 
79 /* ------------------------------------------------------------------------
80  handle type identifiers
81 */
82 #define SQL_HANDLE_ENV 1
83 #define SQL_HANDLE_DBC 2
84 #define SQL_HANDLE_STMT 3
85 #define SQL_HANDLE_DESC 4
86 
87 /* ------------------------------------------------------------------------
88  environment attribute
89 */
90 #define SQL_ATTR_OUTPUT_NTS 10001
91 
92 /* ------------------------------------------------------------------------
93  connection attributes
94 */
95 #define SQL_ATTR_AUTO_IPD 10001
96 #define SQL_ATTR_METADATA_ID 10014
97 
98 /* ------------------------------------------------------------------------
99  statement attributes
100 */
101 #define SQL_ATTR_APP_ROW_DESC 10010
102 #define SQL_ATTR_APP_PARAM_DESC 10011
103 #define SQL_ATTR_IMP_ROW_DESC 10012
104 #define SQL_ATTR_IMP_PARAM_DESC 10013
105 #define SQL_ATTR_CURSOR_SCROLLABLE (-1)
106 #define SQL_ATTR_CURSOR_SENSITIVITY (-2)
107 
108 /* ------------------------------------------------------------------------
109  SQL_ATTR_CURSOR_SCROLLABLE values
110 */
111 #define SQL_NONSCROLLABLE 0
112 #define SQL_SCROLLABLE 1
113 
114 /* ------------------------------------------------------------------------
115  identifiers of fields in the SQL descriptor
116 */
117 #define SQL_DESC_COUNT 1001
118 #define SQL_DESC_TYPE 1002
119 #define SQL_DESC_LENGTH 1003
120 #define SQL_DESC_OCTET_LENGTH_PTR 1004
121 #define SQL_DESC_PRECISION 1005
122 #define SQL_DESC_SCALE 1006
123 #define SQL_DESC_DATETIME_INTERVAL_CODE 1007
124 #define SQL_DESC_NULLABLE 1008
125 #define SQL_DESC_INDICATOR_PTR 1009
126 #define SQL_DESC_DATA_PTR 1010
127 #define SQL_DESC_NAME 1011
128 #define SQL_DESC_UNNAMED 1012
129 #define SQL_DESC_OCTET_LENGTH 1013
130 #define SQL_DESC_ALLOC_TYPE 1099
131 
132 /* ------------------------------------------------------------------------
133  identifiers of fields in the diagnostics area
134 */
135 #define SQL_DIAG_RETURNCODE 1
136 #define SQL_DIAG_NUMBER 2
137 #define SQL_DIAG_ROW_COUNT 3
138 #define SQL_DIAG_SQLSTATE 4
139 #define SQL_DIAG_NATIVE 5
140 #define SQL_DIAG_MESSAGE_TEXT 6
141 #define SQL_DIAG_DYNAMIC_FUNCTION 7
142 #define SQL_DIAG_CLASS_ORIGIN 8
143 #define SQL_DIAG_SUBCLASS_ORIGIN 9
144 #define SQL_DIAG_CONNECTION_NAME 10
145 #define SQL_DIAG_SERVER_NAME 11
146 #define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12
147 
148 /* ------------------------------------------------------------------------
149  dynamic function codes
150 */
151 #define SQL_DIAG_ALTER_DOMAIN 3
152 #define SQL_DIAG_ALTER_TABLE 4
153 #define SQL_DIAG_CALL 7
154 #define SQL_DIAG_CREATE_ASSERTION 6
155 #define SQL_DIAG_CREATE_CHARACTER_SET 8
156 #define SQL_DIAG_CREATE_COLLATION 10
157 #define SQL_DIAG_CREATE_DOMAIN 23
158 #define SQL_DIAG_CREATE_INDEX (-1)
159 #define SQL_DIAG_CREATE_SCHEMA 64
160 #define SQL_DIAG_CREATE_TABLE 77
161 #define SQL_DIAG_CREATE_TRANSLATION 79
162 #define SQL_DIAG_CREATE_VIEW 84
163 #define SQL_DIAG_DELETE_WHERE 19
164 #define SQL_DIAG_DROP_ASSERTION 24
165 #define SQL_DIAG_DROP_CHARACTER_SET 25
166 #define SQL_DIAG_DROP_COLLATION 26
167 #define SQL_DIAG_DROP_DOMAIN 27
168 #define SQL_DIAG_DROP_INDEX (-2)
169 #define SQL_DIAG_DROP_SCHEMA 31
170 #define SQL_DIAG_DROP_TABLE 32
171 #define SQL_DIAG_DROP_TRANSLATION 33
172 #define SQL_DIAG_DROP_VIEW 36
173 #define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38
174 #define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81
175 #define SQL_DIAG_GRANT 48
176 #define SQL_DIAG_INSERT 50
177 #define SQL_DIAG_REVOKE 59
178 #define SQL_DIAG_SELECT_CURSOR 85
179 #define SQL_DIAG_UNKNOWN_STATEMENT 0
180 #define SQL_DIAG_UPDATE_WHERE 82
181 
182 /* ----------------------------------------------------------------------------
183  SQL data type codes
184 */
185 #define SQL_UNKNOWN_TYPE 0
186 #define SQL_CHAR 1
187 #define SQL_NUMERIC 2
188 #define SQL_DECIMAL 3
189 #define SQL_INTEGER 4
190 #define SQL_SMALLINT 5
191 #define SQL_FLOAT 6
192 #define SQL_REAL 7
193 #define SQL_DOUBLE 8
194 #define SQL_DATETIME 9
195 #define SQL_VARCHAR 12
196 
197 /* ----------------------------------------------------------------------------
198  one-parameter shortcuts for date/time data types
199 */
200 #define SQL_TYPE_DATE 91
201 #define SQL_TYPE_TIME 92
202 #define SQL_TYPE_TIMESTAMP 93
203 
204 /* ------------------------------------------------------------------------
205  statement attribute values for cursor sensitivity
206 */
207 #define SQL_UNSPECIFIED 0
208 #define SQL_INSENSITIVE 1
209 #define SQL_SENSITIVE 2
210 
211 /* ------------------------------------------------------------------------
212  GetTypeInfo() request for all data types
213 */
214 #define SQL_ALL_TYPES 0
215 
216 /* ------------------------------------------------------------------------
217  default conversion code for SQLBindCol, SQLBindParam and SQLGetData
218  */
219 #define SQL_DEFAULT 99
220 
221 /* ------------------------------------------------------------------------
222  SQLGetData() code indicating that the ARD specifies the data type
223 */
224 #define SQL_ARD_TYPE (-99)
225 
226 /* ------------------------------------------------------------------------
227  SQL date/time type subcodes
228 */
229 #define SQL_CODE_DATE 1
230 #define SQL_CODE_TIME 2
231 #define SQL_CODE_TIMESTAMP 3
232 
233 /* ------------------------------------------------------------------------
234  CLI option values
235 */
236 #define SQL_FALSE 0
237 #define SQL_TRUE 1
238 
239 /* ------------------------------------------------------------------------
240  values of NULLABLE field in descriptor
241 */
242 #define SQL_NO_NULLS 0
243 #define SQL_NULLABLE 1
244 #define SQL_NULLABLE_UNKNOWN 2
245 
246 /* ----------------------------------------------------------------------------
247  values returned by SQLGetTypeInfo() to show WHERE clause supported
248 */
249 #define SQL_PRED_NONE 0
250 #define SQL_PRED_CHAR 1
251 #define SQL_PRED_BASIC 2
252 
253 /* ----------------------------------------------------------------------------
254  values of UNNAMED field in descriptor
255 */
256 #define SQL_NAMED 0
257 #define SQL_UNNAMED 1
258 
259 /* ----------------------------------------------------------------------------
260  values of ALLOC_TYPE field in descriptor
261 */
262 #define SQL_DESC_ALLOC_AUTO 1
263 #define SQL_DESC_ALLOC_USER 2
264 
265 /* ----------------------------------------------------------------------------
266  FreeStmt() options
267 */
268 #define SQL_CLOSE 0
269 #define SQL_DROP 1
270 #define SQL_UNBIND 2
271 #define SQL_RESET_PARAMS 3
272 
273 /* ----------------------------------------------------------------------------
274  codes used for FetchOrientation in SQLFetchScroll()
275 */
276 #define SQL_FETCH_NEXT 1
277 #define SQL_FETCH_FIRST 2
278 #define SQL_FETCH_LAST 3
279 #define SQL_FETCH_PRIOR 4
280 #define SQL_FETCH_ABSOLUTE 5
281 #define SQL_FETCH_RELATIVE 6
282 
283 /* ----------------------------------------------------------------------------
284  SQLEndTran() options
285 */
286 #define SQL_COMMIT 0
287 #define SQL_ROLLBACK 1
288 
289 /* ----------------------------------------------------------------------------
290  null handles returned by SQLAllocHandle()
291 */
292 #define SQL_NULL_HENV NULL
293 #define SQL_NULL_HDBC NULL
294 #define SQL_NULL_HSTMT NULL
295 #define SQL_NULL_HDESC NULL
296 /* #define SQL_NULL_DESC NULL */
297 
298 /* ----------------------------------------------------------------------------
299  null handle used in place of parent handle when allocating HENV
300 */
301 #define SQL_NULL_HANDLE NULL
302 
303 /* ----------------------------------------------------------------------------
304  values that may appear in the result set of SQLSpecialColumns()
305 */
306 #define SQL_SCOPE_CURROW 0
307 #define SQL_SCOPE_TRANSACTION 1
308 #define SQL_SCOPE_SESSION 2
309 
310 #define SQL_PC_UNKNOWN 0
311 #define SQL_PC_NON_PSEUDO 1
312 #define SQL_PC_PSEUDO 2
313 
314 /* ----------------------------------------------------------------------------
315  reserved value for the IdentifierType argument of SQLSpecialColumns()
316 */
317 #define SQL_ROW_IDENTIFIER 1
318 
319 /* ----------------------------------------------------------------------------
320  reserved values for UNIQUE argument of SQLStatistics()
321 */
322 #define SQL_INDEX_UNIQUE 0
323 #define SQL_INDEX_ALL 1
324 
325 /* ----------------------------------------------------------------------------
326  values that may appear in the result set of SQLStatistics()
327 */
328 #define SQL_INDEX_CLUSTERED 1
329 #define SQL_INDEX_HASHED 2
330 #define SQL_INDEX_OTHER 3
331 
332 /* ----------------------------------------------------------------------------
333  SQLGetFunctions() values to identify ODBC APIs
334 */
335 #define SQL_API_SQLALLOCCONNECT 1
336 #define SQL_API_SQLALLOCENV 2
337 #define SQL_API_SQLALLOCSTMT 3
338 #define SQL_API_SQLBINDCOL 4
339 #define SQL_API_SQLCANCEL 5
340 #define SQL_API_SQLCOLUMNS 40
341 #define SQL_API_SQLCONNECT 7
342 #define SQL_API_SQLDATASOURCES 57
343 #define SQL_API_SQLDESCRIBECOL 8
344 #define SQL_API_SQLDISCONNECT 9
345 #define SQL_API_SQLERROR 10
346 #define SQL_API_SQLEXECDIRECT 11
347 #define SQL_API_SQLEXECUTE 12
348 #define SQL_API_SQLFETCH 13
349 #define SQL_API_SQLFREECONNECT 14
350 #define SQL_API_SQLFREEENV 15
351 #define SQL_API_SQLFREESTMT 16
352 #define SQL_API_SQLGETCONNECTOPTION 42
353 #define SQL_API_SQLGETCURSORNAME 17
354 #define SQL_API_SQLGETDATA 43
355 #define SQL_API_SQLGETFUNCTIONS 44
356 #define SQL_API_SQLGETINFO 45
357 #define SQL_API_SQLGETSTMTOPTION 46
358 #define SQL_API_SQLGETTYPEINFO 47
359 #define SQL_API_SQLNUMRESULTCOLS 18
360 #define SQL_API_SQLPARAMDATA 48
361 #define SQL_API_SQLPREPARE 19
362 #define SQL_API_SQLPUTDATA 49
363 #define SQL_API_SQLROWCOUNT 20
364 #define SQL_API_SQLSETCONNECTOPTION 50
365 #define SQL_API_SQLSETCURSORNAME 21
366 #define SQL_API_SQLSETPARAM 22
367 #define SQL_API_SQLSETSTMTOPTION 51
368 #define SQL_API_SQLSPECIALCOLUMNS 52
369 #define SQL_API_SQLSTATISTICS 53
370 #define SQL_API_SQLTABLES 54
371 #define SQL_API_SQLTRANSACT 23
372 
373 /* ODBC 3.51 codes */
374 #define SQL_API_SQLALLOCHANDLE 1001
375 #define SQL_API_SQLBINDPARAM 1002
376 #define SQL_API_SQLCLOSECURSOR 1003
377 #define SQL_API_SQLCOLATTRIBUTE 6
378 #define SQL_API_SQLCOPYDESC 1004
379 #define SQL_API_SQLENDTRAN 1005
380 #define SQL_API_SQLFETCHSCROLL 1021
381 #define SQL_API_SQLFREEHANDLE 1006
382 #define SQL_API_SQLGETCONNECTATTR 1007
383 #define SQL_API_SQLGETDESCFIELD 1008
384 #define SQL_API_SQLGETDESCREC 1009
385 #define SQL_API_SQLGETDIAGFIELD 1010
386 #define SQL_API_SQLGETDIAGREC 1011
387 #define SQL_API_SQLGETENVATTR 1012
388 #define SQL_API_SQLGETSTMTATTR 1014
389 #define SQL_API_SQLSETCONNECTATTR 1016
390 #define SQL_API_SQLSETDESCFIELD 1017
391 #define SQL_API_SQLSETDESCREC 1018
392 #define SQL_API_SQLSETENVATTR 1019
393 #define SQL_API_SQLSETSTMTATTR 1020
394 
395 /* ----------------------------------------------------------------------------
396  information requested by SQLGetInfo()
397 */
398 #define SQL_MAX_DRIVER_CONNECTIONS 0
399 #define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS
400 #define SQL_MAX_CONCURRENT_ACTIVITIES 1
401 #define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIES
402 #define SQL_DATA_SOURCE_NAME 2
403 #define SQL_FETCH_DIRECTION 8
404 #define SQL_SERVER_NAME 13
405 #define SQL_SEARCH_PATTERN_ESCAPE 14
406 #define SQL_DBMS_NAME 17
407 #define SQL_DBMS_VER 18
408 #define SQL_ACCESSIBLE_TABLES 19
409 #define SQL_ACCESSIBLE_PROCEDURES 20
410 #define SQL_CURSOR_COMMIT_BEHAVIOR 23
411 #define SQL_DATA_SOURCE_READ_ONLY 25
412 #define SQL_DEFAULT_TXN_ISOLATION 26
413 #define SQL_IDENTIFIER_CASE 28
414 #define SQL_IDENTIFIER_QUOTE_CHAR 29
415 #define SQL_MAX_COLUMN_NAME_LEN 30
416 #define SQL_MAXIMUM_COLUMN_NAME_LENGTH SQL_MAX_COLUMN_NAME_LEN
417 #define SQL_MAX_CURSOR_NAME_LEN 31
418 #define SQL_MAXIMUM_CURSOR_NAME_LENGTH SQL_MAX_CURSOR_NAME_LEN
419 #define SQL_MAX_SCHEMA_NAME_LEN 32
420 #define SQL_MAXIMUM_SCHEMA_NAME_LENGTH SQL_MAX_SCHEMA_NAME_LEN
421 #define SQL_MAX_CATALOG_NAME_LEN 34
422 #define SQL_MAXIMUM_CATALOG_NAME_LENGTH SQL_MAX_CATALOG_NAME_LEN
423 #define SQL_MAX_TABLE_NAME_LEN 35
424 #define SQL_SCROLL_CONCURRENCY 43
425 #define SQL_TXN_CAPABLE 46
426 #define SQL_TRANSACTION_CAPABLE SQL_TXN_CAPABLE
427 #define SQL_USER_NAME 47
428 #define SQL_TXN_ISOLATION_OPTION 72
429 #define SQL_TRANSACTION_ISOLATION_OPTION SQL_TXN_ISOLATION_OPTION
430 #define SQL_INTEGRITY 73
431 #define SQL_GETDATA_EXTENSIONS 81
432 #define SQL_NULL_COLLATION 85
433 #define SQL_ALTER_TABLE 86
434 #define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
435 #define SQL_SPECIAL_CHARACTERS 94
436 #define SQL_MAX_COLUMNS_IN_GROUP_BY 97
437 #define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY SQL_MAX_COLUMNS_IN_GROUP_BY
438 #define SQL_MAX_COLUMNS_IN_INDEX 98
439 #define SQL_MAXIMUM_COLUMNS_IN_INDEX SQL_MAX_COLUMNS_IN_INDEX
440 #define SQL_MAX_COLUMNS_IN_ORDER_BY 99
441 #define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY SQL_MAX_COLUMNS_IN_ORDER_BY
442 #define SQL_MAX_COLUMNS_IN_SELECT 100
443 #define SQL_MAXIMUM_COLUMNS_IN_SELECT SQL_MAX_COLUMNS_IN_SELECT
444 #define SQL_MAX_COLUMNS_IN_TABLE 101
445 #define SQL_MAX_INDEX_SIZE 102
446 #define SQL_MAXIMUM_INDEX_SIZE SQL_MAX_INDEX_SIZE
447 #define SQL_MAX_ROW_SIZE 104
448 #define SQL_MAXIMUM_ROW_SIZE SQL_MAX_ROW_SIZE
449 #define SQL_MAX_STATEMENT_LEN 105
450 #define SQL_MAXIMUM_STATEMENT_LENGTH SQL_MAX_STATEMENT_LEN
451 #define SQL_MAX_TABLES_IN_SELECT 106
452 #define SQL_MAXIMUM_TABLES_IN_SELECT SQL_MAX_TABLES_IN_SELECT
453 #define SQL_MAX_USER_NAME_LEN 107
454 #define SQL_MAXIMUM_USER_NAME_LENGTH SQL_MAX_USER_NAME_LEN
455 #define SQL_OJ_CAPABILITIES 115
456 #define SQL_OUTER_JOIN_CAPABILITIES SQL_OJ_CAPABILITIES
457 
458 #define SQL_XOPEN_CLI_YEAR 10000
459 #define SQL_CURSOR_SENSITIVITY 10001
460 #define SQL_DESCRIBE_PARAMETER 10002
461 #define SQL_CATALOG_NAME 10003
462 #define SQL_COLLATION_SEQ 10004
463 #define SQL_MAX_IDENTIFIER_LEN 10005
464 #define SQL_MAXIMUM_IDENTIFIER_LENGTH SQL_MAX_IDENTIFIER_LEN
465 
466 /* ----------------------------------------------------------------------------
467  SQL_ALTER_TABLE bitmasks
468 */
469 #define SQL_AT_ADD_COLUMN 0x00000001L
470 #define SQL_AT_DROP_COLUMN 0x00000002L
471 #define SQL_AT_ADD_CONSTRAINT 0x00000008L
472 
473 /* ----------------------------------------------------------------------------
474  SQL_ASYNC_MODE values
475 */
476 #define SQL_AM_NONE 0
477 #define SQL_AM_CONNECTION 1
478 #define SQL_AM_STATEMENT 2
479 
480 /* ----------------------------------------------------------------------------
481  SQL_CURSOR_COMMIT_BEHAVIOR values
482 */
483 #define SQL_CB_DELETE 0
484 #define SQL_CB_CLOSE 1
485 #define SQL_CB_PRESERVE 2
486 
487 /* ----------------------------------------------------------------------------
488  SQL_FETCH_DIRECTION bitmasks
489 */
490 #define SQL_FD_FETCH_NEXT 0x00000001L
491 #define SQL_FD_FETCH_FIRST 0x00000002L
492 #define SQL_FD_FETCH_LAST 0x00000004L
493 #define SQL_FD_FETCH_PRIOR 0x00000008L
494 #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
495 #define SQL_FD_FETCH_RELATIVE 0x00000020L
496 
497 /* ----------------------------------------------------------------------------
498  SQL_GETDATA_EXTENSIONS bitmasks
499 */
500 #define SQL_GD_ANY_COLUMN 0x00000001L
501 #define SQL_GD_ANY_ORDER 0x00000002L
502 
503 /* ----------------------------------------------------------------------------
504  SQL_IDENTIFIER_CASE values
505 */
506 #define SQL_IC_UPPER 1
507 #define SQL_IC_LOWER 2
508 #define SQL_IC_SENSITIVE 3
509 #define SQL_IC_MIXED 4
510 
511 /* ----------------------------------------------------------------------------
512  SQL_OJ_CAPABILITIES bitmasks
513 */
514 #define SQL_OJ_LEFT 0x00000001L
515 #define SQL_OJ_RIGHT 0x00000002L
516 #define SQL_OJ_FULL 0x00000004L
517 #define SQL_OJ_NESTED 0x00000008L
518 #define SQL_OJ_NOT_ORDERED 0x00000010L
519 #define SQL_OJ_INNER 0x00000020L
520 #define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L
521 
522 /* ----------------------------------------------------------------------------
523  SQL_SCROLL_CONCURRENCY bitmasks
524 */
525 #define SQL_SCCO_READ_ONLY 0x00000001L
526 #define SQL_SCCO_LOCK 0x00000002L
527 #define SQL_SCCO_OPT_ROWVER 0x00000004L
528 #define SQL_SCCO_OPT_VALUES 0x00000008L
529 
530 /* ----------------------------------------------------------------------------
531  SQL_TXN_CAPABLE values
532 */
533 #define SQL_TC_NONE 0
534 #define SQL_TC_DML 1
535 #define SQL_TC_ALL 2
536 #define SQL_TC_DDL_COMMIT 3
537 #define SQL_TC_DDL_IGNORE 4
538 
539 /* ----------------------------------------------------------------------------
540  SQL_TXN_ISOLATION_OPTION bitmasks
541 */
542 #define SQL_TXN_READ_UNCOMMITTED 0x00000001L
543 #define SQL_TXN_READ_COMMITTED 0x00000002L
544 #define SQL_TXN_REPEATABLE_READ 0x00000004L
545 #define SQL_TXN_SERIALIZABLE 0x00000008L
546 
547 /* ----------------------------------------------------------------------------
548  SQL_NULL_COLLATION values
549 */
550 #define SQL_NC_HIGH 0
551 #define SQL_NC_LOW 1
552 
553 /* ----------------------------------------------------------------------------
554  ODBC function prototypes
555 */
556 #if defined(RDM_WINDOWS) && defined(RDM_ODBC_DRV)
557  #if defined(RDM_32BIT)
558  #pragma comment(linker, "/export:[email protected]")
559  #pragma comment(linker, "/export:[email protected]")
560  #pragma comment(linker, "/export:[email protected]")
561  #pragma comment(linker, "/export:[email protected]")
562  #pragma comment(linker, "/export:[email protected]")
563  #pragma comment(linker, "/export:[email protected]")
564  #pragma comment(linker, "/export:[email protected]")
565  #pragma comment(linker, "/export:[email protected]")
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:S[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  #else
603  #pragma comment(linker, "/export:SQLAllocHandle")
604  #pragma comment(linker, "/export:SQLBindCol")
605  #pragma comment(linker, "/export:SQLBindParam")
606  #pragma comment(linker, "/export:SQLCancel")
607  #pragma comment(linker, "/export:SQLCloseCursor")
608  #pragma comment(linker, "/export:SQLColAttribute")
609  #pragma comment(linker, "/export:SQLColumns")
610  #pragma comment(linker, "/export:SQLConnect")
611  #pragma comment(linker, "/export:SQLCopyDesc")
612  #pragma comment(linker, "/export:SQLDescribeCol")
613  #pragma comment(linker, "/export:SQLDisconnect")
614  #pragma comment(linker, "/export:SQLEndTran")
615  #pragma comment(linker, "/export:SQLExecDirect")
616  #pragma comment(linker, "/export:SQLExecute")
617  #pragma comment(linker, "/export:SQLFetch")
618  #pragma comment(linker, "/export:SQLFetchScroll")
619  #pragma comment(linker, "/export:SQLFreeHandle")
620  #pragma comment(linker, "/export:SQLFreeStmt")
621  #pragma comment(linker, "/export:SQLGetConnectAttr")
622  #pragma comment(linker, "/export:SQLGetCursorName")
623  #pragma comment(linker, "/export:SQLGetData")
624  #pragma comment(linker, "/export:SQLGetDescField")
625  #pragma comment(linker, "/export:SQLGetDescRec")
626  #pragma comment(linker, "/export:SQLGetDiagField")
627  #pragma comment(linker, "/export:SQLGetDiagRec")
628  #pragma comment(linker, "/export:SQLGetEnvAttr")
629  #pragma comment(linker, "/export:SQLGetFunctions")
630  #pragma comment(linker, "/export:SQLGetInfo")
631  #pragma comment(linker, "/export:SQLGetStmtAttr")
632  #pragma comment(linker, "/export:SQLGetTypeInfo")
633  #pragma comment(linker, "/export:SQLNumResultCols")
634  #pragma comment(linker, "/export:SQLParamData")
635  #pragma comment(linker, "/export:SQLPrepare")
636  #pragma comment(linker, "/export:SQLPutData")
637  #pragma comment(linker, "/export:SQLRowCount")
638  #pragma comment(linker, "/export:SQLSetConnectAttr")
639  #pragma comment(linker, "/export:SQLSetCursorName")
640  #pragma comment(linker, "/export:SQLSetDescField")
641  #pragma comment(linker, "/export:SQLSetDescRec")
642  #pragma comment(linker, "/export:SQLSetEnvAttr")
643  #pragma comment(linker, "/export:SQLSetStmtAttr")
644  #pragma comment(linker, "/export:SQLSpecialColumns")
645  #pragma comment(linker, "/export:SQLStatistics")
646  #pragma comment(linker, "/export:SQLTables")
647  #endif
648 #endif
649 
657  SQLSMALLINT HandleType,
658  SQLHANDLE InputHandle,
659  SQLHANDLE *OutputHandle);
660 
668  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
669  SQLUSMALLINT ColumnNumber,
670  SQLSMALLINT TargetType,
671  SQLPOINTER TargetValue,
672  SQLLEN BufferLength,
673  SQLLEN *StrLen_or_Ind);
674 
676  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
677  SQLUSMALLINT ParameterNumber,
678  SQLSMALLINT ValueType,
679  SQLSMALLINT ParameterType,
680  SQLULEN LengthPrecision,
681  SQLSMALLINT ParameterScale,
682  SQLPOINTER ParameterValue,
683  SQLLEN *StrLen_or_Ind);
684 
692  SQLHSTMT StatementHandle); /* \param[in] StatementHandle ODBC statement handle */
693 
694 
702  SQLHSTMT StatementHandle); /* \param[in] StatementHandle ODBC statement handle */
703 
711  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
712  SQLUSMALLINT ColumnNumber,
713  SQLUSMALLINT FieldIdentifier,
714  SQLPOINTER CharacterAttributePtr,
715  SQLSMALLINT BufferLength,
716  SQLSMALLINT *StringLength,
717  SQLLEN *NumericAttributePtr);
718 
726  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
727  SQLCHAR *CatalogName,
728  SQLSMALLINT NameLength1,
729  SQLCHAR *SchemaName,
730  SQLSMALLINT NameLength2,
731  SQLCHAR *TableName,
732  SQLSMALLINT NameLength3,
733  SQLCHAR *ColumnName,
734  SQLSMALLINT NameLength4);
735 
743  SQLHDBC ConnectionHandle,
744  const SQLCHAR *ServerName,
745  SQLSMALLINT NameLength1,
746  const SQLCHAR *UserName,
747  SQLSMALLINT NameLength2,
748  const SQLCHAR *Authentication,
749  SQLSMALLINT NameLength3);
750 
751 
759  SQLHDESC SourceDescHandle,
760  SQLHDESC TargetDescHandle);
761 
769  SQLHENV EnvironmentHandle,
770  SQLUSMALLINT Direction,
771  SQLCHAR *ServerName,
772  SQLSMALLINT BufferLength1,
773  SQLSMALLINT *NameLength1,
774  SQLCHAR *Description,
775  SQLSMALLINT BufferLength2,
776  SQLSMALLINT *NameLength2);
777 
778 
786  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
787  SQLUSMALLINT ColumnNumber,
788  SQLCHAR *ColumnName,
789  SQLSMALLINT BufferLength,
790  SQLSMALLINT *NameLengthPtr,
791  SQLSMALLINT *DataTypePtr,
792  SQLULEN *ColumnSizePtr,
793  SQLSMALLINT *DecimalDigitsPtr,
794  SQLSMALLINT *NullablePtr);
795 
803  SQLHDBC ConnectionHandle);
804 
812  SQLSMALLINT HandleType,
813  SQLHANDLE Handle,
814  SQLSMALLINT CompletionType);
815 
823  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
824  const SQLCHAR *StatementText,
825  SQLINTEGER TextLength);
826 
827 
835  SQLHSTMT StatementHandle); /* \param[in] StatementHandle ODBC statement handle */
836 
844  SQLHSTMT StatementHandle); /* \param[in] StatementHandle ODBC statement handle */
845 
853  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
854  SQLSMALLINT FetchOrientation, /* \param[in] FetchOrientation RDM 14 only supports SQL_FETCH_NEXT */
855  SQLLEN FetchOffset); /* \param[in] FetchOffset RDM 14 only supports 0 */
856 
864  SQLSMALLINT HandleType,
865  SQLHANDLE Handle);
866 
874  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
875  SQLUSMALLINT Option);
876 
884  SQLHDBC ConnectionHandle,
885  SQLINTEGER Attribute,
886  SQLPOINTER Value,
887  SQLINTEGER BufferLength,
888  SQLINTEGER *StringLength);
889 
899  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
900  SQLCHAR *CursorName,
901  SQLSMALLINT BufferLength,
902  SQLSMALLINT *NameLength);
903 
911  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
912  SQLUSMALLINT ColumnNumber,
913  SQLSMALLINT TargetType,
914  SQLPOINTER TargetValue,
915  SQLLEN BufferLength,
916  SQLLEN *StrLen_or_Ind);
917 
928  SQLHDESC DescriptorHandle,
929  SQLSMALLINT RecNumber,
930  SQLSMALLINT FieldIdentifier,
931  SQLPOINTER Value,
932  SQLINTEGER BufferLength,
933  SQLINTEGER *StringLength);
934 
945  SQLHDESC DescriptorHandle,
946  SQLSMALLINT RecNumber,
947  SQLCHAR *Name,
948  SQLSMALLINT BufferLength,
949  SQLSMALLINT *StringLengthPtr,
950  SQLSMALLINT *TypePtr,
951  SQLSMALLINT *SubTypePtr,
952  SQLLEN *LengthPtr,
953  SQLSMALLINT *PrecisionPtr,
954  SQLSMALLINT *ScalePtr,
955  SQLSMALLINT *NullablePtr);
956 
964  SQLSMALLINT HandleType,
965  SQLHANDLE Handle,
966  SQLSMALLINT RecNumber,
967  SQLSMALLINT DiagIdentifier,
968  SQLPOINTER DiagInfo,
969  SQLSMALLINT BufferLength,
970  SQLSMALLINT *StringLength);
971 
979  SQLSMALLINT HandleType,
980  SQLHANDLE Handle,
981  SQLSMALLINT RecNumber,
982  SQLCHAR *Sqlstate,
983  SQLINTEGER *NativeError,
984  SQLCHAR *MessageText,
985  SQLSMALLINT BufferLength,
986  SQLSMALLINT *TextLength);
987 
997  SQLHENV EnvironmentHandle,
998  SQLINTEGER Attribute,
999  SQLPOINTER Value,
1000  SQLINTEGER BufferLength,
1001  SQLINTEGER *StringLength);
1002 
1010  SQLHDBC ConnectionHandle,
1011  SQLUSMALLINT FunctionId,
1012  SQLUSMALLINT *Supported);
1013 
1021  SQLHDBC ConnectionHandle,
1022  SQLUSMALLINT InfoType,
1023  SQLPOINTER InfoValue,
1024  SQLSMALLINT BufferLength,
1025  SQLSMALLINT *StringLength);
1026 
1036  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1037  SQLINTEGER Attribute,
1038  SQLPOINTER Value,
1039  SQLINTEGER BufferLength,
1040  SQLINTEGER *StringLength);
1041 
1049  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1050  SQLSMALLINT DataType);
1051 
1061  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1062  SQLSMALLINT *ColumnCount);
1063 
1071  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1072  SQLPOINTER *Value);
1073 
1081  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1082  const SQLCHAR *StatementText,
1083  SQLINTEGER TextLength);
1084 
1092  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1093  SQLPOINTER Data,
1094  SQLLEN StrLen_or_Ind);
1095 
1103  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1104  SQLLEN *RowCount);
1105 
1113  SQLHDBC ConnectionHandle,
1114  SQLINTEGER Attribute,
1115  SQLPOINTER Value,
1116  SQLINTEGER StringLength);
1117 
1127  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1128  const SQLCHAR *CursorName,
1129  SQLSMALLINT NameLength);
1130 
1141  SQLHDESC DescriptorHandle,
1142  SQLSMALLINT RecNumber,
1143  SQLSMALLINT FieldIdentifier,
1144  SQLPOINTER Value,
1145  SQLINTEGER BufferLength);
1146 
1157  SQLHDESC DescriptorHandle,
1158  SQLSMALLINT RecNumber,
1159  SQLSMALLINT Type,
1160  SQLSMALLINT SubType,
1161  SQLLEN Length,
1162  SQLSMALLINT Precision,
1163  SQLSMALLINT Scale,
1164  SQLPOINTER Data,
1165  SQLLEN *StringLength,
1166  SQLLEN *Indicator);
1167 
1177  SQLHENV EnvironmentHandle,
1178  SQLINTEGER Attribute,
1179  SQLPOINTER Value,
1180  SQLINTEGER StringLength);
1181 
1191  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1192  SQLINTEGER Attribute,
1193  SQLPOINTER Value,
1194  SQLINTEGER StringLength);
1195 
1203  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1204  SQLUSMALLINT IdentifierType,
1205  SQLCHAR *CatalogName,
1206  SQLSMALLINT NameLength1,
1207  SQLCHAR *SchemaName,
1208  SQLSMALLINT NameLength2,
1209  SQLCHAR *TableName,
1210  SQLSMALLINT NameLength3,
1211  SQLUSMALLINT Scope,
1212  SQLUSMALLINT Nullable);
1213 
1221  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1222  SQLCHAR *CatalogName,
1223  SQLSMALLINT NameLength1,
1224  SQLCHAR *SchemaName,
1225  SQLSMALLINT NameLength2,
1226  SQLCHAR *TableName,
1227  SQLSMALLINT NameLength3,
1228  SQLUSMALLINT Unique,
1229  SQLUSMALLINT Reserved);
1230 
1238  SQLHSTMT StatementHandle, /* \param[in] StatementHandle ODBC statement handle */
1239  SQLCHAR *CatalogName,
1240  SQLSMALLINT NameLength1,
1241  SQLCHAR *SchemaName,
1242  SQLSMALLINT NameLength2,
1243  SQLCHAR *TableName,
1244  SQLSMALLINT NameLength3,
1245  SQLCHAR *TableType,
1246  SQLSMALLINT NameLength4);
1247 
1248 
1249 #endif /* SQL_H_INCLUDED_ */
1250 
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.
const void * SQLHDBC
Definition: sqltypes.h:84
SQLRETURN SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)
Set an attribute of an ODBC statement.
SQLRETURN SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLINTEGER *StrLen_or_Ind)
int32_t SQLINTEGER
Definition: sqltypes.h:50
SQLRETURN SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option)
Stops a statement processing.
const void * SQLHDESC
Definition: sqltypes.h:86
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.
SQLRETURN SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount)
Return the number of columns in a result set.
SQLRETURN SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType)
Return the information about the ODBC data types.
SQLRETURN SQLCancel(SQLHSTMT StatementHandle)
Cancel a statement processing.
Header for the Microsoft ODBC Level-1 types.
SQLRETURN SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength)
Return the information about the ODBC driver and data source.
SQLRETURN SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType)
Commit or rollback a transaction.
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.
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.
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.
SQLRETURN SQLCopyDesc(SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle)
Copy one descriptor to another.
SQLRETURN SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
Allocate an ODBC handle.
SQLRETURN SQLCloseCursor(SQLHSTMT StatementHandle)
Close a cursor.
SQLRETURN SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value)
Retrieve parameter data for the statement waiting to be executed.
SQLRETURN SQLGetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
Obtain the information about a single descriptor header/record field.
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.
SQLRETURN SQLSetCursorName(SQLHSTMT StatementHandle, const SQLCHAR *CursorName, SQLSMALLINT NameLength)
Set the name of the current open cursor.
SQLRETURN SQLFetch(SQLHSTMT StatementHandle)
Fetch the next set of rows from the result set.
SQLRETURN SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLINTEGER StrLen_or_Ind)
Send parameterised data for insert/update.
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.
SQLRETURN SQLSetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength)
Set the value of a single descriptor record field.
SQLRETURN SQLColAttribute(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLINTEGER *NumericAttributePtr)
Retrieve attributes of a column.
int16_t SQLRETURN
Definition: sqltypes.h:60
const void * SQLHSTMT
Definition: sqltypes.h:85
SQLRETURN SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)
Set an attribute of the ODBC connection.
uint8_t SQLCHAR
Definition: sqltypes.h:47
const void * SQLHANDLE
Definition: sqltypes.h:82
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.
SQLRETURN SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)
Obtain an attribute of an ODBC environment.
SQLRETURN SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength)
Obtain the name of the current open cursor.
void * SQLPOINTER
Definition: sqltypes.h:59
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.
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.
uint16_t SQLUSMALLINT
Definition: sqltypes.h:49
#define SQLULEN
Definition: sqltypes.h:76
SQLRETURN SQLRowCount(SQLHSTMT StatementHandle, SQLINTEGER *RowCount)
Return the number of rows affected by INSERT/UPDATE/DELETE.
SQLRETURN SQLDisconnect(SQLHDBC ConnectionHandle)
Disconnect from the database source.
const void * SQLHENV
Definition: sqltypes.h:83
SQLRETURN SQLExecDirect(SQLHSTMT StatementHandle, const SQLCHAR *StatementText, SQLINTEGER TextLength)
Prepare and execute an SQL statement.
SQLRETURN SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset)
Fetch the next set of rows from the result set.
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.
SQLRETURN SQLExecute(SQLHSTMT StatementHandle)
Execute a prepared SQL statement.
SQLRETURN SQLDataSources(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLCHAR *ServerName, SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2)
Browse data sources.
SQLRETURN SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported)
Return whether or not a specific ODBC function is supported.
SQLRETURN SQLPrepare(SQLHSTMT StatementHandle, const SQLCHAR *StatementText, SQLINTEGER TextLength)
Prepare an SQL statement.
#define RDBC_EXPORT
Definition: sqltypes.h:231
SQLRETURN SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
Free an ODBC handle.
SQLRETURN SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
Obtain an attribute of an ODBC environment.
SQLRETURN SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
Obtain an attribute of the ODBC connection.
SQLRETURN SQLBindCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_Ind)
Bind an application variable to the column.
#define SQLLEN
Definition: sqltypes.h:75
#define SQL_API
Definition: sqltypes.h:38
SQLRETURN SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
Obtain an attribute of an ODBC statement.
int16_t SQLSMALLINT
Definition: sqltypes.h:48