Start of change

-20125   CALL TO STORED PROCEDURE procedure-name FAILED BECAUSE THE RESULT SET FOR CURSOR cursor-name IS SCROLLABLE, BUT THE CLIENT DOES NOT SUPPORT THIS, REASON reason-code.

Explanation

A scrollable result set for a cursor has been returned by a CALL for a stored procedure, but the cursor has an attribute or is in a state that prevents it from being returned to the calling application.

procedure-name
The stored procedure that failed.
cursor-name
The scrollable cursor.
reason-code
A numeric value that indicates the reason for the failure. Possible values are:
0
The cursor is scrollable, but the client is downlevel and does not support scrollable cursors. The DRDA Application Requestor is not able to process scrollable result sets
1
The cursor is declared on a server different from the one on which the stored procedure executes, and it contains one or more columns with an SQL type of XML. The calling application might be executing on the local DB2® system or on another DRDA requester system. The stored procedure executed one or more remote FETCH requests against the cursor, and the last remote FETCH request had one or more binary XML targets. Because the cursor is declared on another server, the last stored procedure FETCH request defines the format of XML data returned by the DRDA server to be binary XML. Returning such a cursor as a result set is not allowed for the local DB2 system or for the DRDA requester on which the calling application is executing.

System action

The statement cannot be processed. All result set cursors that are defined in the stored procedure were closed before returning to the caller. The scrollable cursor cannot be used to FETCH from the result set. Actions that were completed by the stored procedure are not rolled back, and any actions that were initiated by the stored procedure have completed because the error was detected at the end of the execution of the stored procedure.

Programmer response

Take the action that corresponds to the reason-code value:

0
Modify the content of stored procedure procedure-name to not define result set cursors as scrollable.
1
Make sure that fetches performed by the stored procedure do not cause the server to return XML columns as binary XML data.

SQLSTATE

560B3

End of change