Thursday, June 10, 2010

Repairing corrupt Access 2010 (Beta) database when different number of records are displayed

Indexing in MS Access databases is a very convenient and efficient practice especially when you have a large database. Because of indexing, searching specific records is very easy as you just have to locate the index of that record thereby improving the performance of the database. However, sometimes the indexes do get corrupt due to various reasons like virus infections, simultaneous modifications from multiple users, abrupt system shutdown, etc. In such cases, you should perform appropriate corrective measures to rectify the problem. However, if you are unable to do so then you should use a third-party Access file repair software to repair Access file.

Consider a scenario wherein you are working on an Access 2010 (Beta) database table. You are quering the table to fetch some records. However, the number of records are getting displayed different every single time depending upon which clause you are using to sort them.

Cause:
The root cause of this situation is that the indexes of the table in the database have corrupted.

Resolution:
To resolve this situation, you should perform the following steps:
  • Open the database and delete any relationships that this table has been involved in from the Relationships window. You can access the Relationships window by clicking Database Tools->Relationships on the Ribbon.
  • Open the table in Design view.
  • Open the Indexes box from the Table Tools option on the Ribbon.
  • Save and close the table.
  • Select the table in the Nav Pane.
  • Copy and paste the contents using a new name and selecting Structure Only option.
  • Create a query in the original table and check if the all records are displayed. Also, check if sorting is happening properly.
  • Change the query to an Append query to be appended to the new table.
  • Run the query.
  • After confirming that all the data has bene copied in the new table, delete the old problem table.
  • Compact the database to remove any kind of discrepancies that were caused by the problem table.
  • Rename the new table as the name of the old table.
  • Recreate all the indexes and relationships.
The aforementioned steps should resolve the issue and the table should function properly. However, if you are unable to resolve the issue then you should use a third-party Access database repair software to repair Access file.

No comments: