If this is being connected via the same IDE cable the hard drive is using, make sure the jumper setting on the hard drive is master, the jumper setting on the DVD drive is slave, that the hard drive is on the middle connector and the DVD is on the end connector and that the colored line (usually red) on the cable matches pin 1 on the drives' connectors. Make sure that cable is then connected to the lowest numbered IDE connector on the motherboard. Most boards have 2 connectors, they are usually named IDE_0 and IDE_1, but other alternatives are sometimes used. Also, some newer motherboards only have one IDE connector.
In the case that your motherboard has two IDE connectors, I recommend that you make use of each. Set both drives to master (or stand alone) and place each on it's own cable, the hard drive to IDE_0 and the DVD drive to IDE_1.
(If the cable isn't long enough to place the DVD on the middle connector, set the drive to slave and place it on the end connector. It will still function properly this way.)