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