Board index » off-topic » OldValue is overwritten by NewValue
David M
Delphi Developer |
OldValue is overwritten by NewValue2006-01-10 05:46:29 AM off-topic7 Hi, I'm using D7, on WinXP with Midas2005.dll. Provider options are set to propagateChanges. Client inserts a new record. On my Provider I have an event for BeforeUpdateRecord ... if UpdateKind = ukInsert then begin FOldID := DeltaDS.FieldByName('ID').OldValue; ... In the Provider's AfterUpdateRecord I set the value if UpdateKind = ukInsert then begin DeltaDS.FieldByName('ID').NewValue := FNewID; // where FNewID has been set previously When I now check the OldValue of the Field, it has been changed to the NewValue ! Back on the client when the ApplyUpdates returns, the OldValue and NewValue of the ID field are both set to the same value. How can I extract the OldValue (to update some non data aware objects). Thanks David |