+ Reply to Thread
Results 1 to 6 of 6

Database was corrupted - advice on how to avoid this in the future?

  1. #1
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    147

    Database was corrupted - advice on how to avoid this in the future?

    I built a database in 2007, saved as a 2003 DB.

    It is simple, only 4 tables, 2 forms, and 2 queries. One of the tables links to an external Oracle table.

    I copied the DB and placed it on a shared corporate network drive. Later that night I tried to access it remotely using my VPN client, it was taking forever to open as the VPN runs through an Aircard and is a slow connection (still, DB is only 4 MB)

    took forever, I got impatient, hit close on the DB, got the "program not responding", hit ok to shut it down.

    Come in to work today and was told by access users with 2003 that they cannot open it, they get a message saying it was corrupted and needs to be compacted/repaired. That doesnt work.

    Opens ok for me in 2007, but I did get the message about it being corrupted but I was still able to use and seemed fine.

    Not a big problem, I have it backed up and will replace.

    However, this concerns me - didn't realize access was so finicky and could be easily corrupted like this. I am afraid that in the future this might happen again and won't have a recent backup.

    So I am looking for:
    -tips to minimize chances of corruption
    -suggestions on ways to ensure it is routinely backed up other than manually setting myself a reminder to do it everyday or weekly.

    thanks

  2. #2
    Registered User
    Join Date
    03-20-2008
    Location
    Buffalo, NY USA
    Posts
    43

    Re: Database was corrupted - advice on how to avoid this in the future?

    Access can definitely be prone to corruption in a multi user environment, although I don't think the multi use part is what caused your issues. It (like many applications) can corrupt if not shut down properly. My biggest tip to avoid user caused corruption is to force a lot of saves for the user. In my travels my biggest corruption casue is when two users try to change the same record.

    Here is some code to a .vbs script that I wrote tat is used to automate a backup. I then set a scheduled task to run this once a day. All you have to do is change the 3 variables (two path names, one db name) to your values.

    Please Login or Register  to view this content.
    Last edited by bhill; 05-11-2009 at 08:14 AM.

  3. #3
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    147

    Re: Database was corrupted - advice on how to avoid this in the future?

    I appreciate this help - seems like exactly what I need. however, I dont' understand VB in access yet. I can use it ok in Excel, but don't get it in Access yet. Any good links giving tutorials? I have the Access Bible but that seems to have jumped some key parts I am missing. thanks

  4. #4
    Registered User
    Join Date
    03-20-2008
    Location
    Buffalo, NY USA
    Posts
    43

    Re: Database was corrupted - advice on how to avoid this in the future?

    This is actually a script outside of Access. It can be used to copy any file, not just a database. In my case, I use it to do exactly what you are looking for, make a backup copy of a db. Just copy/paste the text into notepad and save the file as .vbs. You'll need to change the variables to your values. If you double click the file, it will run the code. When you right click the saved file, there is an option to edit, if you need to change it in the future. You can then schedule a task in your computer's task manager to run the script whenever you need.

    As far as tutorials and books, I learned from a book called Beginning VBA by Wrox. It was an Access 97 book focusing primarily on code, but I'm sure they must have revised it for newer versions. The book uses a simple approach to coding forms to simply access data as well as getting into record manipulation through code - it's a great basics approach for when you start to outgrow the wizards in Access. I also borrowed a lot of ideas from merely searching the web. I'm sure the moderators will hate me for this, but there is a great Access specific forum called mdbmakers.com that I rely on heavily (I do think this forum is off to a great start though!).

  5. #5
    Forum Contributor
    Join Date
    03-12-2004
    Posts
    147

    Re: Database was corrupted - advice on how to avoid this in the future?

    Awesome... works perfectly. Now, about that "automating through Task Manager"... any more wisdom to share? How exactly do I go about that?

    I googled already... only found programs to pay for to automate more complex tasks.

  6. #6
    Registered User
    Join Date
    03-20-2008
    Location
    Buffalo, NY USA
    Posts
    43

    Re: Database was corrupted - advice on how to avoid this in the future?

    Here's the MS KB on the Task Scheduler (sorry about calling it Manager - that may have thrown you off). It's a component installled with Windows - no need to pay for anything unless you really want to get advanced with this type of stuff.

    http://support.microsoft.com/kb/308569

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1