Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to avoid table corruption
Message
De
17/03/2005 10:40:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 4.x
Database:
Visual FoxPro
Divers
Thread ID:
00996796
Message ID:
00996805
Vues:
14
This message has been marked as the solution to the initial question of the thread.
>I would like to know what is the best way to avoid corruption of tables.
>
>I made an application where the user can sell tickets, and because there is no "saving" method, I use no table buffering, to make it simple. I just replace the number of tickets in the field when the sale is done.
>
REPLACE TotalSold WITH TotalSold + 1 IN Shows
>THISFORM.REFRESH()
>When the table is open without buffer, I can see when another user updates the number of sold tickets. (The form displays the total number of sold tickets from that field.)
>
>However, i am concerned that because I don't use buffering table corruption might occur when the network connection breaks down or the computer crashes. Is it better to use always table buffering (5) and would this avoid corruption, or are there other ways to avoid corruption?
>
>Thanks for your input.

I think it helps if you use the FLUSH command. If you use buffering, right after a successful TableUpdate(). If you don't use buffering, right after the REPLACE.

You would also be safer if you turn of write-cache on your hard disk.

I don't know if buffering would make any difference in your level of safety.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform