>Hi,
>
>I am trying to understand something about how VFP moves record pointer during update. I have tracked the following change but need to understand what happens:
>
>1. The program adds a new record to a table (the table has 100 records). The new record gets RECNO() -1.
>2. For whatever reason TABLEUPDATE() fails (e.g. duplicate key field)
>3. After call to TABLEREVERT() the current record RECNO() is now 101. And it looks like the record is completely empty, that is as if the record pointer moved to a phantom record (next to EOF().
>
>Is this how VFP works by design? Could someone explain this?
>
>TIA>
I always save current record before tableupdate and if it's within the 1 and reccount('MyAlias') restore it back after tableupdate. The tableupdate moves pointer to EOF.
If it's not broken, fix it until it is.
My Blog