Without the machine in front of me and knowing what OS you are running, it's hard to tell. If you still have the driver for the CDROM drive, the first thing to do is right click on MY COMPUTER, then properties. Different operating systems are set up alittle different, but what you want to do is uninstall the cdrom and then have the MS hardware wizard do a detect. When you see a button that says "Have Disk" click it and follow the instructions. If that fails, next step is to do a reinstall of the original OS. If that fails, you can try a wipe of your hard drive and then a reinstall. If THAT fails, you probably have a problem with your mother board.
You can try to replace the ribbon cable to the CD, but they very very rarely go bad (I've never seen it.) There is also an outside chance that your CD bit the dust.
Good luck. Compaqs are not very user friendly to the do it yourselfer.
regards,
legrue