Friday, June 18, 2010

Recovering Access database corrupted because of concatenated fields

MS Access, a part of MS Office product suite, is the relational database management system (RDBMS) from the MS Office. Usually it is but it can be procured separately as well. It is simple to use and is extensively used in other MS Office applications such as Word and Excel for performing backend operations. However, sometimes the Access database can get corrupt due to various reasons such as virus infections, human errors, power surges, abrupt system shutdown while the database is open, etc. In such situations, you should use appropriate corrective measures to sort the issue. However, if you are not able to solve the situation then you should use a third-party Access database repair software to repair Access file.

Consider a scenario wherein you are working on an MS Access database. In this, you have concatenated several text fields in the records. When you open the recordset, you find that the characters appearing after the first 255 characters are distorted and you are unable to understand them.

Cause:
The most possible reason for such kind of behavior is because of incorrect memory assignment. As is mentioned, the characters after first 255 are garbled. This is so because Access has set the limit of 255 characters for the Text field. And when the length is more than 255, then Access returns whatever random character is fetched from the memory after that spot.
The other reason for this error is that the database is corrupt, which is causing the database to behave in this manner.

Resolution:
To resolve this issue, you can use a UNION query with a Memo field. It will force Access to refer the concatenated field as Memo only. It creates a table with similar structure having a Memo field. Although the new table does not have any records, it still forces Access to treat the field as Memo. Due to this, there is sufficient memory to handle the extra characters.

However, if you are not able to resolve the issue even after performing the aforementioned method it means that the database is corrupt. In such cases, you should use a third-party Access repair software. Such read-only tools are able to perform Access file repair using fast yet sophisticated scanning algorithms.

No comments: