Bitcoin QT error. How can I prevent corruption of database? So I turn on my computer this morning, and I find Bitcoin QT has quit of its own accord. 
I try to turn it back on and I get this message.

"Bitcoin - Error System error: Database corrupted"



I'm fairly sure Windows 7 restarted itself to install updates. Is this what caused the corruption?

Luckily, I have zero bitcoins, and I've reinstalled Bitcoin QT without any problems, but this will stress me out if I want to mine bitcoins while out of town.  

Apparently, if the database is corrupted, you may have lost your wallet and all your money!

My question is, is this true, and how can I prevent this error from appearing again? What can cause it? I've turned off windows automatic update, so that should mean we're okay? What happens in a powercut? Wish Bitcoin QT was more robust :(

update Even weirder, I gave the corrupted Bitcoin QT a try and for no reason at all, it started and didn't give me the error. Really scared of loosing all my money. Can someone explain what's happening? Thanks a lot guys.

update Nope. Dispite working, it is still corrupted. It gets stuck on 86 weeks forever.

Tried to get in via bitcoind to reindex the database:


Tried uninstalling everything and reeboting my computer and resinstalling bitcoin-qt:

Thought it was working, but the second it got onto 85 weeks remaining:



Gentlemen, please help. Logically thinking about it, it must be the same database it's using, that somehow survived the reinstall. Maybe if someone could point me towards where this database is stored so I can delete it manually?

Brand new computer, 64 bit genuine windows 7. Barely any programs installed. Can't believe how flaky this open source software is.
I think the error is hardware based. Ran memtest86 and found multiple errors in my RAM. Also got a blue screen for the first time last night. Makes sense, sometimes bitcoin qt would run for minutes, other times days. I think it was hitting a bad address at different times.

If anyone else is getting this error, test your RAM with memtest86. Probably should have done this first thing. Prime 95 could also be used to test your processor (let Prime 95 run overnight, if there are no errors in the morning you can be 95% sure your processor is in pefect condition. Run it longer, say 48 hours, to be more sure).
Test your hhd/ssd with CrystalDiskInfo; it should display your drive's health instantly. (hdd/ssd shouldn't cause this error, as your controller detects and automatically doesn't use bad sectors.)

Prime95:
http://files.extremeoverclocking.com/file.php?f=205

Memtest86:
http://www.memtest86.com

CrystalDiskInfo:
http://crystalmark.info/software/CrystalDiskInfo/index-e.html