Testing database DBF,FPT

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Testing database DBF,FPT

#1 Post by Victorio »

Hi,
Is some way to test if database is not corrupted before open it by USE ?

I have many databases (about 50000) type Foxpro 2.x and VFP. Some of them is corrupted, can open it, but on some place, some record my application crash because have bad connect between DBF and FPT file (most often memo field)
I tested field by empty(), but also crashed.
If I browse database (DCBROWSE...) and listing in it, crashed if positioning on damaged record.

Solution for repair database I have, (I have DBF Recovery from Hibase group, which works perfectly), but I need some function to test database before process it.
Database will be processed on user page, and it is not good if application crashed anytime without warning, then better will be test if first.

I think, it is not simple problem, because I tested several DBF repairing tools, and not work good, some clear memo, some can not read Foxpro 2.x...

One solution can be , if open dbf file, and by work with if before error notification from alaska can show own notification for example "Database is corrupted, please repair it", .
This can be by control only showint specific error notification, where show some of types error notifiation (in text is str or name of corrupted field )

Is it possible ?

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Testing database DBF,FPT

#2 Post by Auge_Ohr »

i wonder why you have so many Data corruption ... that is not normal !

do other User use Excel etc. to access your DBF ?
you might get Data corruption when have Network Problem ... but this is a different Problem.

p.s. i do not know a Way to "check" if DBF is corrupt before USE ... but you can put USE into BEGIN / SEQUENCE
greetings by OHR
Jimmy

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: Testing database DBF,FPT

#3 Post by Victorio »

Hi Jimmy,

I know, it is not normal but this databases was generated from year 1994 to today on several version of applicaton in throughout the country (about 80 offices). Was used DOS Foxpro version on Novell netware and later on Windows network on Visual Foxpro. Software sometimes write not correct data do database by hw problem, transaction problem, crash system and other. Now we must collect every data, importing to my application and damaged database need repair. Some part of data will lost , but it is small part of every data.

BEGIN SEQ - this can help me i know often errors, I will try, thank´s

Post Reply