
Hi,
I am trying to execute a procedure which is stored in MS SQL server's database. I have configured the driver with ther server name, database name and uid/pwd using a callable statement. Then i am stor
Connection conn=null; CallableStatement cstmt=null; try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); conn=DriverManager.getConnection("jdbc:odbc:drivername", "uid", "pwd"); cstmt=conn.prepareCall("{proc_name}"); ResultSet rs= cstmt.executeQuery();
The procedure has drop temp table statements, select multiple values from tables with different conditions, storing in a temp table, select values from the temp table again and storing them in an excel. I have created the code for saving the data in excel but the code for executing the query is not working. Please help.

Please go through the following links:
http://www.roseindia.net/tutorial/java/jdbc/jdbccallablestatement.html
http://www.roseindia.net/mysql/mysql5/stored-procedures-and-functions.shtml