Troubleshooting
Problem
Report Execution fails to execute Stored Procedure and displays the following error message:
Symptom
RQP-DEF-0177 An error occurred while performing operation 'sqlOpenResult' status='-28'
UDA-SQL-0114 The cursor supplied to the operation 'sqlOpenResult' is inactive.
UDA-SQL-0107 A general exception has occurred during the operation 'fetch'.
[IBM][CLI Driver] CLI0125E Function sequence error. SQLSTATE=HYO1O
Environment
DB2 9.7 on AIX
Resolving The Problem
Declare cursor WITH HOLD WITH RETURN in Stored Procedure
Example:
DECLARE cursor1 CURSOR WITH HOLD WITH RETURN FOR....
Full Example:
CREATE PROCEDURE answers_select_id (IN question_id bigint )
P1:BEGIN
DECLARE cursor1 CURSOR WITH HOLD WITH RETURN TO CLIENT FOR
SELECT a.answer,a.answer_id from answers as a where a.question_id = question_id;
open cursor1;
END P1;
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21499871