If both optical drives have been tried and you are still getting the same issue, it is the computer that is the problem.
It could be a bad IDE port on the motherboard, try a different one, or try switching the IDE port assignments on the HDD and DVD-ROM. It could also be a defective IDE cable; try getting new ones. Try resetting the BIOS & see if that helps.
It could be defective memory. Try running memtest86+ to find out; run it overnight to be sure. Also try reseating the RAM modules.
It could be a defective power supply unit (PSU). Memtest86 to some extent will also find out as well if the PSU is defective.
You may have inadequate cooling and/or hygiene on the PC. Try cleaning it of dust and other contaminants.