Foxtrotter,
Foxtrotter said:
Thanks for all the comments. Here's what I know so far. The DBC does have records verified by the USE DBC statement instead of open database.
Please, Foxtrotter, compare the data you have in there in the first few rows with the data of a new empty DBC. There has to be a reason this DBC does not validate as being a DBC. Something must be missing here!
That the DBC table isn't empty is a good sign. In my demo ZAPping the DBC table you get the same error, but that of course doesn't mean the error only occurs, when the DBC table was emptied. It must involve the first 5 records.
The current database has in excess of 218,000 records so it is not an empty shell
You misunderstand. The DBC itself does not hold any data, the data always is in DBFs and their accompanying files.
There can be lots of tables and view, lots of fields and lots of indexes, but 218,000 is way too much. Points out there would be much repetition, eg tables repeated for each year, month or even day.
If you have 218,000 records in the DBC, are most of them with deleted flag? It's a sign the application works a lot with table definitions or view definitions and as I said earlier that's a bad move and sooner or later leads to your problem. The main database file is kind of sacred and should only be changed with application updates needing new or altered tables.
The backup from 2014 seems outdated, but as I also showed, the data about tables can be outdated or wrong about its tables, that doesn't render a DBC invalid, there's more to it.
If you can open the DBC with OPEN DATABASE and get no error, it's worth a try to move just the first 5 records (Objecttype="Database") into the old DBC file as it's five first rows to repair it. Obviously better do so on a copy of the DBC. Or vice versa, keep the first five rows of the backup and append the rest of the data about tables, views, etc., then try your newly created DBC.
But 218,000 rows in the DBC? That doesn't sound right.
Bye, Olaf.