Cached Updates - OldValue property upon record insert is not NULL 
Author Message
 Cached Updates - OldValue property upon record insert is not NULL

I'm making extensive use of 2.0's cachedupdates feature and have
encountered an unexpected behavior in the OldValue property of the
TField component immediately after a record insert. Instead of NULL, the
value of the OldValue property is the OldValue value of the record the
cursor was pointing to immediately before the insert operation. This
seems counter-intuitive to me. Do you suppose this is a bug or something
the Borland designers consciously meant to do? Since much of the
validity checking routines I've written start with "OldValue <>
NewValue" before proceeding, I've had to write a function that goes
something like this:

function GetTrueOldValue(Field: TField): Variant;

if Field.DataSet.State = dsInsert then
        Result := Null
else Result := Field.OldValue;


Any similiar experiences or observations on the subject would be greatly

Thu, 02 Sep 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Prob: Cached updates and OldValue Method corrupts BDE buffers

2. Cached Updates QUESTION: Sorting table of updated and non-updated records

3. Cached updates: how to retain insert mode when post fails

4. Cached updates and Memo fields not working

5. Win95/Novell read cache not updating

6. Record Lock in cached update when using updateobject

7. Cached Updates: deleting records

8. cached updates + locked records

9. Using UpdateSQL for updating cached records

10. Cached Updates Problem: Missing Records - Bogus RecordCount

11. TTable Cached update record lock

12. Which record caused an error using cached updates?


Powered by phpBB® Forum Software