Start of change

-392   SQLDA PROVIDED FOR CURSOR cursor-name HAS BEEN CHANGED FROM THE PREVIOUS FETCH (reason-code)

Explanation

The application has requested incompatible returns from successive FETCH statements.

cursor-name
The name of the cursor.
reason-code
A numeric value that indicates the reason for the failure. Possible values are:
1
The application is running with DB2 rules, and has requested that LOB data be returned as a LOB in one FETCH statement, and as a locator in another FETCH statement. This request is not permitted.
2
The application has requested textual XML in one FETCH statement, and binary XML in another FETCH statement. This request is not permitted.

If the cursor is a result set returned by a stored procedure called by the application, then the application error might result from a mismatch with the last FETCH performed by the stored procedure.

System action

The statement is not processed, and the connection is terminated.

Programmer response

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

1
For a mismatch involving LOB and locator: Either do not use DB2 rules, or modify the application so that it does not change the data type code from LOB to locator (or the reverse) in the SQLDA between successive fetches.
2
For a mismatch involving textual XML and binary XML: Change the application to request textual XML data in successive fetches, or to request binary XML data in successive fetches.

SQLSTATE

42855

End of change