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.
ISOLATION LEVEL CS
DYNAMIC RESULT SET 1
MODIFIES SQL DATA
ASUTIME NO LIMIT
PROGRAM TYPE MAIN
COMMIT ON RETURN NO
subject: Call to Stored Proc Returns 1st Row of RS into callableStmt