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!

owa.vc_arr help!

652458Nov 10 2008 — edited Nov 10 2008
Hey folks,

Sorry to come again with possibly another dumb question but I'm kinda struggling with how to deal with arrays in pl/sql, and in particular those of type vc_arr.

Let me try and explain what I'm trying to do.

There is a procedure, let's call it postData which is part of a package let's call it xml_api taking two arguments as so:

xml_api.postData(name_array in owa.vc_arr, value_array in owa.vc_arr)

Now what I'm trying to do is implement is piece of pl/sql in apex so I can populate 2 arrays (name_array and value_array) and send it off to this procedure. Unfortunately, this does not seem to be quite as straightforward as it would seem. To start with, I can't find any details documentation on the owa.vc_arr type which would help me understand how to populate arrays and then the bits of information I found to just populate arrays in general seem to vary in syntax from

arr := ('item1','item2');

to

arr ==> ('item1','item2');

The book I have speaks of Varrays, Associative arrays and nested tables but I'm not sure whether any of those are relevant to what I'm trying to)

I tried the following but needless to say it gave me an error:

declare

name_array owa.vc_arr;
value_array owa.vc_arr;

begin

name_array := ('AuthenticationProtocol');
value_array := ('0');

xml_api.postData(name_array, value_array);
end;

and the error

ORA-06550: line 9, column 15: PLS-00382: expression is of wrong type ORA-06550: line 9, column 1: PL/SQL: Statement ignored ORA-06550: line 10, column 16: PLS-00382: expression is of wrong type ORA-06550: line 10, column 1: PL/SQL: Statement ignored

I hope this makes any sense to anyone, and again I apologise if this seems blindingly obvious but perhaps I have a complete misconception of how oracle handles arrays and collections...

Thanks folks

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 8 2008
Added on Nov 10 2008
7 comments
4,599 views