]>
Commit | Line | Data |
---|---|---|
7e616b10 RR |
1 | #ifndef _HSTMT_H |
2 | #define _HSTMT_H | |
1a6944fd | 3 | |
7e616b10 | 4 | #include <config.h> |
1a6944fd | 5 | |
7e616b10 RR |
6 | #include <isql.h> |
7 | #include <isqlext.h> | |
1a6944fd | 8 | |
7e616b10 | 9 | typedef struct STMT |
1a6944fd | 10 | { |
7e616b10 | 11 | int type; /* must be 1st field */ |
1a6944fd | 12 | |
7e616b10 | 13 | struct STMT* next; |
1a6944fd | 14 | |
7e616b10 RR |
15 | HERR herr; |
16 | HDBC hdbc; /* back point to connection object */ | |
17 | HSTMT dhstmt; /* driver's stmt handle */ | |
1a6944fd | 18 | |
7e616b10 RR |
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 */ | |
1a6944fd RR |
24 | } STMT_t; |
25 | ||
7e616b10 RR |
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(); | |
1a6944fd RR |
47 | |
48 | #endif |