Access Corruption Avoidance Tip #2: Avoid Dangerous Data
Mon 22nd December 2008
In the second of our articles on avoiding Access database corruption, we explore some data types that are more subject to corruption. The best choice is simply to avoid them. However that's like saying, "The best way to avoid an auto accident is not to drive your car." Access database courses will show you how to use these data types, but we will show you how to use them safely.
Memo Fields
Memo files can indirectly cause corruption of the entire database. Even if you can repair the damage, contents of the memo fields are often lost. If you had important data stored there, it is gone. What do you do if you need to store large amounts of text in a record?
One alternative to memo fields is to store the text as an OLE object in Word format. This substantially reduces the chance of data corruption and is a more efficient method of storing a lot of text. Using OLE objects is a technique from advanced Access database courses.
If you still need memo fields, don't put them in the main table. Store them in a separate table with a one-to-one relationship with the table using them. This way if the memo table gets corrupted, your other data is safe. Add more protection by splitting the memo table into a separate file stored on your back end.
Picture Files
Access database courses demonstrate how to include graphics such as JPEGs or GIFs in your applications. This might be a product picture in a catalog, an employee photograph, or document scans. While there are many applications where graphics are useful, those files are another big source of corruption. Again the ideal choice is to avoid them but if you need to use them, protect the rest of your database.
The solutions for using graphics in your Access database are similar to those for memo fields. Store your graphics is a separate table with a one-to-one relationship with the main data table. Put the table in a separate file stored on your network back end server.
Access 2007 Attachments
If you took an Access database course that covered Access 2007 then you would have learned about a new feature: attachments. An attachment is a way of using an outside resource that is less clumsy and less storage intensive than using OLE objects. Unfortunately, they are just as subject to corruption. How do you deal with attachments? You guessed it - a separate table in a separate file.
If you use multiple types of data, they should each have a separate table and a separate file. For example if using both memo fields and pictures you would have a database file for each in addition to your main file. Remember that corruption can destroy the entire table so the more separation you have the more you contain the damage.
You have permission to publish this article for free providing the "About the Author" box is included in its entirety.
Do not post/reprint this article in any site or publication that contains hate, violence, porn, warez, or supports illegal activity.
Do not use this article in violation of the US CAN-SPAM Act. If sent by email, this article must be delivered to opt-in subscribers only.
If you publish this article in a format that supports linking, please ensure that all URLs and email addresses are active links, without the rel='nofollow' tag.
Software Training London Ltd. owns this article. Please respect the author's copyright and above publication guidelines.
If you do not agree to these terms, please do not use this article.
The Royal Society Senior Policy Asviser Zoe Davies
"Really great - just felt like some aspects of the more techy sides of project management were skimmed over a bit quickly, but itโs ok as I can revisit the resources online."
Greater London Authority Press Officer Maisie Post
"It was my second year, great recap"
The United Synagogue HR Business Partner Magda Mucharzewska
"Loved Karen so much. Best trainer and absolutely knowledgeable."