Use the SAVE-ROW-CHANGES method in the update procedure
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
If you open up the updateOrder.p procedure
again, you can replace the whole CASE statement
with the SAVE-ROW-CHANGES method, as shown:
|
You can save this and rerun the window procedure
to confirm that the save works the same as before. SAVE-ROW-CHANGES saves you
all the work of the steps you coded individually in the CASE statement.
You can still take advantage of the attributes and methods you used
if you need to perform some part of the work of SAVE-ROW-CHANGES without
using all of what it does. The default transaction handling is to
treat each individual row save as its own transaction. If you want
a larger transaction scope, you can define the DO TRANSACTION block
at the level that is appropriate. Remember that there is no SAVE-CHANGES method
to apply all changes in a single method call because there is so
much variety both to the order in which the changes should be applied
and to the transaction scope used for the changes.