Start of change

-20123   CALL TO STORED PROCEDURE procedure-name FAILED BECAUSE THE RESULT SET RETURNED FOR CURSOR cursor-name IS SCROLLABLE, BUT THE CURSOR IS NOT POSITIONED BEFORE THE FIRST ROW

Explanation

A scrollable result set for a cursor has been returned by a call to a stored procedure, and one or more of these cursors is not positioned before the first row.

procedure-name
The name of the stored procedure.
cursor-name
The name of the cursor.

System action

The call to the stored procedure was unsuccessful. All result set cursors that are defined in the stored procedure were closed before returning to the caller. The scrollable cursor can not be used to fetch from the result set. Actions completed by the stored procedure are not rolled back, and any external actions initiated by the stored procedure have completed because the error was detected upon completion of the stored procedure.

Programmer response

Modify the content of the stored procedure to ensure that the result set cursors are positioned before the first row before returning to the caller.

SQLSTATE

560B1

End of change