uaSkip & OldValue
uaSkip & OldValue
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.
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
You can apply updates firstly for inserted records, then for modified. For example:
See more details about the ApplyUpdates methods in our documentation:
http://www.devart.com/sdac/docs/#devart ... kinds).htm
Code: Select all
// first phase
MSQuery.ApplyUpdates([ukInsert]);
...
// second phase
MSQuery.ApplyUpdates([ukUpdate]);
http://www.devart.com/sdac/docs/#devart ... kinds).htm
Re: uaSkip & OldValue
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.
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
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
We are trying to change this behavior and will inform you about the results.
Re: uaSkip & OldValue
This change will be included in the next SDAC build.
Re: uaSkip & OldValue
Do you have an estimation of availability of the "next build"?
Thanks, Ludek.
Thanks, Ludek.
Re: uaSkip & OldValue
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.
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
hi, much more than a month passed, no new version available ...
Re: uaSkip & OldValue
It is really sursprisingly long month from jan 27 to apr 04... and there is still no version.
Re: uaSkip & OldValue
New SDAC 8.0.1 version is available for download.