Re: Question regarding EDS
- Posted by jessedavis 1 week ago
- 132 views
I've had a few edita.edb that were corrupt beyond recovery.
I assume db_compress fails, but essentially what that does internally is pretty much the best you can do: read what you can and create a new file.
If, as you say, there are apparently 32,654 tables, you may fare better with a bespoke program that reads the dozen-or-so tables that should exist and does not try to copy the 32,6nn that are gibberish.
Ultimately you have no choice but to delete the corrupt taa.edb - and be thankful this sort of thing does not happen very often.
Yes, I had written a program to open the database and copy the relevant tables into a new database. Not difficult as long as the database will open. I have used the check routine but all it says is that blocks are too big. I have for some time now made automatic backups (saves MANY historical copies) each time any program opens the data base. I do a file_copy BEFORE I open the database. This saves a lot of pain and agony. I guess the thrust of my comment is why do I have these problems. A database is useless if it is not reliable. I like EDS because it is integral. I don't like to carry along extra software with a program. It is also useful for all kinds of temporary storage. I should look at the code for EDS I suppose; but, I'm no programmer. Maybe there is a way to implement checking when reading or after writing the blocks. Anyway, thanks for your help.
Do you have any ideas for alternate ways to implement a database in euphoria?