Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TABLEUPDATE(2,.T.) leaves records that are not updated
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00500580
Message ID:
00500667
Vues:
29
>>Snip
>>
>>Using TableUpdate(2) is supposed to update all possible and ignore errors. After the TableUpdate() if not all records were committed, you cannot change buffering because you still have uncommitted changes in the buffer. You can check for this with GetNetModified(). If you have uncommitted changes, you can TableRevert() them. Or try to fix the error that prevented the change. I had trouble with the cErrorArray parameter in VFP5 and never tried it again in VFP6, so I loop through using GetNextModified() and a single record TableUpdate().
>>
>>HTH,
>
>
>Hi Bill,
>
>That's what I figured as well. I din't know AERROR() is unreliable, and I had hoped to avoid the GetNetModified(), because one could end in a forever loop.
>
>Any ideas as to that?
>
>Greetings

Hi Peter,

No, AError() is not unreliable. THAT, I've never had problems with. There is an optional parameter in TableUpdate() cErrorArray that I had trouble with. I should test it again, but my current process works.

I guess I'm missing something here, GetNextModified(0) returns the first modified record. You decide what to do with it. i.e. Fix the error (which you can find by doing a TableUpdate(1)) or cancel the changes with TableRevert(.F.).
Then, call GetNextModified(RecNo) passing the RecNo of the record you just processed. You do this until GetNextModified() returns 0.

HTH,
Bill Armbrecht
VFP MCP
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform