Bitcoin QT error. How can I prevent corruption of database?
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