Database Prepared Statement Module - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Connectivity : Database Package : PreparedStatement : Database/PreparedStatement

PreparedStatement - Database Prepared Statement Module

The Prepared Statement Module


A PreparedStatement Module represents an arbitrary SQL statement that contains parameters.  These parameters can be replaced with values at execution time.  This allows the same statement to be re-used.  Depending on the underlying implementation of PreparedStatements, it may be more efficient to repeatedly use a PreparedStatement than to pass strings into a Statement module.


PreparedStatement modules are created using the CreatePreparedStatement command.  This command takes a parameterized string of SQL to prepare.  A call to Execute accepts values, which are inserted into the string to form an SQL statement.


The string passed into CreatePreparedStatement must be a standard SQL string parameterized with "?" (with "?" in place of values).  These "?" will be replaced with the values given to Execute.


Except for the differences in creation and execution, PreparedStatement modules are identical to Statement modules.  The exported members NextResult, SetOptions, GetOptions, and Close in PreparedStatement and Statement modules behave identically.


For information on using the Database package, see the usage page.

A PreparedStatement Module's Exported Commands









See Also

Database, Database[Connection][CreatePreparedStatement], Database[Statement], Database[usage]

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam