UpdatesPending

jlcox

Member³
I have two queries in a Master-Detail relationship, both with cached updates. I'm trying to make sure the user has a chance to post any unsaved information when closing the form by checking the return value of TOracleDataSet.UpdatesPending. I find that the return value is always false, even when the dataset is in edit mode and information has been modified.

I even changed the values of several fields in code to see if the dataset wasn't detecting the changes in the data-aware controls, and get the same result. The return value is always false.

Am I misunderstanding the purpose of this function?
 
The UpdatesPending function indicates if there are any records in the local change log that need to be applied to the database. This does not include the record that is currently is being edited, because these changes have not been posted to the change log yet. To check for changes, you can use an expression like UpdatesPending or (State in [dsEdit, dsInsert]).

------------------
Marco Kalter
Allround Automations
 
Back
Top