| 1946 | // |
| 1947 | |
| 1948 | static void gen_dyn_fetch( const act* action) |
| 1949 | { |
| 1950 | TEXT s[MAX_CURSOR_SIZE]; |
| 1951 | |
| 1952 | const dyn* statement = (dyn*) action->act_object; |
| 1953 | |
| 1954 | make_name_formatted(s, "ISC-CONST-%s", statement->dyn_cursor_name); |
| 1955 | |
| 1956 | printa(names[COLUMN], true, FETCH_CALL_TEMPLATE, |
| 1957 | ISC_FETCH, |
| 1958 | status_vector(action), |
| 1959 | BY_REF, s, |
| 1960 | BY_VALUE, gpreGlob.sw_sql_dialect, END_VALUE, |
| 1961 | statement->dyn_sqlda ? BY_REF : "", |
| 1962 | statement->dyn_sqlda ? statement->dyn_sqlda : OMITTED); |
| 1963 | |
| 1964 | printa(names[COLUMN], false, "IF SQLCODE NOT = 100 THEN"); |
| 1965 | |
| 1966 | set_sqlcode(action); |
| 1967 | |
| 1968 | printa(names[COLUMN], false, "END-IF"); |
| 1969 | } |
| 1970 | |
| 1971 | |
| 1972 | //____________________________________________________________ |
no test coverage detected