I checked from setup(blue screen) its there but windows cant detect it.
I assume this means bios, which shoud mean the drive is connected properly. First thing I'd do is go to device manager and make sure there were no exclamation points or question marks (which would mean a driver problem). You can get to the device manager by right clicking on my computer, go to properties, click on the hardware tab, then click on device manager.
If the device manager showed no errors, then I'd try checking the computer management program. You get to it by going to the control panel (through the start menu), then administation tools, then computer managment. Go down the list to disk management and make sure the dvd drive is there and that it is assigned a letter, if its not assigned a letter you won't be able to use it.
If neither of those fix anything then its probably a bad drive.