407-248-1481

QuoteWerks Knowledgebase Topic (Article ID 6075)

Database - Corrupt QuoteWerks Database, Possible Causes

This information applies to :

Article ID
6075

Created/Updated
December 12, 2019

Category
Troubleshooting


Are you using the most current release of QuoteWerks?
Version 24.0 Build 4
Issue:
My "Docs.mdb" or other database file has become corrupt. How do I repair it?

Resolution
Typically, running maintenance with the QuoteWerks Medic Utility will fix a corrupt QuoteWerks database. If the Medic is unable to repair the database, a compact and repair in Microsoft Access can generally resolve the issue.

Question:
Why did my database become corrupt?

(The information below has been adapted from a Microsoft knowledgebase article. It references the docs.mdb file as this is the database that usually becomes corrupt since it is the "workhorse" of QuoteWerks and users are constantly reading, modifying and deleting records from it:)


Answer:

Typical Causes of .mdb File Corruption - There are four main causes of corruption in Access/Jet .mdb files.

Database Is Suspect/Corrupted Because of Interrupted Write Operation

Correct shut down that is completed by clicking Exit or Close on the File menu, is highly recommended. However, if a database is open and is writing data when Access is incorrectly shut down, the Database Engine may mark the file as suspect/corrupted. This can occur if the computer is manually turned off without first shutting down Windows or if power is lost. Other situations may not shut down Access but may still interfere with the writing of data to the disk while the database is open. This can occur, for example, when networks experience data collisions or when disk drives malfunction. If any of these interruptions occur, then the database engine may mark the database as potentially corrupted.

When you begin a write operation, it sets a flag and then resets the flag when the operation is complete. If a write operation is interrupted, the flag remains set. When you try to open that database again, the database engine determines that the flag is set and then reports that the database is corrupted. In most cases, the data in the database is not actually corrupted, but the set flag alerts that corruption may have occurred. In cases such as this, if you compact and repair, you can typically restore the database.

Faulty Networking Hardware
In this case, file corruption does not involve the database engine. Rather, the file is literally corrupted by some outside cause. The cause can be one or more links in the hardware chain between the computer that the database resides on and the computer that has the database open. This list includes, but is not limited to, network interface cards, network cabling, routers, and hubs.

Hardware-based corruption is typically indicated by .mdb files that cannot be restored through the use of compacting and repairing, Hardware corruption typically occurs until the responsible hardware is repaired or is replaced.

Opening and Saving the .mdb File in Another Program Other than MS Access
There is no way to recover a .mdb file that is opened and then is saved in a different program. For example, Microsoft Word permits you to open an Access database, and then to save it. (No purpose is served if you open a .mdb file in another application because all you see are extended characters.) Saving the file this way causes the .mdb file to prompt you for a database password when you try to open the file in Access. This occurs although the file may have never been password protected in Access. The password prompt occurs in such cases because the first byte range that Access checks when it opens a file is the location where the database password is. If that byte contains corrupted data, Access treats the file as password protected. Even if there was a way to get around the password prompt in this case, the database is still unrecoverable because the binary structure is scrambled and therefore unreadable to Access. You must recover a backup copy of the file as the only solution in this case. For additional information about this issue, click the article number below to view the article in the Microsoft Knowledge Base: 243895 ACC2000: Database Password Appears Even Though It Was Never Set

Mismatched Versions of the Jet Database Engine
If you run different versions of the Jet Database Engine in your environment, you can also cause corruption of an Access database. Different versions of Jet write to the database differently, and therefore can be the cause of corruption in a database.

How to Determine What Users/Workstations Are Causing the File to be Marked Suspect

When you troubleshoot to find out what is causing database corruption, in some cases you may have to see who is logged into the database. With Microsoft Visual Basic for Applications in Access 2000, you can output a list of users who are logged into a specific database.

For additional information about how to do this and example code, click the article number below to view the article in the Microsoft Knowledge Base:
198755 HOW TO: Check Who Logged into Database with Jet UserRoster in Access 2000


Methods That Can Be Used to Prevent Corruption

- Avoid the loss of power during database writes. If power is lost during a database write, this can cause the database to be left in a suspect state.

- Avoid dropping network connections.

- Avoid incorrect termination of Microsoft Jet connections such as power loss, manual shutdown, or allowing Task Manager to shut down the application.

- Fatal system errors almost always cause incorrect termination. If your database is prone to fatal errors, you must resolve the errors before the database becomes too damaged to open or to recover.

- Compact the database frequently.

- Verify that the latest Microsoft Jet Service Pack is installed on all client machines that access the database file.

New Search