Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Losing data - serious problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00554460
Message ID:
00554481
Vues:
12
Hi !
1.You didn't wrote if storage computer has NT server or workstation installed.
If Nt workstation is instaled try to disable disk cache writes.
2. Flush command also sholud help, and writing to log file is good idea.
3. Foxpro is file based Database and you shouldn't trust to much in it, esspecialy in multiuser environment. In my application VFP rather works good but there are sometimes problems like yours.

Greetings

PS. Maybe some know why VFP doesn't check if data are truely on disk.
In VFP help we can read "FLUSH ensures that modifications you make to all open tables and indexes are saved to disk.". It is not always true.
It would be nice if VFP could disabled OS caching while writng data.













>Hi,
>I have a VFP 6.0 laboratory system for grain samples. Tha lab is collecting data about weight, water%, protein etc. It is quite simple with one main DBF. This DBF is FOX2x as I need to read data from another program. There are 10 PCs adding record and updating the file. The volume is about 1500 new samples every day added from 2 of the machines and 3-5 updates on these records from the other PCs. Input is mainly from bar-codes and online weights.
>
>Last monday and yesterday the DBF was truncated in some way. After the first incident I created local logging on each computer, so now I could pick up the missing pieces. Yesterday at 10:11 new records were added from ID 10316 and at 13:26 the new records were up to ID 12612. Then the next record is logged at 15:19 with ID 10316 again!!! (The next ID is picked from the last record+1)
>
>It is a multiuser system with record locking (3) storing data on a Windows NT 4.0 computer. The workstations are Windows NT 4.0.
>
>All appending happens in on place. When clicking New the program does:
> Append BLANK
> replace status with 'X'
> Unlock RECORD 0
> FLUSH
>
>The editing field has the table fields as recordsource. When clicking Save the program does:
>
> If TableUpdate(.T.,.T.)
> If EMPTY(makorn.kornid)
> Do WHILE !FLOCK('ma50')
> Messagebox('Can't save new ID')
> Enddo
> currec=recno()
> cOrder=Order()
> Set order to tag kornid
> Goto bottom && makorn
> nID= makorn.kornid+1
> Set order to tag (cOrder)
> Goto currec
> Replace kornid with nID, regdato with DATE()
> Tableupdate(.T.,.T.)
> Unlock
> Flush
> Unlock in MA50
> .oFrmLogg.Logg('Ny post') &&logg
> Endif
> Else
> Messagebox('Can't save new record')
> Tablerevert(.T.)
> Endif
> Unlock
> Flush
>
>I added the FLUSH after the first incident. One theory is that the PC adding records lost power and the record-counter was never saved. The system has been running daily for almost a month now.
>
>Can you help?
>
>
>Einar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform