Board index » delphi » TField.OldValue, TField.NewValue ?
Nelson Chui
Delphi Developer |
TField.OldValue, TField.NewValue ?2003-09-09 09:30:41 AM delphi235 Hi, I have problem in a maintenance program. The problem is caused by the attribute of TField.OldValue and TField.NewValue. I am using IBX 6.05, Inquiry, DataProvider and ClientDataSet for the maintenance program. I do the following editing on a data record. - In BeforePost event (Insert a Record). It seems OK, I input 'A' in a Field named DATAFLD. - DATAFLD.OldValue is NULL - DATAFLD.CurValue is NULL - DATAFLD.NewValue is 'A' - In BeforePost event (Edit the Record again). It also seems OK, I change 'B' in the DATAFLD. - DATAFLD.OldValue is 'A' - DATAFLD.CurValue is NULL - DATAFLD.NewValue is 'B' - BUT, in BeforePost event (Edit the Record again). I change 'C' in the DATAFLD. - DATAFLD.OldValue is 'A' - DATAFLD.CurValue is NULL - DATAFLD.NewValue is 'C' The problem is that when I edit the record second or later time, the DATAFLD.OldValue is still stored in the value same at the Insert record time. Why ? Another question is that why the value of CurValue is always stored the NULL value. Would you let me know the mechanism of OldValue, CurValue and NewValue ? Regards, Nelson. |