-519   THE PREPARE STATEMENT IDENTIFIES THE SELECT STATEMENT OF THE OPENED CURSOR cursor-name

Explanation

The application program has attempted to PREPARE (actually, re-PREPARE) the SELECT statement for the specified cursor at a time when that cursor was already open.

System action

The statement cannot be processed. The cursor was not affected.

Programmer response

Correct the logic of the application program so that it does not attempt to re-PREPARE the SELECT statement for a cursor when that cursor is open.

SQLSTATE

24506