In an attempt to find the cause of our index corruptions we did tests today. Below is our little test program.
When your data is on a Windows 7 station, the APPEND isn't working correctly! Even worse, you never encounter a NETERR(), but not all the records are added. This is a real problem and a bug in Xbase++. If the little program below isn't working, how can we trust our data is written correctly in our DBF files!!!
If a customer uses a shared drive on a Windows 7 PC, your are in trouble!
Code: Select all
use faktuur alias fakt new
set index to fakt1000, fakt2000, fakt3000
// we always use NTX files
for teller = 1 to 10000
fakt->(dbappend())
if fakt->(neterr())
msgbox ("Neterror bij record : "+str(teller))
endif
fakt->volgnr := teller
next
Test 1: (multiple times)
- Database and exe on XP station.
- Sample started on Windows 7 and Vista:
- Result: always 20.000 records, which is expected.
Test 2: (multiple times)
- Database and exe on Windows 7 station.
- Sample started on Windows 7 and Vista
- Result: NEVER 20.000 records, at least 15 records are gone, sometimes even more. There was never a NETERR() !!!!
Test 3:
- Database and EXE on Windows 7 station
- Sample started on two Windows 7
- Result: 19999 records, no neterr().
Test 4:
- Database and EXE on Windows 7 Station
- Sample started on Windows 7 and XP.
- Result: 19998 records, no neterr()
If anyone has some suggestions, please send them.