Using isc_dsql_execute_immediate()
Go Up to Method 1: Non-query Statements Without Parameters
- To execute a statement string a single time, use
isc_dsql_execute_immediate()
: - Elicit a statement string from the user or create one that contains the SQL statement to be processed. For example, the following statement creates a SQL statement string:
char *str = "UPDATE DEPARTMENT SET BUDGET = BUDGET * 1.05";
- Parse and execute the statement string using
isc_dsql_execute_immediate
():isc_dsql_execute_immediate(status_vector, &db1, &trans, 0, str, 1, NULL);
- Note:
isc_dsql_execute_immediate()
also accepts string literals. For example, isc_dsql_execute_immediate(status_vector, &db1, &trans, 0,"UPDATE DEPARTMENT SET BUDGET = BUDGET * 1.05", 1, NULL);
For the complete syntax of isc_dsq_execute_immediate()
and an explanation of its parameters, see API Function Reference.