Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recno() after Tablerevert() question
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01448538
Message ID:
01448542
Vues:
41
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform