hi!
To organize my application, I had my dbf, cdx, fpt, dbc, dcx, dct files in one directory: myData. My main program which is outside myData opens my database with
OPEN DATABASE myData\myDatabase
Everything was running smoothly, when one day I illegally restarted my PC while my program was running by pressing the reset button. When I executed my application to test it again, I was prompted with the error:
Index does not match the table. Delete the index file and re-create the index.
With further reading I found the solution that I needed to delete the .DCX file and I did. That solved some of the problem after I validated the database and was able to fix some of the errors that followed afterwards. With this, I need to know how do you prevent the database from crashing when you illegally shutdown your computer? Any code or algorithm will very be helpful & appreciated.
In connection to my database crashing, here's another situation that I can't solve:
I am 100% percent sure that my CDX files aren't missing from their directories but my program always yields the error:
Structural .CDX file is not found.
When I press IGNORE, my program resumes executing. I cancel the program afterwards, and check my CDX files again - there isn't any cdx file missing that is associated with the database. Also I have rebuilt all the indexes, both CDX and DCX files, but still have the same error whenever I execute my program. How do I get rid of it? Also, is there a way of determining which table's cdx file is missing? How? Thanks a lot!
To organize my application, I had my dbf, cdx, fpt, dbc, dcx, dct files in one directory: myData. My main program which is outside myData opens my database with
OPEN DATABASE myData\myDatabase
Everything was running smoothly, when one day I illegally restarted my PC while my program was running by pressing the reset button. When I executed my application to test it again, I was prompted with the error:
Index does not match the table. Delete the index file and re-create the index.
With further reading I found the solution that I needed to delete the .DCX file and I did. That solved some of the problem after I validated the database and was able to fix some of the errors that followed afterwards. With this, I need to know how do you prevent the database from crashing when you illegally shutdown your computer? Any code or algorithm will very be helpful & appreciated.
In connection to my database crashing, here's another situation that I can't solve:
I am 100% percent sure that my CDX files aren't missing from their directories but my program always yields the error:
Structural .CDX file is not found.
When I press IGNORE, my program resumes executing. I cancel the program afterwards, and check my CDX files again - there isn't any cdx file missing that is associated with the database. Also I have rebuilt all the indexes, both CDX and DCX files, but still have the same error whenever I execute my program. How do I get rid of it? Also, is there a way of determining which table's cdx file is missing? How? Thanks a lot!