Multi Table Update RI Extension |
Ver. 1.0 Contributed by Stephen Pareles |
What
n_cst_dwsrv_multitable
Why
When, in order to enforce business rules, referential integrity constraints have been defined at the database level for specific related tables, the application may have to implement sql insert and delete statements in opposite table order to avoid rejection by the database and consequent error messages. Datawindows have the power to update multiple rows with mixed inserts, deletes, and updates, one table at a time. Although one can modify the update criteria and call the update function after each such modification (with or without benefit of PFC Multi Table Update service) to update more than one table, there is no obvious way to impose different table order typically required for inserts vs deletes in this environment.
The PFC Multitable Update Service is a convenient tool to implement multitable updates with a minimum of scripting. In this article, we provide extensions that also allow the developer easy control of the table update order separately for inserts and deletes. The developer typically only needs to add script to the datawindow controls constructor and sqlpreview events.
How
- Introduction ........................................................... Page 1
- Solutions Based on Hardcoded SQL ................... Page 1
- Limited Solutions Without Hardcoded SQL ....... Page 1
- Overcoming the Limitation .................................. Page 1
- The Tables ............................................................ Page 2
- The Constraints .................................................... Page 2
- Interpretation of The Constraints ....................... Page 2
- Application Objects .............................................. Page 2
- The Solution ......................................................... Page 2
- How the Developer Uses the New Feature ........ Page 3
- Under the Hood .................................................... Page 3
- References ........................................................... Page 3
Download the | About the extension contributor |
Interested in contributing material to this web site? Send an email to submit@pfcguide.com, but don't forget to check the contribution guidelines first.
For information or suggestions about this web site please contact webmaster@pfcguide.com
PFCGuide is
sponsored by Dynamic Technology Group.
The information on this site is provided for advice only and not to be considered a
contract or a liability against Dynamic
Technology Group.