Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
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
Close
Execute
GetOptions
NextResult
SetOptions
See Also
Database, Database[Connection][CreatePreparedStatement], Database[Statement], Database[usage]
Download Help Document