How to use an oracle type defined in a package?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
michellenweiter
Posts: 29
Joined: Thu 09 Jun 2005 06:23
Location: Bern, Switzerland

How to use an oracle type defined in a package?

Post by michellenweiter » Tue 26 Sep 2006 14:58

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

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Wed 27 Sep 2006 12:39

ODAC doesn't allow to use procedure parameters of following types if they are defined in package:
1) Oracle object
2) Oracle type

Post Reply