| 2019 | // |
| 2020 | |
| 2021 | static void gen_dyn_execute( const act* action) |
| 2022 | { |
| 2023 | TEXT s[MAX_CURSOR_SIZE]; |
| 2024 | gpre_req* request; |
| 2025 | gpre_req req_const; |
| 2026 | |
| 2027 | const dyn* statement = (dyn*) action->act_object; |
| 2028 | const TEXT* transaction; |
| 2029 | if (statement->dyn_trans) |
| 2030 | { |
| 2031 | transaction = statement->dyn_trans; |
| 2032 | request = &req_const; |
| 2033 | request->req_trans = transaction; |
| 2034 | } |
| 2035 | else |
| 2036 | { |
| 2037 | transaction = names[isc_trans_pos]; |
| 2038 | request = NULL; |
| 2039 | } |
| 2040 | |
| 2041 | if (gpreGlob.sw_auto) |
| 2042 | { |
| 2043 | t_start_auto(request, status_vector(action), action, true); |
| 2044 | printa(names[COLUMN], false, "IF %s NOT = 0 THEN", transaction); |
| 2045 | } |
| 2046 | |
| 2047 | make_name_formatted(s, "ISC-CONST-%s", statement->dyn_statement_name); |
| 2048 | |
| 2049 | printa(names[COLUMN], true, |
| 2050 | statement->dyn_sqlda2 ? |
| 2051 | "CALL \"%s\" USING %s, %s, %s, %d, %s, %s" : |
| 2052 | "CALL \"%s\" USING %s, %s, %s, %d, %s", |
| 2053 | statement->dyn_sqlda2 ? ISC_EXECUTE2 : ISC_EXECUTE, |
| 2054 | status_vector(action), |
| 2055 | transaction, |
| 2056 | s, |
| 2057 | gpreGlob.sw_sql_dialect, |
| 2058 | statement->dyn_sqlda ? statement->dyn_sqlda : OMITTED, |
| 2059 | statement->dyn_sqlda2 ? statement->dyn_sqlda2 : OMITTED); |
| 2060 | |
| 2061 | if (gpreGlob.sw_auto) |
| 2062 | printa(names[COLUMN], false, "END-IF"); |
| 2063 | |
| 2064 | set_sqlcode(action); |
| 2065 | } |
| 2066 | |
| 2067 | |
| 2068 | //____________________________________________________________ |
no test coverage detected