aspose file tools*
The moose likes JDBC and the fly likes Call to Stored Proc Returns 1st Row of RS into callableStmt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Call to Stored Proc Returns 1st Row of RS into callableStmt" Watch "Call to Stored Proc Returns 1st Row of RS into callableStmt" New topic
Author

Call to Stored Proc Returns 1st Row of RS into callableStmt

C Trager
Greenhorn

Joined: Aug 04, 2010
Posts: 9
I've got a plain piece of code that calls a stored procedure. The call is made fine, and when rows are returned the first row returned is in the callable statement object and every subsequent row is returned in the ResultSet object. When the SP returns only one row that row is in the Callable Statement object. Is this normal behavior and am I supposed to write the code to check for that first row in the Callable Statement then loop through the result set? It seems that will require a ton of redundant code just for a single row when it can be returned in the result set. Am I doing something wrong?



Here's the parms I have set in my stored procedure.

VERSION V1
ISOLATION LEVEL CS
LANGUAGE SQL
DYNAMIC RESULT SET 1
NOT DETERMINISTIC
MODIFIES SQL DATA
ASUTIME NO LIMIT
PROGRAM TYPE MAIN
COMMIT ON RETURN NO
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Call to Stored Proc Returns 1st Row of RS into callableStmt
 
Similar Threads
null resultset
Callable statements
procedure call
CLI0112E Error in assignment. SQLSTATE=22005
getting ResultSet from Oracle procedure