Java – a stored procedure that returns multiple tables to the spring JDBC template
I use the jdbctemplate to call stored procedures from my spring Dao class My problem is that stored procedures return multiple tables Is there any way to access multiple tables using spring jdbctemplate
If I use JDBC template Queryforlist (mystoredproc, new object [] {parameters} I only get the first table from the result
My database is SQL Server 2005
In addition to JDBC template, there are other methods to meet my requirements If so, please let me know
Thank you in advance
Solution
See http://static.springsource.org/spring/docs/2.0.7/reference/jdbc.html#jdbc -StoredProcedure
The examples given in this section are fully applicable to the case where a stored procedure returns multiple result sets Although the example given is for Oracle, it should work for MS SQL Server in the same way