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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Call to Stored Proc Returns 1st Row of RS into callableStmt
 
Similar Threads
procedure call
Callable statements
getting ResultSet from Oracle procedure
null resultset
CLI0112E Error in assignment. SQLSTATE=22005