Link to home
Start Free TrialLog in
Avatar of r2umam
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.getResultSet()

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?
Avatar of Joe Woodhouse
Joe Woodhouse

Not very helpful to you I'm afraid, but I've seen a lot of applications and connectivity tools expect only one result set per statement.

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...?
Avatar of r2umam

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
Avatar of Joe Woodhouse
Joe Woodhouse

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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?
Glad that helped!