]>
Commit | Line | Data |
---|---|---|
1a6944fd RR |
1 | #ifndef _HSTMT_H |
2 | #define _HSTMT_H | |
3 | ||
4 | #include <../iodbc/config.h> | |
5 | ||
6 | #include <../iodbc/isql.h> | |
7 | #include <../iodbc/isqlext.h> | |
8 | ||
9 | typedef struct STMT | |
10 | { | |
11 | int type; /* must be 1st field */ | |
12 | ||
13 | struct STMT* next; | |
14 | ||
15 | HERR herr; | |
16 | HDBC hdbc; /* back point to connection object */ | |
17 | HSTMT dhstmt; /* driver's stmt handle */ | |
18 | ||
19 | int state; | |
20 | int cursor_state; | |
21 | int prep_state; | |
22 | int asyn_on; /* async executing which odbc call */ | |
23 | int need_on; /* which call return SQL_NEED_DATA */ | |
24 | } STMT_t; | |
25 | ||
26 | enum { | |
27 | en_stmt_allocated = 0, | |
28 | en_stmt_prepared, | |
29 | en_stmt_executed, | |
30 | en_stmt_cursoropen, | |
31 | en_stmt_fetched, | |
32 | en_stmt_xfetched, | |
33 | en_stmt_needdata, /* not call SQLParamData() yet */ | |
34 | en_stmt_mustput, /* not call SQLPutData() yet */ | |
35 | en_stmt_canput /* SQLPutData() called */ | |
36 | }; /* for statement handle state */ | |
37 | ||
38 | enum { | |
39 | en_stmt_cursor_no = 0, | |
40 | en_stmt_cursor_named, | |
41 | en_stmt_cursor_opened, | |
42 | en_stmt_cursor_fetched, | |
43 | en_stmt_cursor_xfetched | |
44 | }; /* for statement cursor state */ | |
45 | ||
46 | extern RETCODE _iodbcdm_dropstmt(); | |
47 | ||
48 | #endif |