IBM Support

.[IBM][CLI Driver] CLI0125E Function sequence error. SQLSTATE=HYO1O

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;

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Report Studio","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF033","label":"Windows"}],"Version":"10.1;10.1.1;10.2;10.2.1;10.2.2","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg21499871