Hi Smitha,
Just saw your code , Can i suggest you some thing write one stand alone program taking a 1) connection object (make sure that connection is coming - confirm by sout staments) ,2) prepare a query (in a single string object) , 3)if you need pass the parameter in dynamically or else hard code in the previous query , 4) execute the query - rs
By implementing this, it simplifies your code and helps you to debug the code , so that you easily identify and fix the issue.
Regards
A