Re: PL/SQL Parameter array help
Date: 30 Jun 2002 17:18:44 -0700
Message-ID: <afo75401ttn_at_drn.newsguy.com>
In article <20020630085538.16563.00001587_at_mb-mb.aol.com>, noodles_at_aol.com
says...
>
>HP Unix 11
>Oracle 8.1.7
>
>I'm a relative newbie am trying to get a 2 returned arrays ( one is varchar and
>one is number) from a procedure call back into local variable types.
>
>I've tried "typing" my variable using a PL/SQL table but it still gives me a
>type mismatch. Am I missing something?
>
you are making up your own type -- when you should be using the type they already defined for you in the remote_pipe package.
In the remote_pipe package, they have defined the two table types you need -- drop your TYPE statements and define your variables to be of type remote_pipe.<what ever name they gave them>
>{Code}
>set serveroutput on size 1000000;
> declare
>
> type str_array is table of varchar2(255) index by binary_integer;
> type num_array is table of number(9) index by binary_integer;
>
> mycount number;
> sToEncode varchar2(200);
> sDictionary varchar2(200);
> nErrNum number;
> sErrMsg varchar2(200);
> nEncoderCount number;
> saEncoderType str_array;
> naRank num_array;
> naMatch num_array;
> saRetEncoder str_array;
> saTermInfo str_array;
>
>begin
> sToEncode := 'stroke';
> sDictionary := ‘MedDRA';
>
>remote_pipe.pr_proc(sToEncode,sDictionary,nErrNum,sErrMsg,nEncoderCount,sa
>EncoderType,naRank,naMatch,saRetEncoder,saTermInfo);
>
>exception
> when others then
> dbms_output.put_line(sqlerrm);
>end;
>/
>exit;
>
>
>TIA,
>Clliff
>
-- Thomas Kyte (tkyte_at_oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Mon Jul 01 2002 - 02:18:44 CEST