Please make sure that the outlet to which you are connecting your PC has the proper polarity and is grounded. For example, in the US the wider blade is neutral and the third prong must be grounded. The second CD-ROM you tried may simply have had itsdata cable connected backwards. Usually you see strange behavior when this happens, like being unable to eject, or the drawer hangs open partway, or the hard drive light stays on.
You didn't mention if you had IDE or SCSI. IDE is 40 pin, SCSI is 50.
If you have SCSI, please make sure termination is set properly. If the CD-ROM is the last device on that cable, it should be terminated. There is usually a jumper on the back of the drive for this.
IDE is very different. As another tech suggested, please set the CD to slave if a hard drive is connected to that cable, and make sure the hard drive is set to master. If the CD-ROM is by itself on a cable, set it to single or master.