This issue cannot be repaired because the database is corrupted. The only solution is to restore data from the latest backup and continue from there. Follow the below steps to resolve the error:
From the company select page, click Create and add in a new company database into the directory.
Restore your last backup data into the new company in the directory.
Delete the old faulty company database from the directory.
