Debian Codegraph @

mingw-w64-headers/include/sql.h

raw
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6 #ifndef __SQL
7 #define __SQL
8
9 #ifndef ODBCVER
10 #define ODBCVER 0x0380
11 #endif
12
13 #include <sqltypes.h>
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 #define SQL_NULL_DATA (-1)
20 #define SQL_DATA_AT_EXEC (-2)
21
22 #define SQL_SUCCESS 0
23 #define SQL_SUCCESS_WITH_INFO 1
24 #if (ODBCVER >= 0x0300)
25 #define SQL_NO_DATA 100
26 #endif
27
28 #if (ODBCVER >= 0x0380)
29 #define SQL_PARAM_DATA_AVAILABLE 101
30 #endif
31
32 #define SQL_ERROR (-1)
33 #define SQL_INVALID_HANDLE (-2)
34
35 #define SQL_STILL_EXECUTING 2
36 #define SQL_NEED_DATA 99
37
38 #define SQL_SUCCEEDED(rc) (((rc)&(~1))==0)
39
40 #define SQL_NTS (-3)
41 #define SQL_NTSL (__MSABI_LONG(-3))
42
43 #define SQL_MAX_MESSAGE_LENGTH 512
44
45 #if (ODBCVER >= 0x0300)
46 #define SQL_DATE_LEN 10
47 #define SQL_TIME_LEN 8
48 #define SQL_TIMESTAMP_LEN 19
49 #endif
50
51 #if (ODBCVER >= 0x0300)
52 #define SQL_HANDLE_ENV 1
53 #define SQL_HANDLE_DBC 2
54 #define SQL_HANDLE_STMT 3
55 #define SQL_HANDLE_DESC 4
56 #endif
57
58 #if (ODBCVER >= 0x0300)
59 #define SQL_ATTR_OUTPUT_NTS 10001
60 #endif
61
62 #if (ODBCVER >= 0x0300)
63 #define SQL_ATTR_AUTO_IPD 10001
64 #define SQL_ATTR_METADATA_ID 10014
65 #endif
66
67 #if (ODBCVER >= 0x0300)
68 #define SQL_ATTR_APP_ROW_DESC 10010
69 #define SQL_ATTR_APP_PARAM_DESC 10011
70 #define SQL_ATTR_IMP_ROW_DESC 10012
71 #define SQL_ATTR_IMP_PARAM_DESC 10013
72 #define SQL_ATTR_CURSOR_SCROLLABLE (-1)
73 #define SQL_ATTR_CURSOR_SENSITIVITY (-2)
74 #endif
75
76 #if (ODBCVER >= 0x0300)
77 #define SQL_NONSCROLLABLE 0
78 #define SQL_SCROLLABLE 1
79 #endif
80
81 #if (ODBCVER >= 0x0300)
82 #define SQL_DESC_COUNT 1001
83 #define SQL_DESC_TYPE 1002
84 #define SQL_DESC_LENGTH 1003
85 #define SQL_DESC_OCTET_LENGTH_PTR 1004
86 #define SQL_DESC_PRECISION 1005
87 #define SQL_DESC_SCALE 1006
88 #define SQL_DESC_DATETIME_INTERVAL_CODE 1007
89 #define SQL_DESC_NULLABLE 1008
90 #define SQL_DESC_INDICATOR_PTR 1009
91 #define SQL_DESC_DATA_PTR 1010
92 #define SQL_DESC_NAME 1011
93 #define SQL_DESC_UNNAMED 1012
94 #define SQL_DESC_OCTET_LENGTH 1013
95 #define SQL_DESC_ALLOC_TYPE 1099
96 #endif
97
98 #if (ODBCVER >= 0x0300)
99 #define SQL_DIAG_RETURNCODE 1
100 #define SQL_DIAG_NUMBER 2
101 #define SQL_DIAG_ROW_COUNT 3
102 #define SQL_DIAG_SQLSTATE 4
103 #define SQL_DIAG_NATIVE 5
104 #define SQL_DIAG_MESSAGE_TEXT 6
105 #define SQL_DIAG_DYNAMIC_FUNCTION 7
106 #define SQL_DIAG_CLASS_ORIGIN 8
107 #define SQL_DIAG_SUBCLASS_ORIGIN 9
108 #define SQL_DIAG_CONNECTION_NAME 10
109 #define SQL_DIAG_SERVER_NAME 11
110 #define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12
111 #endif
112
113 #if (ODBCVER >= 0x0300)
114 #define SQL_DIAG_ALTER_DOMAIN 3
115 #define SQL_DIAG_ALTER_TABLE 4
116 #define SQL_DIAG_CALL 7
117 #define SQL_DIAG_CREATE_ASSERTION 6
118 #define SQL_DIAG_CREATE_CHARACTER_SET 8
119 #define SQL_DIAG_CREATE_COLLATION 10
120 #define SQL_DIAG_CREATE_DOMAIN 23
121 #define SQL_DIAG_CREATE_INDEX (-1)
122 #define SQL_DIAG_CREATE_SCHEMA 64
123 #define SQL_DIAG_CREATE_TABLE 77
124 #define SQL_DIAG_CREATE_TRANSLATION 79
125 #define SQL_DIAG_CREATE_VIEW 84
126 #define SQL_DIAG_DELETE_WHERE 19
127 #define SQL_DIAG_DROP_ASSERTION 24
128 #define SQL_DIAG_DROP_CHARACTER_SET 25
129 #define SQL_DIAG_DROP_COLLATION 26
130 #define SQL_DIAG_DROP_DOMAIN 27
131 #define SQL_DIAG_DROP_INDEX (-2)
132 #define SQL_DIAG_DROP_SCHEMA 31
133 #define SQL_DIAG_DROP_TABLE 32
134 #define SQL_DIAG_DROP_TRANSLATION 33
135 #define SQL_DIAG_DROP_VIEW 36
136 #define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38
137 #define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81
138 #define SQL_DIAG_GRANT 48
139 #define SQL_DIAG_INSERT 50
140 #define SQL_DIAG_REVOKE 59
141 #define SQL_DIAG_SELECT_CURSOR 85
142 #define SQL_DIAG_UNKNOWN_STATEMENT 0
143 #define SQL_DIAG_UPDATE_WHERE 82
144 #endif
145
146 #define SQL_UNKNOWN_TYPE 0
147 #define SQL_CHAR 1
148 #define SQL_NUMERIC 2
149 #define SQL_DECIMAL 3
150 #define SQL_INTEGER 4
151 #define SQL_SMALLINT 5
152 #define SQL_FLOAT 6
153 #define SQL_REAL 7
154 #define SQL_DOUBLE 8
155 #if (ODBCVER >= 0x0300)
156 #define SQL_DATETIME 9
157 #endif
158 #define SQL_VARCHAR 12
159
160 #if (ODBCVER >= 0x0300)
161 #define SQL_TYPE_DATE 91
162 #define SQL_TYPE_TIME 92
163 #define SQL_TYPE_TIMESTAMP 93
164 #endif
165
166 #if (ODBCVER >= 0x0300)
167 #define SQL_UNSPECIFIED 0
168 #define SQL_INSENSITIVE 1
169 #define SQL_SENSITIVE 2
170 #endif
171
172 #define SQL_ALL_TYPES 0
173
174 #if (ODBCVER >= 0x0300)
175 #define SQL_DEFAULT 99
176 #endif
177
178 #if (ODBCVER >= 0x0300)
179 #define SQL_ARD_TYPE (-99)
180 #endif
181
182 #if (ODBCVER >= 0x0380)
183 #define SQL_APD_TYPE (-100)
184 #endif
185
186 #if (ODBCVER >= 0x0300)
187 #define SQL_CODE_DATE 1
188 #define SQL_CODE_TIME 2
189 #define SQL_CODE_TIMESTAMP 3
190 #endif
191
192 #if (ODBCVER >= 0x0300)
193 #define SQL_FALSE 0
194 #define SQL_TRUE 1
195 #endif
196
197 #define SQL_NO_NULLS 0
198 #define SQL_NULLABLE 1
199
200 #define SQL_NULLABLE_UNKNOWN 2
201
202 #if (ODBCVER >= 0x0300)
203 #define SQL_PRED_NONE 0
204 #define SQL_PRED_CHAR 1
205 #define SQL_PRED_BASIC 2
206 #endif
207
208 #if (ODBCVER >= 0x0300)
209 #define SQL_NAMED 0
210 #define SQL_UNNAMED 1
211 #endif
212
213 #if (ODBCVER >= 0x0300)
214 #define SQL_DESC_ALLOC_AUTO 1
215 #define SQL_DESC_ALLOC_USER 2
216 #endif
217
218 #define SQL_CLOSE 0
219 #define SQL_DROP 1
220 #define SQL_UNBIND 2
221 #define SQL_RESET_PARAMS 3
222
223 #define SQL_FETCH_NEXT 1
224 #define SQL_FETCH_FIRST 2
225
226 #define SQL_FETCH_LAST 3
227 #define SQL_FETCH_PRIOR 4
228 #define SQL_FETCH_ABSOLUTE 5
229 #define SQL_FETCH_RELATIVE 6
230
231 #define SQL_COMMIT 0
232 #define SQL_ROLLBACK 1
233
234 #define SQL_NULL_HENV 0
235 #define SQL_NULL_HDBC 0
236 #define SQL_NULL_HSTMT 0
237 #if (ODBCVER >= 0x0300)
238 #define SQL_NULL_HDESC 0
239 #endif
240
241 #if (ODBCVER >= 0x0300)
242 #define SQL_NULL_HANDLE __MSABI_LONG(0)
243 #endif
244
245 #define SQL_SCOPE_CURROW 0
246 #define SQL_SCOPE_TRANSACTION 1
247 #define SQL_SCOPE_SESSION 2
248
249 #define SQL_PC_UNKNOWN 0
250 #if (ODBCVER >= 0x0300)
251 #define SQL_PC_NON_PSEUDO 1
252 #endif
253 #define SQL_PC_PSEUDO 2
254
255 #if (ODBCVER >= 0x0300)
256 #define SQL_ROW_IDENTIFIER 1
257 #endif
258
259 #define SQL_INDEX_UNIQUE 0
260 #define SQL_INDEX_ALL 1
261
262 #define SQL_INDEX_CLUSTERED 1
263 #define SQL_INDEX_HASHED 2
264 #define SQL_INDEX_OTHER 3
265
266 #define SQL_API_SQLALLOCCONNECT 1
267 #define SQL_API_SQLALLOCENV 2
268 #if (ODBCVER >= 0x0300)
269 #define SQL_API_SQLALLOCHANDLE 1001
270 #endif
271 #define SQL_API_SQLALLOCSTMT 3
272 #define SQL_API_SQLBINDCOL 4
273 #if (ODBCVER >= 0x0300)
274 #define SQL_API_SQLBINDPARAM 1002
275 #endif
276 #define SQL_API_SQLCANCEL 5
277 #if (ODBCVER >= 0x0300)
278 #define SQL_API_SQLCLOSECURSOR 1003
279 #define SQL_API_SQLCOLATTRIBUTE 6
280 #endif
281 #define SQL_API_SQLCOLUMNS 40
282 #define SQL_API_SQLCONNECT 7
283 #if (ODBCVER >= 0x0300)
284 #define SQL_API_SQLCOPYDESC 1004
285 #endif
286 #define SQL_API_SQLDATASOURCES 57
287 #define SQL_API_SQLDESCRIBECOL 8
288 #define SQL_API_SQLDISCONNECT 9
289 #if (ODBCVER >= 0x0300)
290 #define SQL_API_SQLENDTRAN 1005
291 #endif
292 #define SQL_API_SQLERROR 10
293 #define SQL_API_SQLEXECDIRECT 11
294 #define SQL_API_SQLEXECUTE 12
295 #define SQL_API_SQLFETCH 13
296 #if (ODBCVER >= 0x0300)
297 #define SQL_API_SQLFETCHSCROLL 1021
298 #endif
299 #define SQL_API_SQLFREECONNECT 14
300 #define SQL_API_SQLFREEENV 15
301 #if (ODBCVER >= 0x0300)
302 #define SQL_API_SQLFREEHANDLE 1006
303 #endif
304 #define SQL_API_SQLFREESTMT 16
305 #if (ODBCVER >= 0x0300)
306 #define SQL_API_SQLGETCONNECTATTR 1007
307 #endif
308 #define SQL_API_SQLGETCONNECTOPTION 42
309 #define SQL_API_SQLGETCURSORNAME 17
310 #define SQL_API_SQLGETDATA 43
311 #if (ODBCVER >= 0x0300)
312 #define SQL_API_SQLGETDESCFIELD 1008
313 #define SQL_API_SQLGETDESCREC 1009
314 #define SQL_API_SQLGETDIAGFIELD 1010
315 #define SQL_API_SQLGETDIAGREC 1011
316 #define SQL_API_SQLGETENVATTR 1012
317 #endif
318 #define SQL_API_SQLGETFUNCTIONS 44
319 #define SQL_API_SQLGETINFO 45
320 #if (ODBCVER >= 0x0300)
321 #define SQL_API_SQLGETSTMTATTR 1014
322 #endif
323 #define SQL_API_SQLGETSTMTOPTION 46
324 #define SQL_API_SQLGETTYPEINFO 47
325 #define SQL_API_SQLNUMRESULTCOLS 18
326 #define SQL_API_SQLPARAMDATA 48
327 #define SQL_API_SQLPREPARE 19
328 #define SQL_API_SQLPUTDATA 49
329 #define SQL_API_SQLROWCOUNT 20
330 #if (ODBCVER >= 0x0300)
331 #define SQL_API_SQLSETCONNECTATTR 1016
332 #endif
333 #define SQL_API_SQLSETCONNECTOPTION 50
334 #define SQL_API_SQLSETCURSORNAME 21
335 #if (ODBCVER >= 0x0300)
336 #define SQL_API_SQLSETDESCFIELD 1017
337 #define SQL_API_SQLSETDESCREC 1018
338 #define SQL_API_SQLSETENVATTR 1019
339 #endif
340 #define SQL_API_SQLSETPARAM 22
341 #if (ODBCVER >= 0x0300)
342 #define SQL_API_SQLSETSTMTATTR 1020
343 #endif
344 #define SQL_API_SQLSETSTMTOPTION 51
345 #define SQL_API_SQLSPECIALCOLUMNS 52
346 #define SQL_API_SQLSTATISTICS 53
347 #define SQL_API_SQLTABLES 54
348 #define SQL_API_SQLTRANSACT 23
349 #if (ODBCVER >= 0x0380)
350 #define SQL_API_SQLCANCELHANDLE 1550
351 #define SQL_API_SQLCOMPLETEASYNC 1551
352 #endif
353
354 #if (ODBCVER >= 0x0300)
355 #define SQL_MAX_DRIVER_CONNECTIONS 0
356 #define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS
357 #define SQL_MAX_CONCURRENT_ACTIVITIES 1
358 #define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIES
359 #endif
360 #define SQL_DATA_SOURCE_NAME 2
361 #define SQL_FETCH_DIRECTION 8
362 #define SQL_SERVER_NAME 13
363 #define SQL_SEARCH_PATTERN_ESCAPE 14
364 #define SQL_DBMS_NAME 17
365 #define SQL_DBMS_VER 18
366 #define SQL_ACCESSIBLE_TABLES 19
367 #define SQL_ACCESSIBLE_PROCEDURES 20
368 #define SQL_CURSOR_COMMIT_BEHAVIOR 23
369 #define SQL_DATA_SOURCE_READ_ONLY 25
370 #define SQL_DEFAULT_TXN_ISOLATION 26
371 #define SQL_IDENTIFIER_CASE 28
372 #define SQL_IDENTIFIER_QUOTE_CHAR 29
373 #define SQL_MAX_COLUMN_NAME_LEN 30
374 #define SQL_MAXIMUM_COLUMN_NAME_LENGTH SQL_MAX_COLUMN_NAME_LEN
375 #define SQL_MAX_CURSOR_NAME_LEN 31
376 #define SQL_MAXIMUM_CURSOR_NAME_LENGTH SQL_MAX_CURSOR_NAME_LEN
377 #define SQL_MAX_SCHEMA_NAME_LEN 32
378 #define SQL_MAXIMUM_SCHEMA_NAME_LENGTH SQL_MAX_SCHEMA_NAME_LEN
379 #define SQL_MAX_CATALOG_NAME_LEN 34
380 #define SQL_MAXIMUM_CATALOG_NAME_LENGTH SQL_MAX_CATALOG_NAME_LEN
381 #define SQL_MAX_TABLE_NAME_LEN 35
382 #define SQL_SCROLL_CONCURRENCY 43
383 #define SQL_TXN_CAPABLE 46
384 #define SQL_TRANSACTION_CAPABLE SQL_TXN_CAPABLE
385 #define SQL_USER_NAME 47
386 #define SQL_TXN_ISOLATION_OPTION 72
387 #define SQL_TRANSACTION_ISOLATION_OPTION SQL_TXN_ISOLATION_OPTION
388 #define SQL_INTEGRITY 73
389 #define SQL_GETDATA_EXTENSIONS 81
390 #define SQL_NULL_COLLATION 85
391 #define SQL_ALTER_TABLE 86
392 #define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
393 #define SQL_SPECIAL_CHARACTERS 94
394 #define SQL_MAX_COLUMNS_IN_GROUP_BY 97
395 #define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY SQL_MAX_COLUMNS_IN_GROUP_BY
396 #define SQL_MAX_COLUMNS_IN_INDEX 98
397 #define SQL_MAXIMUM_COLUMNS_IN_INDEX SQL_MAX_COLUMNS_IN_INDEX
398 #define SQL_MAX_COLUMNS_IN_ORDER_BY 99
399 #define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY SQL_MAX_COLUMNS_IN_ORDER_BY
400 #define SQL_MAX_COLUMNS_IN_SELECT 100
401 #define SQL_MAXIMUM_COLUMNS_IN_SELECT SQL_MAX_COLUMNS_IN_SELECT
402 #define SQL_MAX_COLUMNS_IN_TABLE 101
403 #define SQL_MAX_INDEX_SIZE 102
404 #define SQL_MAXIMUM_INDEX_SIZE SQL_MAX_INDEX_SIZE
405 #define SQL_MAX_ROW_SIZE 104
406 #define SQL_MAXIMUM_ROW_SIZE SQL_MAX_ROW_SIZE
407 #define SQL_MAX_STATEMENT_LEN 105
408 #define SQL_MAXIMUM_STATEMENT_LENGTH SQL_MAX_STATEMENT_LEN
409 #define SQL_MAX_TABLES_IN_SELECT 106
410 #define SQL_MAXIMUM_TABLES_IN_SELECT SQL_MAX_TABLES_IN_SELECT
411 #define SQL_MAX_USER_NAME_LEN 107
412 #define SQL_MAXIMUM_USER_NAME_LENGTH SQL_MAX_USER_NAME_LEN
413 #if (ODBCVER >= 0x0300)
414 #define SQL_OJ_CAPABILITIES 115
415 #define SQL_OUTER_JOIN_CAPABILITIES SQL_OJ_CAPABILITIES
416 #endif
417
418 #if (ODBCVER >= 0x0300)
419 #define SQL_XOPEN_CLI_YEAR 10000
420 #define SQL_CURSOR_SENSITIVITY 10001
421 #define SQL_DESCRIBE_PARAMETER 10002
422 #define SQL_CATALOG_NAME 10003
423 #define SQL_COLLATION_SEQ 10004
424 #define SQL_MAX_IDENTIFIER_LEN 10005
425 #define SQL_MAXIMUM_IDENTIFIER_LENGTH SQL_MAX_IDENTIFIER_LEN
426 #endif
427
428 #if (ODBCVER >= 0x0200)
429 #define SQL_AT_ADD_COLUMN __MSABI_LONG(0x00000001)
430 #define SQL_AT_DROP_COLUMN __MSABI_LONG(0x00000002)
431 #endif
432
433 #if (ODBCVER >= 0x0300)
434 #define SQL_AT_ADD_CONSTRAINT __MSABI_LONG(0x00000008)
435 #endif
436
437 #if (ODBCVER >= 0x0300)
438 #define SQL_AM_NONE 0
439 #define SQL_AM_CONNECTION 1
440 #define SQL_AM_STATEMENT 2
441 #endif
442
443 #define SQL_CB_DELETE 0
444 #define SQL_CB_CLOSE 1
445 #define SQL_CB_PRESERVE 2
446
447 #define SQL_FD_FETCH_NEXT __MSABI_LONG(0x00000001)
448 #define SQL_FD_FETCH_FIRST __MSABI_LONG(0x00000002)
449 #define SQL_FD_FETCH_LAST __MSABI_LONG(0x00000004)
450 #define SQL_FD_FETCH_PRIOR __MSABI_LONG(0x00000008)
451 #define SQL_FD_FETCH_ABSOLUTE __MSABI_LONG(0x00000010)
452 #define SQL_FD_FETCH_RELATIVE __MSABI_LONG(0x00000020)
453
454 #define SQL_GD_ANY_COLUMN __MSABI_LONG(0x00000001)
455 #define SQL_GD_ANY_ORDER __MSABI_LONG(0x00000002)
456
457 #define SQL_IC_UPPER 1
458 #define SQL_IC_LOWER 2
459 #define SQL_IC_SENSITIVE 3
460 #define SQL_IC_MIXED 4
461
462 #if (ODBCVER >= 0x0201)
463 #define SQL_OJ_LEFT __MSABI_LONG(0x00000001)
464 #define SQL_OJ_RIGHT __MSABI_LONG(0x00000002)
465 #define SQL_OJ_FULL __MSABI_LONG(0x00000004)
466 #define SQL_OJ_NESTED __MSABI_LONG(0x00000008)
467 #define SQL_OJ_NOT_ORDERED __MSABI_LONG(0x00000010)
468 #define SQL_OJ_INNER __MSABI_LONG(0x00000020)
469 #define SQL_OJ_ALL_COMPARISON_OPS __MSABI_LONG(0x00000040)
470 #endif
471
472 #define SQL_SCCO_READ_ONLY __MSABI_LONG(0x00000001)
473 #define SQL_SCCO_LOCK __MSABI_LONG(0x00000002)
474 #define SQL_SCCO_OPT_ROWVER __MSABI_LONG(0x00000004)
475 #define SQL_SCCO_OPT_VALUES __MSABI_LONG(0x00000008)
476
477 #define SQL_TC_NONE 0
478 #define SQL_TC_DML 1
479 #define SQL_TC_ALL 2
480 #define SQL_TC_DDL_COMMIT 3
481 #define SQL_TC_DDL_IGNORE 4
482
483 #define SQL_TXN_READ_UNCOMMITTED __MSABI_LONG(0x00000001)
484 #define SQL_TRANSACTION_READ_UNCOMMITTED SQL_TXN_READ_UNCOMMITTED
485 #define SQL_TXN_READ_COMMITTED __MSABI_LONG(0x00000002)
486 #define SQL_TRANSACTION_READ_COMMITTED SQL_TXN_READ_COMMITTED
487 #define SQL_TXN_REPEATABLE_READ __MSABI_LONG(0x00000004)
488 #define SQL_TRANSACTION_REPEATABLE_READ SQL_TXN_REPEATABLE_READ
489 #define SQL_TXN_SERIALIZABLE __MSABI_LONG(0x00000008)
490 #define SQL_TRANSACTION_SERIALIZABLE SQL_TXN_SERIALIZABLE
491
492 #define SQL_NC_HIGH 0
493 #define SQL_NC_LOW 1
494
495 #ifndef RC_INVOKED
496 SQLRETURN SQL_API SQLAllocConnect(SQLHENV EnvironmentHandle,SQLHDBC *ConnectionHandle);
497 SQLRETURN SQL_API SQLAllocEnv(SQLHENV *EnvironmentHandle);
498 #if (ODBCVER >= 0x0300)
499 SQLRETURN SQL_API SQLAllocHandle(SQLSMALLINT HandleType,SQLHANDLE InputHandle,SQLHANDLE *OutputHandle);
500 #endif
501 SQLRETURN SQL_API SQLAllocStmt(SQLHDBC ConnectionHandle,SQLHSTMT *StatementHandle);
502 SQLRETURN SQL_API SQLBindCol(SQLHSTMT StatementHandle,SQLUSMALLINT ColumnNumber,SQLSMALLINT TargetType,SQLPOINTER TargetValue,SQLLEN BufferLength,SQLLEN *StrLen_or_Ind);
503 #if (ODBCVER >= 0x0300)
504 SQLRETURN SQL_API SQLBindParam(SQLHSTMT StatementHandle,SQLUSMALLINT ParameterNumber,SQLSMALLINT ValueType,SQLSMALLINT ParameterType,SQLULEN LengthPrecision,SQLSMALLINT ParameterScale,SQLPOINTER ParameterValue,SQLLEN *StrLen_or_Ind);
505 #endif
506 SQLRETURN SQL_API SQLCancel(SQLHSTMT StatementHandle);
507 #if (ODBCVER >= 0x0380)
508 SQLRETURN SQL_API SQLCancelHandle(SQLSMALLINT HandleType,SQLHANDLE InputHandle);
509 #endif
510 #if (ODBCVER >= 0x0300)
511 SQLRETURN SQL_API SQLCloseCursor(SQLHSTMT StatementHandle);
512 #ifdef _WIN64
513 SQLRETURN SQL_API SQLColAttribute(SQLHSTMT StatementHandle,SQLUSMALLINT ColumnNumber,SQLUSMALLINT FieldIdentifier,SQLPOINTER CharacterAttribute,SQLSMALLINT BufferLength,SQLSMALLINT *StringLength,SQLLEN *NumericAttribute);
514 #else
515 SQLRETURN SQL_API SQLColAttribute(SQLHSTMT StatementHandle,SQLUSMALLINT ColumnNumber,SQLUSMALLINT FieldIdentifier,SQLPOINTER CharacterAttribute,SQLSMALLINT BufferLength,SQLSMALLINT *StringLength,SQLPOINTER NumericAttribute);
516 #endif
517 #endif
518 SQLRETURN SQL_API SQLColumns(SQLHSTMT StatementHandle,SQLCHAR *CatalogName,SQLSMALLINT NameLength1,SQLCHAR *SchemaName,SQLSMALLINT NameLength2,SQLCHAR *TableName,SQLSMALLINT NameLength3,SQLCHAR *ColumnName,SQLSMALLINT NameLength4);
519 #if (ODBCVER >= 0x0380)
520 SQLRETURN SQL_API SQLCompleteAsync(SQLSMALLINT HandleType,SQLHANDLE Handle,RETCODE *AsyncRetCodePtr);
521 #endif
522 SQLRETURN SQL_API SQLConnect(SQLHDBC ConnectionHandle,SQLCHAR *ServerName,SQLSMALLINT NameLength1,SQLCHAR *UserName,SQLSMALLINT NameLength2,SQLCHAR *Authentication,SQLSMALLINT NameLength3);
523 #if (ODBCVER >= 0x0300)
524 SQLRETURN SQL_API SQLCopyDesc(SQLHDESC SourceDescHandle,SQLHDESC TargetDescHandle);
525 #endif
526 SQLRETURN SQL_API SQLDataSources(SQLHENV EnvironmentHandle,SQLUSMALLINT Direction,SQLCHAR *ServerName,SQLSMALLINT BufferLength1,SQLSMALLINT *NameLength1,SQLCHAR *Description,SQLSMALLINT BufferLength2,SQLSMALLINT *NameLength2);
527 SQLRETURN SQL_API SQLDescribeCol(SQLHSTMT StatementHandle,SQLUSMALLINT ColumnNumber,SQLCHAR *ColumnName,SQLSMALLINT BufferLength,SQLSMALLINT *NameLength,SQLSMALLINT *DataType,SQLULEN *ColumnSize,SQLSMALLINT *DecimalDigits,SQLSMALLINT *Nullable);
528 SQLRETURN SQL_API SQLDisconnect(SQLHDBC ConnectionHandle);
529 #if (ODBCVER >= 0x0300)
530 SQLRETURN SQL_API SQLEndTran(SQLSMALLINT HandleType,SQLHANDLE Handle,SQLSMALLINT CompletionType);
531 #endif
532 SQLRETURN SQL_API SQLError(SQLHENV EnvironmentHandle,SQLHDBC ConnectionHandle,SQLHSTMT StatementHandle,SQLCHAR *Sqlstate,SQLINTEGER *NativeError,SQLCHAR *MessageText,SQLSMALLINT BufferLength,SQLSMALLINT *TextLength);
533 SQLRETURN SQL_API SQLExecDirect(SQLHSTMT StatementHandle,SQLCHAR *StatementText,SQLINTEGER TextLength);
534 SQLRETURN SQL_API SQLExecute(SQLHSTMT StatementHandle);
535 SQLRETURN SQL_API SQLFetch(SQLHSTMT StatementHandle);
536 #if (ODBCVER >= 0x0300)
537 SQLRETURN SQL_API SQLFetchScroll(SQLHSTMT StatementHandle,SQLSMALLINT FetchOrientation,SQLLEN FetchOffset);
538 #endif
539 SQLRETURN SQL_API SQLFreeConnect(SQLHDBC ConnectionHandle);
540 SQLRETURN SQL_API SQLFreeEnv(SQLHENV EnvironmentHandle);
541 #if (ODBCVER >= 0x0300)
542 SQLRETURN SQL_API SQLFreeHandle(SQLSMALLINT HandleType,SQLHANDLE Handle);
543 #endif
544 SQLRETURN SQL_API SQLFreeStmt(SQLHSTMT StatementHandle,SQLUSMALLINT Option);
545 #if (ODBCVER >= 0x0300)
546 SQLRETURN SQL_API SQLGetConnectAttr(SQLHDBC ConnectionHandle,SQLINTEGER Attribute,SQLPOINTER Value,SQLINTEGER BufferLength,SQLINTEGER *StringLength);
547 #endif
548 SQLRETURN SQL_API SQLGetConnectOption(SQLHDBC ConnectionHandle,SQLUSMALLINT Option,SQLPOINTER Value);
549 SQLRETURN SQL_API SQLGetCursorName(SQLHSTMT StatementHandle,SQLCHAR *CursorName,SQLSMALLINT BufferLength,SQLSMALLINT *NameLength);
550 SQLRETURN SQL_API SQLGetData(SQLHSTMT StatementHandle,SQLUSMALLINT ColumnNumber,SQLSMALLINT TargetType,SQLPOINTER TargetValue,SQLLEN BufferLength,SQLLEN *StrLen_or_Ind);
551 #if (ODBCVER >= 0x0300)
552 SQLRETURN SQL_API SQLGetDescField(SQLHDESC DescriptorHandle,SQLSMALLINT RecNumber,SQLSMALLINT FieldIdentifier,SQLPOINTER Value,SQLINTEGER BufferLength,SQLINTEGER *StringLength);
553 SQLRETURN SQL_API SQLGetDescRec(SQLHDESC DescriptorHandle,SQLSMALLINT RecNumber,SQLCHAR *Name,SQLSMALLINT BufferLength,SQLSMALLINT *StringLength,SQLSMALLINT *Type,SQLSMALLINT *SubType,SQLLEN *Length,SQLSMALLINT *Precision,SQLSMALLINT *Scale,SQLSMALLINT *Nullable);
554 SQLRETURN SQL_API SQLGetDiagField(SQLSMALLINT HandleType,SQLHANDLE Handle,SQLSMALLINT RecNumber,SQLSMALLINT DiagIdentifier,SQLPOINTER DiagInfo,SQLSMALLINT BufferLength,SQLSMALLINT *StringLength);
555 SQLRETURN SQL_API SQLGetDiagRec(SQLSMALLINT HandleType,SQLHANDLE Handle,SQLSMALLINT RecNumber,SQLCHAR *Sqlstate,SQLINTEGER *NativeError,SQLCHAR *MessageText,SQLSMALLINT BufferLength,SQLSMALLINT *TextLength);
556 SQLRETURN SQL_API SQLGetEnvAttr(SQLHENV EnvironmentHandle,SQLINTEGER Attribute,SQLPOINTER Value,SQLINTEGER BufferLength,SQLINTEGER *StringLength);
557 #endif
558 SQLRETURN SQL_API SQLGetFunctions(SQLHDBC ConnectionHandle,SQLUSMALLINT FunctionId,SQLUSMALLINT *Supported);
559 SQLRETURN SQL_API SQLGetInfo(SQLHDBC ConnectionHandle,SQLUSMALLINT InfoType,SQLPOINTER InfoValue,SQLSMALLINT BufferLength,SQLSMALLINT *StringLength);
560 #if (ODBCVER >= 0x0300)
561 SQLRETURN SQL_API SQLGetStmtAttr(SQLHSTMT StatementHandle,SQLINTEGER Attribute,SQLPOINTER Value,SQLINTEGER BufferLength,SQLINTEGER *StringLength);
562 #endif
563 SQLRETURN SQL_API SQLGetStmtOption(SQLHSTMT StatementHandle,SQLUSMALLINT Option,SQLPOINTER Value);
564 SQLRETURN SQL_API SQLGetTypeInfo(SQLHSTMT StatementHandle,SQLSMALLINT DataType);
565 SQLRETURN SQL_API SQLNumResultCols(SQLHSTMT StatementHandle,SQLSMALLINT *ColumnCount);
566 SQLRETURN SQL_API SQLParamData(SQLHSTMT StatementHandle,SQLPOINTER *Value);
567 SQLRETURN SQL_API SQLPrepare(SQLHSTMT StatementHandle,SQLCHAR *StatementText,SQLINTEGER TextLength);
568 SQLRETURN SQL_API SQLPutData(SQLHSTMT StatementHandle,SQLPOINTER Data,SQLLEN StrLen_or_Ind);
569 SQLRETURN SQL_API SQLRowCount(SQLHSTMT StatementHandle,SQLLEN *RowCount);
570 #if (ODBCVER >= 0x0300)
571 SQLRETURN SQL_API SQLSetConnectAttr(SQLHDBC ConnectionHandle,SQLINTEGER Attribute,SQLPOINTER Value,SQLINTEGER StringLength);
572 #endif
573 SQLRETURN SQL_API SQLSetConnectOption(SQLHDBC ConnectionHandle,SQLUSMALLINT Option,SQLULEN Value);
574 SQLRETURN SQL_API SQLSetCursorName(SQLHSTMT StatementHandle,SQLCHAR *CursorName,SQLSMALLINT NameLength);
575 #if (ODBCVER >= 0x0300)
576 SQLRETURN SQL_API SQLSetDescField(SQLHDESC DescriptorHandle,SQLSMALLINT RecNumber,SQLSMALLINT FieldIdentifier,SQLPOINTER Value,SQLINTEGER BufferLength);
577 SQLRETURN SQL_API SQLSetDescRec(SQLHDESC DescriptorHandle,SQLSMALLINT RecNumber,SQLSMALLINT Type,SQLSMALLINT SubType,SQLLEN Length,SQLSMALLINT Precision,SQLSMALLINT Scale,SQLPOINTER Data,SQLLEN *StringLength,SQLLEN *Indicator);
578 SQLRETURN SQL_API SQLSetEnvAttr(SQLHENV EnvironmentHandle,SQLINTEGER Attribute,SQLPOINTER Value,SQLINTEGER StringLength);
579 #endif
580 SQLRETURN SQL_API SQLSetParam(SQLHSTMT StatementHandle,SQLUSMALLINT ParameterNumber,SQLSMALLINT ValueType,SQLSMALLINT ParameterType,SQLULEN LengthPrecision,SQLSMALLINT ParameterScale,SQLPOINTER ParameterValue,SQLLEN *StrLen_or_Ind);
581 #if (ODBCVER >= 0x0300)
582 SQLRETURN SQL_API SQLSetStmtAttr(SQLHSTMT StatementHandle,SQLINTEGER Attribute,SQLPOINTER Value,SQLINTEGER StringLength);
583 #endif
584 SQLRETURN SQL_API SQLSetStmtOption(SQLHSTMT StatementHandle,SQLUSMALLINT Option,SQLULEN Value);
585 SQLRETURN SQL_API SQLSpecialColumns(SQLHSTMT StatementHandle,SQLUSMALLINT IdentifierType,SQLCHAR *CatalogName,SQLSMALLINT NameLength1,SQLCHAR *SchemaName,SQLSMALLINT NameLength2,SQLCHAR *TableName,SQLSMALLINT NameLength3,SQLUSMALLINT Scope,SQLUSMALLINT Nullable);
586 SQLRETURN SQL_API SQLStatistics(SQLHSTMT StatementHandle,SQLCHAR *CatalogName,SQLSMALLINT NameLength1,SQLCHAR *SchemaName,SQLSMALLINT NameLength2,SQLCHAR *TableName,SQLSMALLINT NameLength3,SQLUSMALLINT Unique,SQLUSMALLINT Reserved);
587 SQLRETURN SQL_API SQLTables(SQLHSTMT StatementHandle,SQLCHAR *CatalogName,SQLSMALLINT NameLength1,SQLCHAR *SchemaName,SQLSMALLINT NameLength2,SQLCHAR *TableName,SQLSMALLINT NameLength3,SQLCHAR *TableType,SQLSMALLINT NameLength4);
588 SQLRETURN SQL_API SQLTransact(SQLHENV EnvironmentHandle,SQLHDBC ConnectionHandle,SQLUSMALLINT CompletionType);
589 #endif
590
591 #ifdef __cplusplus
592 }
593 #endif
594 #endif