I am having difficulty executing a MS SQL Server stored procedure from Java/jsp. I wish to return a table set of data; the last line of the stored procedure is a regular se
Our server calls stored procs from Java like so - works on both SQL Server 2000 & 2008:
String SPsql = "EXEC ?,?"; // for stored proc taking 2 parameters
Connection con = SmartPoolFactory.getConnection(); // java.sql.Connection
PreparedStatement ps = con.prepareStatement(SPsql);
ps.setEscapeProcessing(true);
ps.setQueryTimeout();
ps.setString(1, );
ps.setString(2, );
ResultSet rs = ps.executeQuery();