Page 1 of 1

uaSkip & OldValue

Posted: Mon 04 May 2015 14:05
by Ludek
Hi devart,
i'm currently experiencing following problem:
TMSQuery in cached updates mode, some cached changes. now i need to apply the changes in special order (because of some db logic), first inserts, then updates.
So i use the uaSkip updateaction in updaterecord event for the records, that i need to update in the second phase. But in the second phase, the ".oldvalue" property of query fields already returns the new value, so I don't have enough infos to perform my update...
Is there some way to have the REAL old value in the .oldvalue property?
Thanks, Ludek.

Re: uaSkip & OldValue

Posted: Fri 08 May 2015 12:00
by azyk
You can apply updates firstly for inserted records, then for modified. For example:

Code: Select all

// first phase
MSQuery.ApplyUpdates([ukInsert]);
...
// second phase
MSQuery.ApplyUpdates([ukUpdate]);
See more details about the ApplyUpdates methods in our documentation:
http://www.devart.com/sdac/docs/#devart ... kinds).htm

Re: uaSkip & OldValue

Posted: Thu 15 Dec 2016 08:18
by Ludek
That does not help me. For sdac, all the changes are ukModify. Only internally, in OnUpdateRecord, i generate inserts, updates, deletes (background: the tmsquery contains a left outer join, user just changes data in dbgrid, but i internally do deletes for the records being emptied, inserts for records changed from null to some not null value and updates for changing on not null value to other not null value).
So the question remains: how can I see the "real" oldvalue in onupdaterecord handler in the second run, when the first one ended with uaSkip (because that time it was not yet possible to save them because of some unique constraint and the f*cking sql server not knowing feature called deferred updates...)

Thank you for some tip!
Ludek.

Re: uaSkip & OldValue

Posted: Thu 15 Dec 2016 08:24
by Ludek
btw. I even tried to use uaRetry, but it does retry immediately. I need to retry it after updates of the other unsaved records...

Re: uaSkip & OldValue

Posted: Tue 20 Dec 2016 10:50
by azyk
We are trying to change this behavior and will inform you about the results.

Re: uaSkip & OldValue

Posted: Tue 20 Dec 2016 13:46
by Ludek
Thank you!

Re: uaSkip & OldValue

Posted: Tue 03 Jan 2017 10:01
by Ludek
Hi, are there any news?

Re: uaSkip & OldValue

Posted: Wed 04 Jan 2017 10:13
by azyk
This change will be included in the next SDAC build.

Re: uaSkip & OldValue

Posted: Wed 25 Jan 2017 06:35
by Ludek
Do you have an estimation of availability of the "next build"?
Thanks, Ludek.

Re: uaSkip & OldValue

Posted: Fri 27 Jan 2017 09:27
by azyk
SDAC release is planned in a month.

If you want to get this change before the next SDAC release, please send your license number to andreyz*devart*com and we will send you a night build.

Re: uaSkip & OldValue

Posted: Mon 06 Mar 2017 08:17
by Ludek
hi, much more than a month passed, no new version available ... :x

Re: uaSkip & OldValue

Posted: Tue 04 Apr 2017 12:59
by Ludek
It is really sursprisingly long month from jan 27 to apr 04... and there is still no version. :evil:

Re: uaSkip & OldValue

Posted: Thu 06 Apr 2017 09:27
by azyk
New SDAC 8.0.1 version is available for download.