Saturday, February 25, 2012

"No Resultset produced" when using temp tables in stored proc

I am using microsofts jdbc driver and I am trying to call a stored
procedure to get a resultset from SQL Server.
Usually this works fine when I select something from an ordinary table
but when I am involving a temp table in the final select statement I
do not get any resultset in return?
Lars wrote:

> I am using microsofts jdbc driver and I am trying to call a stored
> procedure to get a resultset from SQL Server.
> Usually this works fine when I select something from an ordinary table
> but when I am involving a temp table in the final select statement I
> do not get any resultset in return?
I believe the result set *does* come back, but your other stuff in the
procedure before the final select will also be returning update counts etc,
so you need to loop to handle all the update counts as well, before
getResultSet() will find the returned data.
Joe Weinstein at BEA

No comments:

Post a Comment