Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to call procedure with Object type IN OUT parameter

user8879206Aug 16 2012 — edited Aug 16 2012
Hi friends,

I have a procedure with object type IN OUT parameters which is used for fetching status. We are calling this from Java. But I want to call it from oracle for testing purpose. I am trying from my end but not able to do it as of now. This is the first time I am dealing with object type.

Any help would be appreciated.

Details are given below.

CREATE OR REPLACE TYPE REC1 AS OBJECT
(RELAY_USAGE VARCHAR2(30)
,STATE VARCHAR2(1)
);

TYPE REC AS TABLE OF REC1;

CREATE OR REPLACE TYPE REC2 AS OBJECT
(GSRN VARCHAR2(18)
,METERING_POINT_NAME VARCHAR2(80)
,RELAYS REC)
/

CREATE OR REPLACE TYPE REC3 AS OBJECT
(INFO VARCHAR2(2000)
,STATUS NUMBER
)
/
-------------------------------------------------------------------
PROCEDURE RRU(
rcRelayControl IN OUT REC2
, rcResp IN OUT REC3)
IS
BEGIN
APKG.GetDetails(rcRelayControl, rcResp);
IF rcResp.Status = BPKG.iStatusFailure THEN
rcResp.Info := BPKG.Get_Message('20889', rcResp.Info);
END IF;
END RRU;

How to call this procedure in oracle?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 13 2012
Added on Aug 16 2012
3 comments
1,968 views