Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Canceling form with related table changed

Status
Not open for further replies.

uniglass

Programmer
Jul 21, 2010
27
PL
Hi
Lets say we have invoice form (table_1) and we changed and saved something in related table_2. Now we want to cancel invoice form and roll back all the changes in related table_2.
What is your idea for handling this cancel? We use temporary tables for related records and update table_2 only when request is completed. Other ideas ?

 
Hi!

If the update is done inside a transaction frame, you can roll back the updates. Check out LOGOUT, COMMIT & ROLLBACK in the help.

Regards
 
We use transactions when possible but in this situation it doesn't work.
User's edit form can lock related table for long time. We have other automated processes writing into that tables that won't stop and wait for COMMIT OR ROLLBACK ( scanners reading barcodes)

We tried different isolation levels but SQL manual clarified all.
PostgreSQL Documentation
Chapter 12. Concurrency Control

...
This means it is a bad idea for applications to hold transactions open for long periods of time (e.g., while waiting for user input).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top