Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
REPLACE problem - weird (I think)
Message
De
02/07/1998 11:42:13
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00113674
Message ID:
00113808
Vues:
22
Thanks for your detailed reply. I told you that my brain was fried. I looked at that help file multi times yesterday and missed that note each time (slapping keyboard against head in frustration). That is exactly the situation I have. I will be adding the IN clause to ensure that the REPLACE is made. But just for the fun of it, I also added a GO TOP statement right after the ELSE and that also worked thus proving your point. Thanks again.

>Hi,
> As others have noted you will be at EOF() if the seek fails, and you cannot write to the phantom record (term for empty record that appears to be at end of table). The other bit of info that you are missing is in the help file
>
> Note If the IN clause is omitted, no replacement occurs if the record pointer is at the end of the file in the current work area and you specify a field in another work area.
>
>So you need to ensure that the table you are trying to replace in is not at EOF, and you should use the IN clause to allow replacements to occur in a different table than that which is selected without having to worry that the current table may be at EOF. This is a well known FoxPro bug, the IN clause is the new work around.
>HTH,
>Ned
***************************
Bruce Gilmour

"Two things are infinite, the Universe and human stupidity. And I am not sure about the Universe."
- Albert Einstein
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform