Corrupted database - silly question?

David Trickett

Registered User.
Local time
Today, 07:51
Joined
Nov 20, 2002
Messages
16
This may sound silly, but does anyone know how I can generate a corrupt (repairable) database?

There is a good reason - the database at the office gets corrupted from time to time & I would like to try to give my users a more helpful error message than the Access version!

I'm using Ac97 btw.

Thanks

David Trickett
 
Sheesh, that's a new one...

I think the easiest way is to open the shared DB from a workstation, start modifying something - anything - and then physically pull the network plug from the back of the machine. Then delete the shared DB's .LDB file and try to open it again. (Plug your workstation back in when you next need it.)

Usually, in my shop, a DB gets corrupt due to a network disconnect glitch. So I guess if you create a handy glitch by pulling the cable, you can try to simulate it the situation.
 
Doc Man

Thanks for that - nice idea but our systems people tend to get rather cross if we do things like that - & I don't want to be castigated!

So I can only really do this on a standalone - I have tried running a loop - edit/update & pulling the power plug while it is going but so far it refuses to corrupt the file. Ho hum!

David
 
I don't have any advice for you but I'm going to subscribe just to see the responses.

Never seen anyone getting frustrated over having a non-corrupted database. ;)
 
All

This isn't as daft as it looks - my users are very bad at reporting faults - they just abandon what they were doing & say nothing. The only thing they know is to use task manager to shut down - which of course doesn't help! So I want to trap the error (it's a front end/back end db btw) so that they will get a message "There is a problem with the database - please report to Fred immediately". To do this I need a corrupted file so I can try to trap the error.

Of course I can wait for the next incident - but sods law dictates that I will be out and someone will repair the database without taking a copy of the corrupted file.

David
 
It has been a long since I have seen the error "in need" but I do not think that it is trappable since it does not have a runtime error number that you can trap for.

One suggestion to corrupt a db would be to kill [ctrl+alt+del] the db while it is in the middle of an update query for a lot of records. That should corrupt the table indexes that the update query was running on.

Good luck!
 

Users who are viewing this thread

Back
Top Bottom