msxml3: Remove "stub" from traces.
[wine.git] / include / sql.h
blobed47380c8a3a698d277bf5f298bd1e86a30340ea
1 /*
2 * ODBC definitions
4 * Copyright (C) 1999 Xiang Li
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __SQL_H
22 #define __SQL_H
24 #ifndef ODBCVER
25 #define ODBCVER 0x0351
26 #endif
28 #include <sqltypes.h>
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #define SQL_NULL_DATA (-1)
35 #define SQL_DATA_AT_EXEC (-2)
36 #define SQL_SUCCESS 0
37 #define SQL_SUCCESS_WITH_INFO 1
38 #if (ODBCVER >= 0x0300)
39 #define SQL_NO_DATA 100
40 #endif
41 #define SQL_ERROR (-1)
42 #define SQL_INVALID_HANDLE (-2)
43 #define SQL_STILL_EXECUTING 2
44 #define SQL_NEED_DATA 99
45 #define SQL_SUCCEEDED(rc) (((rc)&(~1))==0)
47 #define SQL_NTS (-3)
48 #define SQL_NTSL (__MSABI_LONG(-3))
50 #define SQL_MAX_MESSAGE_LENGTH 512
52 #if (ODBCVER >= 0x0300)
53 #define SQL_DATE_LEN 10
54 #define SQL_TIME_LEN 8
55 #define SQL_TIMESTAMP_LEN 19
56 #endif
58 #if (ODBCVER >= 0x0300)
59 #define SQL_HANDLE_ENV 1
60 #define SQL_HANDLE_DBC 2
61 #define SQL_HANDLE_STMT 3
62 #define SQL_HANDLE_DESC 4
63 #endif
65 #if (ODBCVER >= 0x0300)
66 #define SQL_ATTR_OUTPUT_NTS 10001
67 #endif
69 #if (ODBCVER >= 0x0300)
70 #define SQL_ATTR_AUTO_IPD 10001
71 #define SQL_ATTR_METADATA_ID 10014
72 #endif
74 #if (ODBCVER >= 0x0300)
75 #define SQL_ATTR_APP_ROW_DESC 10010
76 #define SQL_ATTR_APP_PARAM_DESC 10011
77 #define SQL_ATTR_IMP_ROW_DESC 10012
78 #define SQL_ATTR_IMP_PARAM_DESC 10013
79 #define SQL_ATTR_CURSOR_SCROLLABLE (-1)
80 #define SQL_ATTR_CURSOR_SENSITIVITY (-2)
81 #endif
83 #if (ODBCVER >= 0x0300)
84 #define SQL_NONSCROLLABLE 0
85 #define SQL_SCROLLABLE 1
86 #endif
88 #if (ODBCVER >= 0x0300)
89 #define SQL_DESC_COUNT 1001
90 #define SQL_DESC_TYPE 1002
91 #define SQL_DESC_LENGTH 1003
92 #define SQL_DESC_OCTET_LENGTH_PTR 1004
93 #define SQL_DESC_PRECISION 1005
94 #define SQL_DESC_SCALE 1006
95 #define SQL_DESC_DATETIME_INTERVAL_CODE 1007
96 #define SQL_DESC_NULLABLE 1008
97 #define SQL_DESC_INDICATOR_PTR 1009
98 #define SQL_DESC_DATA_PTR 1010
99 #define SQL_DESC_NAME 1011
100 #define SQL_DESC_UNNAMED 1012
101 #define SQL_DESC_OCTET_LENGTH 1013
102 #define SQL_DESC_ALLOC_TYPE 1099
103 #endif
105 #if (ODBCVER >= 0x0300)
106 #define SQL_DIAG_RETURNCODE 1
107 #define SQL_DIAG_NUMBER 2
108 #define SQL_DIAG_ROW_COUNT 3
109 #define SQL_DIAG_SQLSTATE 4
110 #define SQL_DIAG_NATIVE 5
111 #define SQL_DIAG_MESSAGE_TEXT 6
112 #define SQL_DIAG_DYNAMIC_FUNCTION 7
113 #define SQL_DIAG_CLASS_ORIGIN 8
114 #define SQL_DIAG_SUBCLASS_ORIGIN 9
115 #define SQL_DIAG_CONNECTION_NAME 10
116 #define SQL_DIAG_SERVER_NAME 11
117 #define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12
118 #endif
120 #if (ODBCVER >= 0x0300)
121 #define SQL_DIAG_ALTER_DOMAIN 3
122 #define SQL_DIAG_ALTER_TABLE 4
123 #define SQL_DIAG_CALL 7
124 #define SQL_DIAG_CREATE_ASSERTION 6
125 #define SQL_DIAG_CREATE_CHARACTER_SET 8
126 #define SQL_DIAG_CREATE_COLLATION 10
127 #define SQL_DIAG_CREATE_DOMAIN 23
128 #define SQL_DIAG_CREATE_INDEX (-1)
129 #define SQL_DIAG_CREATE_SCHEMA 64
130 #define SQL_DIAG_CREATE_TABLE 77
131 #define SQL_DIAG_CREATE_TRANSLATION 79
132 #define SQL_DIAG_CREATE_VIEW 84
133 #define SQL_DIAG_DELETE_WHERE 19
134 #define SQL_DIAG_DROP_ASSERTION 24
135 #define SQL_DIAG_DROP_CHARACTER_SET 25
136 #define SQL_DIAG_DROP_COLLATION 26
137 #define SQL_DIAG_DROP_DOMAIN 27
138 #define SQL_DIAG_DROP_INDEX (-2)
139 #define SQL_DIAG_DROP_SCHEMA 31
140 #define SQL_DIAG_DROP_TABLE 32
141 #define SQL_DIAG_DROP_TRANSLATION 33
142 #define SQL_DIAG_DROP_VIEW 36
143 #define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38
144 #define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81
145 #define SQL_DIAG_GRANT 48
146 #define SQL_DIAG_INSERT 50
147 #define SQL_DIAG_REVOKE 59
148 #define SQL_DIAG_SELECT_CURSOR 85
149 #define SQL_DIAG_UNKNOWN_STATEMENT 0
150 #define SQL_DIAG_UPDATE_WHERE 82
151 #endif
153 #define SQL_UNKNOWN_TYPE 0
154 #define SQL_CHAR 1
155 #define SQL_NUMERIC 2
156 #define SQL_DECIMAL 3
157 #define SQL_INTEGER 4
158 #define SQL_SMALLINT 5
159 #define SQL_FLOAT 6
160 #define SQL_REAL 7
161 #define SQL_DOUBLE 8
162 #if (ODBCVER >= 0x0300)
163 #define SQL_DATETIME 9
164 #endif
165 #define SQL_VARCHAR 12
167 #if (ODBCVER >= 0x0300)
168 #define SQL_TYPE_DATE 91
169 #define SQL_TYPE_TIME 92
170 #define SQL_TYPE_TIMESTAMP 93
171 #endif
173 #if (ODBCVER >= 0x0300)
174 #define SQL_UNSPECIFIED 0
175 #define SQL_INSENSITIVE 1
176 #define SQL_SENSITIVE 2
177 #endif
179 #define SQL_ALL_TYPES 0
181 #if (ODBCVER >= 0x0300)
182 #define SQL_DEFAULT 99
183 #endif
185 #if (ODBCVER >= 0x0300)
186 #define SQL_ARD_TYPE (-99)
187 #endif
189 #if (ODBCVER >= 0x0300)
190 #define SQL_CODE_DATE 1
191 #define SQL_CODE_TIME 2
192 #define SQL_CODE_TIMESTAMP 3
193 #endif
195 #if (ODBCVER >= 0x0300)
196 #define SQL_FALSE 0
197 #define SQL_TRUE 1
198 #endif
200 #define SQL_NO_NULLS 0
201 #define SQL_NULLABLE 1
203 #define SQL_NULLABLE_UNKNOWN 2
205 #if (ODBCVER >= 0x0300)
206 #define SQL_PRED_NONE 0
207 #define SQL_PRED_CHAR 1
208 #define SQL_PRED_BASIC 2
209 #endif
211 #if (ODBCVER >= 0x0300)
212 #define SQL_NAMED 0
213 #define SQL_UNNAMED 1
214 #endif
216 #if (ODBCVER >= 0x0300)
217 #define SQL_DESC_ALLOC_AUTO 1
218 #define SQL_DESC_ALLOC_USER 2
219 #endif
221 #define SQL_CLOSE 0
222 #define SQL_DROP 1
223 #define SQL_UNBIND 2
224 #define SQL_RESET_PARAMS 3
225 #define SQL_FETCH_NEXT 1
226 #define SQL_FETCH_FIRST 2
227 #define SQL_FETCH_LAST 3
228 #define SQL_FETCH_PRIOR 4
229 #define SQL_FETCH_ABSOLUTE 5
230 #define SQL_FETCH_RELATIVE 6
232 #define SQL_COMMIT 0
233 #define SQL_ROLLBACK 1
235 #define SQL_NULL_HENV 0
236 #define SQL_NULL_HDBC 0
237 #define SQL_NULL_HSTMT 0
238 #if (ODBCVER >= 0x0300)
239 #define SQL_NULL_HDESC 0
240 #endif
242 #if (ODBCVER >= 0x0300)
243 #define SQL_NULL_HANDLE __MSABI_LONG(0)
244 #endif
246 #define SQL_SCOPE_CURROW 0
247 #define SQL_SCOPE_TRANSACTION 1
248 #define SQL_SCOPE_SESSION 2
250 #define SQL_PC_UNKNOWN 0
251 #if (ODBCVER >= 0x0300)
252 #define SQL_PC_NON_PSEUDO 1
253 #endif
254 #define SQL_PC_PSEUDO 2
256 #if (ODBCVER >= 0x0300)
257 #define SQL_ROW_IDENTIFIER 1
258 #endif
260 #define SQL_INDEX_UNIQUE 0
261 #define SQL_INDEX_ALL 1
263 #define SQL_INDEX_CLUSTERED 1
264 #define SQL_INDEX_HASHED 2
265 #define SQL_INDEX_OTHER 3
267 #define SQL_API_SQLALLOCCONNECT 1
268 #define SQL_API_SQLALLOCENV 2
269 #if (ODBCVER >= 0x0300)
270 #define SQL_API_SQLALLOCHANDLE 1001
271 #endif
272 #define SQL_API_SQLALLOCSTMT 3
273 #define SQL_API_SQLBINDCOL 4
274 #if (ODBCVER >= 0x0300)
275 #define SQL_API_SQLBINDPARAM 1002
276 #endif
277 #define SQL_API_SQLCANCEL 5
278 #if (ODBCVER >= 0x0300)
279 #define SQL_API_SQLCLOSECURSOR 1003
280 #define SQL_API_SQLCOLATTRIBUTE 6
281 #endif
282 #define SQL_API_SQLCOLUMNS 40
283 #define SQL_API_SQLCONNECT 7
284 #if (ODBCVER >= 0x0300)
285 #define SQL_API_SQLCOPYDESC 1004
286 #endif
287 #define SQL_API_SQLDATASOURCES 57
288 #define SQL_API_SQLDESCRIBECOL 8
289 #define SQL_API_SQLDISCONNECT 9
290 #if (ODBCVER >= 0x0300)
291 #define SQL_API_SQLENDTRAN 1005
292 #endif
293 #define SQL_API_SQLERROR 10
294 #define SQL_API_SQLEXECDIRECT 11
295 #define SQL_API_SQLEXECUTE 12
296 #define SQL_API_SQLFETCH 13
297 #if (ODBCVER >= 0x0300)
298 #define SQL_API_SQLFETCHSCROLL 1021
299 #endif
300 #define SQL_API_SQLFREECONNECT 14
301 #define SQL_API_SQLFREEENV 15
302 #if (ODBCVER >= 0x0300)
303 #define SQL_API_SQLFREEHANDLE 1006
304 #endif
305 #define SQL_API_SQLFREESTMT 16
306 #if (ODBCVER >= 0x0300)
307 #define SQL_API_SQLGETCONNECTATTR 1007
308 #endif
309 #define SQL_API_SQLGETCONNECTOPTION 42
310 #define SQL_API_SQLGETCURSORNAME 17
311 #define SQL_API_SQLGETDATA 43
312 #if (ODBCVER >= 0x0300)
313 #define SQL_API_SQLGETDESCFIELD 1008
314 #define SQL_API_SQLGETDESCREC 1009
315 #define SQL_API_SQLGETDIAGFIELD 1010
316 #define SQL_API_SQLGETDIAGREC 1011
317 #define SQL_API_SQLGETENVATTR 1012
318 #endif
319 #define SQL_API_SQLGETFUNCTIONS 44
320 #define SQL_API_SQLGETINFO 45
321 #if (ODBCVER >= 0x0300)
322 #define SQL_API_SQLGETSTMTATTR 1014
323 #endif
324 #define SQL_API_SQLGETSTMTOPTION 46
325 #define SQL_API_SQLGETTYPEINFO 47
326 #define SQL_API_SQLNUMRESULTCOLS 18
327 #define SQL_API_SQLPARAMDATA 48
328 #define SQL_API_SQLPREPARE 19
329 #define SQL_API_SQLPUTDATA 49
330 #define SQL_API_SQLROWCOUNT 20
331 #if (ODBCVER >= 0x0300)
332 #define SQL_API_SQLSETCONNECTATTR 1016
333 #endif
334 #define SQL_API_SQLSETCONNECTOPTION 50
335 #define SQL_API_SQLSETCURSORNAME 21
336 #if (ODBCVER >= 0x0300)
337 #define SQL_API_SQLSETDESCFIELD 1017
338 #define SQL_API_SQLSETDESCREC 1018
339 #define SQL_API_SQLSETENVATTR 1019
340 #endif
341 #define SQL_API_SQLSETPARAM 22
342 #if (ODBCVER >= 0x0300)
343 #define SQL_API_SQLSETSTMTATTR 1020
344 #endif
345 #define SQL_API_SQLSETSTMTOPTION 51
346 #define SQL_API_SQLSPECIALCOLUMNS 52
347 #define SQL_API_SQLSTATISTICS 53
348 #define SQL_API_SQLTABLES 54
349 #define SQL_API_SQLTRANSACT 23
351 #if (ODBCVER >= 0x0300)
352 #define SQL_MAX_DRIVER_CONNECTIONS 0
353 #define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS
354 #define SQL_MAX_CONCURRENT_ACTIVITIES 1
355 #define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIES
356 #endif
357 #define SQL_DATA_SOURCE_NAME 2
358 #define SQL_FETCH_DIRECTION 8
359 #define SQL_SERVER_NAME 13
360 #define SQL_SEARCH_PATTERN_ESCAPE 14
361 #define SQL_DBMS_NAME 17
362 #define SQL_DBMS_VER 18
363 #define SQL_ACCESSIBLE_TABLES 19
364 #define SQL_ACCESSIBLE_PROCEDURES 20
365 #define SQL_CURSOR_COMMIT_BEHAVIOR 23
366 #define SQL_DATA_SOURCE_READ_ONLY 25
367 #define SQL_DEFAULT_TXN_ISOLATION 26
368 #define SQL_IDENTIFIER_CASE 28
369 #define SQL_IDENTIFIER_QUOTE_CHAR 29
370 #define SQL_MAX_COLUMN_NAME_LEN 30
371 #define SQL_MAXIMUM_COLUMN_NAME_LENGTH SQL_MAX_COLUMN_NAME_LEN
372 #define SQL_MAX_CURSOR_NAME_LEN 31
373 #define SQL_MAXIMUM_CURSOR_NAME_LENGTH SQL_MAX_CURSOR_NAME_LEN
374 #define SQL_MAX_SCHEMA_NAME_LEN 32
375 #define SQL_MAXIMUM_SCHEMA_NAME_LENGTH SQL_MAX_SCHEMA_NAME_LEN
376 #define SQL_MAX_CATALOG_NAME_LEN 34
377 #define SQL_MAXIMUM_CATALOG_NAME_LENGTH SQL_MAX_CATALOG_NAME_LEN
378 #define SQL_MAX_TABLE_NAME_LEN 35
379 #define SQL_SCROLL_CONCURRENCY 43
380 #define SQL_TXN_CAPABLE 46
381 #define SQL_TRANSACTION_CAPABLE SQL_TXN_CAPABLE
382 #define SQL_USER_NAME 47
383 #define SQL_TXN_ISOLATION_OPTION 72
384 #define SQL_TRANSACTION_ISOLATION_OPTION SQL_TXN_ISOLATION_OPTION
385 #define SQL_INTEGRITY 73
386 #define SQL_GETDATA_EXTENSIONS 81
387 #define SQL_NULL_COLLATION 85
388 #define SQL_ALTER_TABLE 86
389 #define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
390 #define SQL_SPECIAL_CHARACTERS 94
391 #define SQL_MAX_COLUMNS_IN_GROUP_BY 97
392 #define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY SQL_MAX_COLUMNS_IN_GROUP_BY
393 #define SQL_MAX_COLUMNS_IN_INDEX 98
394 #define SQL_MAXIMUM_COLUMNS_IN_INDEX SQL_MAX_COLUMNS_IN_INDEX
395 #define SQL_MAX_COLUMNS_IN_ORDER_BY 99
396 #define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY SQL_MAX_COLUMNS_IN_ORDER_BY
397 #define SQL_MAX_COLUMNS_IN_SELECT 100
398 #define SQL_MAXIMUM_COLUMNS_IN_SELECT SQL_MAX_COLUMNS_IN_SELECT
399 #define SQL_MAX_COLUMNS_IN_TABLE 101
400 #define SQL_MAX_INDEX_SIZE 102
401 #define SQL_MAXIMUM_INDEX_SIZE SQL_MAX_INDEX_SIZE
402 #define SQL_MAX_ROW_SIZE 104
403 #define SQL_MAXIMUM_ROW_SIZE SQL_MAX_ROW_SIZE
404 #define SQL_MAX_STATEMENT_LEN 105
405 #define SQL_MAXIMUM_STATEMENT_LENGTH SQL_MAX_STATEMENT_LEN
406 #define SQL_MAX_TABLES_IN_SELECT 106
407 #define SQL_MAXIMUM_TABLES_IN_SELECT SQL_MAX_TABLES_IN_SELECT
408 #define SQL_MAX_USER_NAME_LEN 107
409 #define SQL_MAXIMUM_USER_NAME_LENGTH SQL_MAX_USER_NAME_LEN
410 #if (ODBCVER >= 0x0300)
411 #define SQL_OJ_CAPABILITIES 115
412 #define SQL_OUTER_JOIN_CAPABILITIES SQL_OJ_CAPABILITIES
413 #endif
415 #if (ODBCVER >= 0x0300)
416 #define SQL_XOPEN_CLI_YEAR 10000
417 #define SQL_CURSOR_SENSITIVITY 10001
418 #define SQL_DESCRIBE_PARAMETER 10002
419 #define SQL_CATALOG_NAME 10003
420 #define SQL_COLLATION_SEQ 10004
421 #define SQL_MAX_IDENTIFIER_LEN 10005
422 #define SQL_MAXIMUM_IDENTIFIER_LENGTH SQL_MAX_IDENTIFIER_LEN
423 #endif
425 #if (ODBCVER >= 0x0200)
426 #define SQL_AT_ADD_COLUMN __MSABI_LONG(0x00000001)
427 #define SQL_AT_DROP_COLUMN __MSABI_LONG(0x00000002)
428 #endif
430 #if (ODBCVER >= 0x0300)
431 #define SQL_AT_ADD_CONSTRAINT __MSABI_LONG(0x00000008)
433 #endif /* ODBCVER >= 0x0300 */
436 #if (ODBCVER >= 0x0300)
437 #define SQL_AM_NONE 0
438 #define SQL_AM_CONNECTION 1
439 #define SQL_AM_STATEMENT 2
440 #endif
442 #define SQL_CB_DELETE 0
443 #define SQL_CB_CLOSE 1
444 #define SQL_CB_PRESERVE 2
446 #define SQL_FD_FETCH_NEXT __MSABI_LONG(0x00000001)
447 #define SQL_FD_FETCH_FIRST __MSABI_LONG(0x00000002)
448 #define SQL_FD_FETCH_LAST __MSABI_LONG(0x00000004)
449 #define SQL_FD_FETCH_PRIOR __MSABI_LONG(0x00000008)
450 #define SQL_FD_FETCH_ABSOLUTE __MSABI_LONG(0x00000010)
451 #define SQL_FD_FETCH_RELATIVE __MSABI_LONG(0x00000020)
453 #define SQL_GD_ANY_COLUMN __MSABI_LONG(0x00000001)
454 #define SQL_GD_ANY_ORDER __MSABI_LONG(0x00000002)
456 #define SQL_IC_UPPER 1
457 #define SQL_IC_LOWER 2
458 #define SQL_IC_SENSITIVE 3
459 #define SQL_IC_MIXED 4
461 #if (ODBCVER >= 0x0201)
462 #define SQL_OJ_LEFT __MSABI_LONG(0x00000001)
463 #define SQL_OJ_RIGHT __MSABI_LONG(0x00000002)
464 #define SQL_OJ_FULL __MSABI_LONG(0x00000004)
465 #define SQL_OJ_NESTED __MSABI_LONG(0x00000008)
466 #define SQL_OJ_NOT_ORDERED __MSABI_LONG(0x00000010)
467 #define SQL_OJ_INNER __MSABI_LONG(0x00000020)
468 #define SQL_OJ_ALL_COMPARISON_OPS __MSABI_LONG(0x00000040)
469 #endif
471 #define SQL_SCCO_READ_ONLY __MSABI_LONG(0x00000001)
472 #define SQL_SCCO_LOCK __MSABI_LONG(0x00000002)
473 #define SQL_SCCO_OPT_ROWVER __MSABI_LONG(0x00000004)
474 #define SQL_SCCO_OPT_VALUES __MSABI_LONG(0x00000008)
476 #define SQL_TC_NONE 0
477 #define SQL_TC_DML 1
478 #define SQL_TC_ALL 2
479 #define SQL_TC_DDL_COMMIT 3
480 #define SQL_TC_DDL_IGNORE 4
482 #define SQL_TXN_READ_UNCOMMITTED __MSABI_LONG(0x00000001)
483 #define SQL_TRANSACTION_READ_UNCOMMITTED SQL_TXN_READ_UNCOMMITTED
484 #define SQL_TXN_READ_COMMITTED __MSABI_LONG(0x00000002)
485 #define SQL_TRANSACTION_READ_COMMITTED SQL_TXN_READ_COMMITTED
486 #define SQL_TXN_REPEATABLE_READ __MSABI_LONG(0x00000004)
487 #define SQL_TRANSACTION_REPEATABLE_READ SQL_TXN_REPEATABLE_READ
488 #define SQL_TXN_SERIALIZABLE __MSABI_LONG(0x00000008)
489 #define SQL_TRANSACTION_SERIALIZABLE SQL_TXN_SERIALIZABLE
491 #define SQL_NC_HIGH 0
492 #define SQL_NC_LOW 1
494 SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle,
495 SQLHDBC *ConnectionHandle);
497 SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle);
499 #if (ODBCVER >= 0x0300)
500 SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType,
501 SQLHANDLE InputHandle, SQLHANDLE *OutputHandle);
502 #endif
504 SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle,
505 SQLHSTMT *StatementHandle);
507 SQLRETURN WINAPI SQLBindCol(SQLHSTMT StatementHandle,
508 SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
509 SQLPOINTER TargetValue, SQLLEN BufferLength,
510 SQLLEN *StrLen_or_Ind);
512 #if (ODBCVER >= 0x0300)
513 SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle,
514 SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
515 SQLSMALLINT ParameterType, SQLULEN LengthPrecision,
516 SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
517 SQLLEN *StrLen_or_Ind);
518 #endif
520 SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle);
522 #if (ODBCVER >= 0x0300)
523 SQLRETURN WINAPI SQLCloseCursor(SQLHSTMT StatementHandle);
525 SQLRETURN WINAPI SQLColAttribute (SQLHSTMT StatementHandle,
526 SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier,
527 SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength,
528 SQLSMALLINT *StringLength, SQLLEN *NumericAttribute);
529 #endif
532 SQLRETURN WINAPI SQLColumns(SQLHSTMT StatementHandle,
533 SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
534 SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
535 SQLCHAR *TableName, SQLSMALLINT NameLength3,
536 SQLCHAR *ColumnName, SQLSMALLINT NameLength4);
539 SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle,
540 SQLCHAR *ServerName, SQLSMALLINT NameLength1,
541 SQLCHAR *UserName, SQLSMALLINT NameLength2,
542 SQLCHAR *Authentication, SQLSMALLINT NameLength3);
544 #if (ODBCVER >= 0x0300)
545 SQLRETURN WINAPI SQLCopyDesc(SQLHDESC SourceDescHandle,
546 SQLHDESC TargetDescHandle);
547 #endif
549 SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle,
550 SQLUSMALLINT Direction, SQLCHAR *ServerName,
551 SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1,
552 SQLCHAR *Description, SQLSMALLINT BufferLength2,
553 SQLSMALLINT *NameLength2);
555 SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle,
556 SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName,
557 SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
558 SQLSMALLINT *DataType, SQLULEN *ColumnSize,
559 SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable);
561 SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle);
563 #if (ODBCVER >= 0x0300)
564 SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle,
565 SQLSMALLINT CompletionType);
566 #endif
568 SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle,
569 SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle,
570 SQLCHAR *Sqlstate, SQLINTEGER *NativeError,
571 SQLCHAR *MessageText, SQLSMALLINT BufferLength,
572 SQLSMALLINT *TextLength);
574 SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle,
575 SQLCHAR *StatementText, SQLINTEGER TextLength);
577 SQLRETURN WINAPI SQLExecute(SQLHSTMT StatementHandle);
579 SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle);
581 #if (ODBCVER >= 0x0300)
582 SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle,
583 SQLSMALLINT FetchOrientation, SQLLEN FetchOffset);
584 #endif
586 SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle);
588 SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle);
590 #if (ODBCVER >= 0x0300)
591 SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle);
592 #endif
594 SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle,
595 SQLUSMALLINT Option);
597 #if (ODBCVER >= 0x0300)
598 SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle,
599 SQLINTEGER Attribute, SQLPOINTER Value,
600 SQLINTEGER BufferLength, SQLINTEGER *StringLength);
601 #endif
603 SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle,
604 SQLUSMALLINT Option, SQLPOINTER Value);
606 SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle,
607 SQLCHAR *CursorName, SQLSMALLINT BufferLength,
608 SQLSMALLINT *NameLength);
610 SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle,
611 SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
612 SQLPOINTER TargetValue, SQLLEN BufferLength,
613 SQLLEN *StrLen_or_Ind);
615 #if (ODBCVER >= 0x0300)
616 SQLRETURN WINAPI SQLGetDescField(SQLHDESC DescriptorHandle,
617 SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
618 SQLPOINTER Value, SQLINTEGER BufferLength,
619 SQLINTEGER *StringLength);
621 SQLRETURN WINAPI SQLGetDescRec(SQLHDESC DescriptorHandle,
622 SQLSMALLINT RecNumber, SQLCHAR *Name,
623 SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
624 SQLSMALLINT *Type, SQLSMALLINT *SubType,
625 SQLLEN *Length, SQLSMALLINT *Precision,
626 SQLSMALLINT *Scale, SQLSMALLINT *Nullable);
628 SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle,
629 SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier,
630 SQLPOINTER DiagInfo, SQLSMALLINT BufferLength,
631 SQLSMALLINT *StringLength);
633 SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
634 SQLSMALLINT RecNumber, SQLCHAR *Sqlstate,
635 SQLINTEGER *NativeError, SQLCHAR *MessageText,
636 SQLSMALLINT BufferLength, SQLSMALLINT *TextLength);
638 SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle,
639 SQLINTEGER Attribute, SQLPOINTER Value,
640 SQLINTEGER BufferLength, SQLINTEGER *StringLength);
641 #endif
643 SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle,
644 SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported);
646 SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle,
647 SQLUSMALLINT InfoType, SQLPOINTER InfoValue,
648 SQLSMALLINT BufferLength, SQLSMALLINT *StringLength);
650 #if (ODBCVER >= 0x0300)
651 SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle,
652 SQLINTEGER Attribute, SQLPOINTER Value,
653 SQLINTEGER BufferLength, SQLINTEGER *StringLength);
654 #endif
656 SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle,
657 SQLUSMALLINT Option, SQLPOINTER Value);
659 SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle,
660 SQLSMALLINT DataType);
662 SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle,
663 SQLSMALLINT *ColumnCount);
665 SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle,
666 SQLPOINTER *Value);
668 SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle,
669 SQLCHAR *StatementText, SQLINTEGER TextLength);
671 SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle,
672 SQLPOINTER Data, SQLLEN StrLen_or_Ind);
674 SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle,
675 SQLLEN *RowCount);
677 #if (ODBCVER >= 0x0300)
678 SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle,
679 SQLINTEGER Attribute, SQLPOINTER Value,
680 SQLINTEGER StringLength);
681 #endif
683 SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle,
684 SQLUSMALLINT Option, SQLULEN Value);
686 SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle,
687 SQLCHAR *CursorName, SQLSMALLINT NameLength);
689 #if (ODBCVER >= 0x0300)
690 SQLRETURN WINAPI SQLSetDescField(SQLHDESC DescriptorHandle,
691 SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
692 SQLPOINTER Value, SQLINTEGER BufferLength);
694 SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle,
695 SQLSMALLINT RecNumber, SQLSMALLINT Type,
696 SQLSMALLINT SubType, SQLLEN Length,
697 SQLSMALLINT Precision, SQLSMALLINT Scale,
698 SQLPOINTER Data, SQLLEN *StringLength,
699 SQLLEN *Indicator);
701 SQLRETURN WINAPI SQLSetEnvAttr(SQLHENV EnvironmentHandle,
702 SQLINTEGER Attribute, SQLPOINTER Value,
703 SQLINTEGER StringLength);
704 #endif
706 SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle,
707 SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
708 SQLSMALLINT ParameterType, SQLULEN LengthPrecision,
709 SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
710 SQLLEN *StrLen_or_Ind);
712 #if (ODBCVER >= 0x0300)
713 SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle,
714 SQLINTEGER Attribute, SQLPOINTER Value,
715 SQLINTEGER StringLength);
716 #endif
718 SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle,
719 SQLUSMALLINT Option, SQLULEN Value);
721 SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle,
722 SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName,
723 SQLSMALLINT NameLength1, SQLCHAR *SchemaName,
724 SQLSMALLINT NameLength2, SQLCHAR *TableName,
725 SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
726 SQLUSMALLINT Nullable);
728 SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle,
729 SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
730 SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
731 SQLCHAR *TableName, SQLSMALLINT NameLength3,
732 SQLUSMALLINT Unique, SQLUSMALLINT Reserved);
734 SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle,
735 SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
736 SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
737 SQLCHAR *TableName, SQLSMALLINT NameLength3,
738 SQLCHAR *TableType, SQLSMALLINT NameLength4);
740 SQLRETURN WINAPI SQLTransact(SQLHENV EnvironmentHandle,
741 SQLHDBC ConnectionHandle, SQLUSMALLINT CompletionType);
743 #ifdef __cplusplus
745 #endif
746 #endif