r2umam
asked on
Sybase jconnect stored procedure temporary tables issue
From isql I run my stored procedure and it returns the expected results. However, from Java the
java.sql.Statement.getResu ltSet()
method returns nothing. The stored procedure contains temporary tables and two select statements. If I instead replace this with just one select statement and no temporary tables I get results from java. Any ideas?
java.sql.Statement.getResu
method returns nothing. The stored procedure contains temporary tables and two select statements. If I instead replace this with just one select statement and no temporary tables I get results from java. Any ideas?
ASKER
actually, in both cases there is only one result set. In the first sp I create a temp table and then select from it, returning one result set but java says no results, whereas isql returns many lines of results. In the second case there is also one result set, but this time no temp table, this time java has no problem and returns results.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Does you application have the same rights as then you are running it from isql?
As a test create a procedure to insert a single value into a temp table and select it out. Do you get it from Java?
As a test create a procedure to insert a single value into a temp table and select it out. Do you get it from Java?
Glad that helped!
If that's the case for Java as well, do you have the ability to split your procedure into two subprocedures and call them one per statement? Of course, you wouldn't be able to share information between them with the #temp tables anymore, though.
I'm not a Java person but I'm guessing there might be some way to concatenate result sets...?