My old hard drive stopped working and I had to replace it. I put it in the case and connected everything properly but after powering on computer I saw that Windows can not see optical drive. I took it off and place it in another computer and there it worked like a charm so the problem is not with DVD. I have checked all cables and connectors but the problem continues. I would really appreciate if you could help me with this.
Have you checked jumper settings on hard drive and DVD? If both devices are set to be master and they are on the same IDE cable then problem you described can happen. Open your case and check that small plastic cap on the back of hard drive and DVD. There is a schematic representation how that cap should be placed to make device work in master, slave or cable select mode on both devices. See the picture and compare with your actual setting. If they are both master or slave make hard drive master and DVD slave, or put DVD on secondary IDE channel (connect it with motherboard via other IDE cable).