Execute prepared SQL statements
A prepared statement is an SQL statement that is parsed and ready for execution. For these statements, you prepare the statement once and execute it as many times as needed.
The DataBlade®
API provides
the following functions to execute a prepared SQL statement.
DataBlade® API function | Step in prepared-statement execution |
---|---|
mi_prepare() | Prepares a text representation of the SQL statement to execute |
mi_statement_command_name(), mi_get_statement_row_desc(), or input-parameter accessor function (Input-parameter information in the statement descriptor) | Obtains information about the prepared statement |
mi_exec_prepared_statement() or mi_open_prepared_statement() | Sends the prepared statement to the database server for execution |
mi_drop_prepared_statement() | Releases prepared-statement resources |