If your computer is not detecting your hard drive or optical drive when connected, you need to try changing jumper settings on the drive. If you do not know how to change jumper settings on your drive contact your hard drive/optical drive manufacturer for instructions.
Try setting the drive to Master, Slave, and Cable Select. You can also try removing the jumpers completely. Go through each of those settings until you find the one that works with your drive. Make sure that you power off the enclosure when changing jumper settings.