Happen to my brother's computer, I just replace the DVD drive.
Well, things to check are the IDE cables, you can try to switch it for a known working one, make sure the power cord and IDE cable are securely plug in and that you have the IDE ends correctly plug into the DVD drive and the red line should be near the power plug and that there are no pin broken or bent.
Check Device manager, see if any IRQ conflicts or resource conflicts and maybe update your firmware if the manufactuer has any, and maybe check for viruses or spyware.
Sometime bad hardware can be shipped with new computer, shiet happens and all you can do is either replace it or get your money back.