Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table not updating, but fixed with table replacement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Stonefield
Divers
Thread ID:
00754090
Message ID:
00754126
Vues:
26
Hi Jon.

>Records not being added to 2 tables out of 8 during a transaction.

This is usually caused by header damage, so SDT's Update method won't resolve the problem (it likely doesn't think the structure of the table needs to be changed). Instead, use the Repair method, which will fix this problem.

>Yes it now works, but my nagging issue is what was the problem and how can I validate that the problem does not exist in the future?

The problem was most likely that the record count in the header was incorrect. This is an ugly problem, since as you've seen, VFP doesn't give an error when you open the table and TABLEUPDATE() returns .T. A new feature in VFP 8 is that it warns you about this problem when you open the table, but doesn't fix it. The only way to detect it is to check RECCOUNT() and compare it to the size of the table. See the VFP help topic for RECSIZE() for a formula to calculate how big the file should be based on RECCOUNT(), which you can then compare to the actual size retrieved using ADIR().

Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform