According to Compaq online support, your error message means "hard disk error or wrong drive type."
Was the second drive the same make and size as the first one?
If not, this error means that the computer doesn't recognize the new drive's parameters. You need to enter the System Configuration Utility (nomally accessed by hitting the Del key or a F-key at the initial boot up screen) to adjust the drive parameters to match the new drive. Usually this Utility will include an Auto-detect function so that you don't have to manually adjust the parameters.
Good Luck!