DB Validate

Moderator: Rathinagiri

Post Reply
User avatar
esgici
Posts: 4363
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 247 times
Been thanked: 91 times
Contact:

DB Validate

Post by esgici » Sat Aug 10, 2013 11:39 am

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:
DB_ValidTest.jpg
Scren shoot of DB_Valid test
DB_ValidTest.jpg (39.68 KiB) Viewed 1301 times
DBV_Test.zip
Source files of DBV_Test
(12.41 KiB) Downloaded 154 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: 1907
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 319 times
Been thanked: 74 times
Contact:

Post by serge_girard » Sat Aug 10, 2013 12:07 pm

Nice and usefull !

Thx, Serge

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Sat Aug 10, 2013 2:00 pm

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: 4363
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 247 times
Been thanked: 91 times
Contact:

Post by esgici » Sat Aug 10, 2013 3:12 pm

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
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Sat Aug 10, 2013 3:16 pm

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