Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Corrupt DBF
Message
De
23/08/2011 23:36:58
 
 
À
23/08/2011 13:47:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Divers
Thread ID:
01521606
Message ID:
01521668
Vues:
48
Strtofile gave me sometimes "File is in use by another proccess" sometimes in this scenario. TEXT...ENDTEXT too.
>Since this a log file, have you considered using Strtofile() instead, to simply append to a text file? I haven't heard about any corruption in a text file.
>
>>The rebooting is not caused by the program, it existed long before. I'll usually do it but the contract specifies just that the program should read teh data , save it to FTP and restart by itself when the machine reboots. The harware guys of the customer seems to be happy with the device behavoir and my program performs well, its just that I like to have a log table :)
>>
>>>I would try to find out why. You are trying to eliminate the consequences of a serious problem, I would try to fix the problem instead. Are other applications involved? If not, it sounds like a problem with dangling references.
>>>
>>>>Its a machine who receives signals from an external device. It usually HAS to reboot, don't ask me why :)
>>>>>As Sergey pointed out, close the table immediately after the insert.
>>>>>
>>>>>However, if the machine is frequently rebooted or has the power shut off, I would found other clients to work for.
>>>>>
>>>>>NB! What about using a UPS?
>>>>>
>>>>>>Thats what I'm using, but it keeps getting corrupted
>>>>>>>I prefer to use the SQL Insert command instead. I have found it to be much safer compared to the old fashioned Use-Append blank-Replace way.
>>>>>>>
>>>>>>>>I tought about that, and Ill do that change. I hope that don't add much to execution times. Thanks
>>>>>>>>>To minimize possibility of corruption, don't keep the table open all the time: Open table, Add record(s), Close.
>>>>>>>>>
>>>>>>>>>>I'm using a small, quick and dirty prg to do some data transforming and I have a small function call log wich simply adds an event to a dbf log table . The production machine is often rebooted or the power is cut (that can't be changed). When that happens, the log dbf becomes corrupt (it is always opened during the program execution and the program is designed to run all the time).
>>>>>>>>>>Is there a way to ensure that the DBF not become corrupt after a reboot or system hang?
>>>>>>>>>>
>>>>>>>>>>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform