Page 1 of 1

how to call procedure complex parameter in UniDAC at orace

Posted: Tue 23 Feb 2010 10:02
by daizhicun
we know that , we can easy call a procedure/package by TuniQuery
in oracle.

But if procedure/package has complex parameters .

I find that there are no way to call it.

for example:

we all know this procedure :DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES) ;

the :LINES is a complex parameter;

it's definition :

type chararr is table of varchar2(32767) index by binary_integer;

procedure get_lines(lines out chararr, numlines in out integer);

so my code is :

===============================================

var
sString:string;
begin
with UniQuery1 do
begin
sql.Text:='BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;';
Parameters.ParamByName('LINES').DataType:= ??
Parameters.ParamByName('NUMLINES').DataType:= ftIntger;
ExecSQL;
sString:=Parameters.ParamByName('LINES').Vaule;
end;
end;

===============================================

I don't know hot to set : Parameters.ParamByName('LINES').DataType= ??

and how to get : Parameters.ParamByName('LINES').Vaule to a stringvalue;

Posted: Wed 24 Feb 2010 01:07
by daizhicun
In fact ,I have solved it in ODAC,
But i can't do it in UniDAC;

Posted: Wed 24 Feb 2010 11:01
by daizhicun
noone know it ?

Posted: Thu 25 Feb 2010 11:37
by Challenger
UniDAC does not support such datatypes of paramteres.

Posted: Thu 25 Feb 2010 14:04
by flyy
you can use a trick, create another procedure which has all parameters in your complex type. initial your complex type in that procedure and call your procedure from in it.

use new procedure from unidac