Page 1 of 1

Cached Updates and the order of commands

Posted: Fri 12 Dec 2008 08:45
by Ludek
Hi, in cached updates I need to first apply all inserts to the db, then the modifications and deletions. How can I do that?
Thanks, Ludek.

Posted: Fri 12 Dec 2008 14:22
by Dimon
To solve this task you should handle the TMemDataSet.OnUpdateRecord event, which is rised when applying cached data.
You can find more detailed information about this event in the SDAC help.

Posted: Sat 13 Dec 2008 13:39
by Ludek
That's what I wanted to have - change the order of records, that appers in the event - force deletions to be the last kind of updates in the event handler.
And that's not pissible, is it?

So there's only one way - to use uaSkip for deletions and call the ApplyUpdates twice - second time for the remaining ukDelete records... ?

Posted: Tue 16 Dec 2008 12:14
by Dimon
Yes, you are right. You can't do it directly - only by ApplyUpdates twice.