• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
C Trager
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic