Prepared execution
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Use prepared execution when you must execute the same
SQL statement repeatedly. Prepared execution avoids the overhead
of creating multiple SQLIStatement objects for
a single statement.
There is an advantage to prepared execution when you execute the same SQL statement from within a loop. Instead of creating an object with each iteration of the loop, prepared execution creates an object once and supplies input parameters for each execution of the statement.
Once a stored procedure creates an SQLPStatement object,
you can execute the object multiple times, supplying different values
for each execution.
The following example extends the previous example to use prepared execution.
|