DB Validate

Moderator: Rathinagiri

Post Reply
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

DB Validate

Post by esgici »

Hi all

Damaged data files are nightmare of programmers :(

This little work try testing a .dbf file for validation.

No perfect nor claim to find all problems; simply try help as far as possible.

As always, all bug reports, critics and suggestions in any kind are welcome :arrow:
Scren shoot of DB_Valid test
Scren shoot of DB_Valid test
DB_ValidTest.jpg (39.68 KiB) Viewed 7846 times
DBV_Test.zip
Source files of DBV_Test
(12.41 KiB) Downloaded 491 times
Happy HMG'İng :D

PS: DB_Validate is a enhanced version of a lib routine with same name in LL_DBU.
Viva INTERNATIONAL HMG :D
User avatar
serge_girard
Posts: 3158
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: DB Validate

Post by serge_girard »

Nice and usefull !

Thx, Serge
There's nothing you can do that can't be done...
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

DB Validate

Post by Pablo César »

Esgici wrote:Damaged data files are nightmare of programmers
Yes, it is !
Would it be good to find a function that could reconstruct the structure of dbf and could take all data and replace in a corrected structure. As FixFile of old Norton Guide. :)
Esgici wrote:This little work try testing a .dbf file for validation.
In Stru.prg there is a function that recognize the type of dbf and check if memo file is missing, then it is created according the dbf type. But is creating a empty memo just to be able to open the dbf.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: DB Validate

Post by esgici »

Pablo César wrote:
Esgici wrote:Damaged data files are nightmare of programmers
Yes, it is !
Would it be good to find a function that could reconstruct the structure of dbf and could take all data and replace in a corrected structure. As FixFile of old Norton Guide. :)
Esgici wrote:This little work try testing a .dbf file for validation.
In Stru.prg there is a function that recognize the type of dbf and check if memo file is missing, then it is created according the dbf type. But is creating a empty memo just to be able to open the dbf.
Hi Pablo

Thank to your interest :)

As name implied, mission of this function is only check and report validity of a .dbf file; not fix probable hazards.

As you noticed, there are clever programs, works to repair tables.

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

DB Validate

Post by Pablo César »

esgici wrote:As you noticed, there are clever programs, works to repair tables.
Yes, ia pity there is no solution does not pay ... :(
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply