Page 1 of 1

How to use an oracle type defined in a package?

Posted: Tue 26 Sep 2006 14:58
by michellenweiter
Hello,

Let's say I have the following oracle package:

PACKAGE P1 AUTHID CURRENT_USER
AS
TYPE my_array_t IS VARRAY (8) OF BOOLEAN;

PROCEDURE set_role (p_param1 OUT my_array_t)
END P1;

How can I get and access the p_param1 from the Delphi side using ODAC?

I call this procedure using a TOraStoredProc componant and define the parameter p_param1 as Array, but when I execute this componant, I got the following error: "Type of Object must be defined"

and when I add
with OraStoredProc.ParamByName('p_param1').AsArray do begin
OCISvcCtx:= orasession.OCISvcCtx;
AllocObject('my_array_t');

I have an error telling "OCI function is not linked"

Does anyone has an idea?

Thanks a lots
mitch

Posted: Wed 27 Sep 2006 12:39
by Challenger
ODAC doesn't allow to use procedure parameters of following types if they are defined in package:
1) Oracle object
2) Oracle type