Precompilers and OCI (MOSC)

MOSC Banner

OCI how to know if a stored procedure has a refcursor before calling it

Hi,

I have to execute a stored procedure but I have to know if it returns a result set first.

- the 'get_errmsg_set' procedure has no arguments, it returns a result set only:

create or replace PROCEDURE get_errmsg_set AS q SYS_REFCURSOR;

BEGIN -- executable part starts here

open q for SELECT * FROM "schema"."ERRMSG";

DBMS_SQL.return_result (q);

END get_errmsg_set;


- My issue is that I don't know how this procedure is defined so I have to describe it at runtime and, first of all, I need to know if there is a result set.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center