>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)