Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning code after sucessful insert
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00450463
Message ID:
00450469
Vues:
36
>Is there a way to determine if an insert in vfp table was successfull or not? Does an successful insert (or not successful) generate a code? Help appreciated
>
>Nick Patel

If it doesn't throw one of the File in Use errors, it is safe to say it worked. The reason I say this is INSERT INTO locks the table header, appends a record and changes the header to reflect the new table information. It then unlocks the header. If it can perform the lock on the file, it can insert the record.

Having said that, there is the off-the-wall error condition that Doug Hennig has posted. If you have a corrupt table header, inserts will look like they worked and tableupdates will return .T. but the table will not be updated. Yo can do a search on his messages and tableupdate to find the exact fix for that condition.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform