I have a problem with using DbUtils to retrieve the results from a Stored Procedure in SQL Server.
The stored procedure when executing in SQL Server Management Studio is returning two separate result sets when executed for a specific input value, but for other values it's returning only one result set. The following images illustrate the issue:
The problem I am facing here is I am using a DbUtils BeanListHandler
to convert the results into a list of UserInfo
beans.
List<UserInfo> userList = (List<UserInfo>) run.query(STORED_PROC, new BeanListHandler(UserInfo.class), refId);
When the stored procedure returns just one result set it's working fine. However, in the case where two result sets are returned, it is only giving the list for the first result set.
I think that by using JDBC we can get using multiple ResultSet
but I am not sure how to handle this DbUtils.
Can somebody provide an insight? If any other info is required, please update me I will provide.