This is probably another one that everyone knows except me but here it is.
When I do maintenance, or to fix problems in my Point Of Sale system, I first check that each dbf file exists.
I then run DBRX.EXE to fix all those weird things that happen to DBF files.
So far so good.
If the file has a .cdx index, and most of mine do, I remove it and re-make it.
I've found this to be a good idea for various reasons.
But now my problem.
If the index is missing FoxPro throws up "STUCTURAL CDX NOT FOUND" and won't load the data file.
If the index is out of whack I get "INDEX DOES NOT MATCH DATABASE, RECREATE INDEX" and the data file is not loaded.
What I need to know is, how can one load a data file with missing, corrupt or non matching CDX without the error?
I can't DELETE TAG ALL without first loading the data file and I can't load the data file while its cdx is bad.
In the command window with SET SAFETY OFF a data file will load regardless of the state or existence of the .CDX but this won't work in a program.
I realize I can build a special error trap which looks for related errors (15,19,114,1683,1707) and stops them, but the file still isn't loaded.
Is there some catch or trick that I need to know.
Hope you guys can point me in the right direction.
Ken F
When I do maintenance, or to fix problems in my Point Of Sale system, I first check that each dbf file exists.
I then run DBRX.EXE to fix all those weird things that happen to DBF files.
So far so good.
If the file has a .cdx index, and most of mine do, I remove it and re-make it.
I've found this to be a good idea for various reasons.
But now my problem.
If the index is missing FoxPro throws up "STUCTURAL CDX NOT FOUND" and won't load the data file.
If the index is out of whack I get "INDEX DOES NOT MATCH DATABASE, RECREATE INDEX" and the data file is not loaded.
What I need to know is, how can one load a data file with missing, corrupt or non matching CDX without the error?
I can't DELETE TAG ALL without first loading the data file and I can't load the data file while its cdx is bad.
In the command window with SET SAFETY OFF a data file will load regardless of the state or existence of the .CDX but this won't work in a program.
I realize I can build a special error trap which looks for related errors (15,19,114,1683,1707) and stops them, but the file still isn't loaded.
Is there some catch or trick that I need to know.
Hope you guys can point me in the right direction.
Ken F