I have to check upon saving my 4GL program if changes were actually made in this update. Sometimes users will just update and save but no updates were actually made to the tables.
I would assume that throughout the update it must do a commit work
to roll the changes into the table.
Is there any way for me to check at the end of the update if something actually got committed? Or? Any other suggestions?
I can't save previous_data
and then compare with current_data
since there are so many code in different places where updates can be done.
Thank you!
You can check the SQLCA record for the number of rows affected by the UPDATE immediately after it completes and before you do any other SQL operation (such as COMMIT). That may still count identity 'changes', but it the closest approximation to what you want that is available.