What operating system are you installing? if you are installing Windows XP with SP2 or older, please make sure to enter your BIOS (f10 on Dells i beleive) and set the SATA mode to "compatible" or "IDE" mode. AHCI or RAID modes will not work correclty with Windows XP SP2 or older when reinstalling from OEM discs unless the drivers are properly loaded.
If it's Windows XP SP3, Windows Vista and Windows 7, then you may have a fauly motherboard.
Do you get the same "Hard Drive Error" when doing the tests with the new hard drive?