Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Parameter Type
Parameter Type
Posted: 2002/08/07 05:46
 
hi,

I have stored procedure with one parameter type is table. I use TOCIStoredProcedure component in my application. how to pass my dataset in my application into my stored procedure using TOCIStoredProcedure?

thanks

fh
RE: Parameter Type
Posted: 2002/08/07 13:44
 
NCOCI only supports PL/SQL tables with 1 column (Table of record not supported). To pass PL/SQL table of integer into stored procedure use something like this:

StoredProc.Params[0].IsPLSQLTable := True;
StoredProc.Params[0].ArrayLen := Dataset.RecordCount;
Dataset.First;
i := 0;
while not Dataset.eof do begin
. StoredProc.Params[0].AsIntegers[i] := DataSet.Fields[0].AsInteger;
. Inc(i);
. Dataset.Next;
end;
StoredProc.ExecProc;