Choose a DataBlade® API function
The following table shows the functions that the DataBlade®
API provides
to send SQL statements to the database server for execution.
Function | Type of statement | Statement executed many times or contains input parameters? | Query can use implicit cursor? |
---|---|---|---|
mi_exec() | Query Other valid SQL statements | No | Yes |
mi_exec_prepared_statement() | Query Other valid SQL statements | Yes | Yes |
mi_open_prepared_statement() | Query only | Yes | No |
As the preceding table shows, you need to consider the following
factors when deciding which DataBlade®
API statement-execution
function to use:
- What type of SQL statement do you need to send?
- Does your SQL statement contain input parameters?
- If the SQL statement is a query, can you use an implicit cursor to access the retrieved rows?
Choose the DataBlade® API statement-execution function that is appropriate for the needs of your DataBlade® API application.