use of cursor (array)
Posted: Fri 16 May 2008 13:09
Hi all,
There is client-server application. Client part is written on C++ Builder 6. Server of Oracle 10.2.
Client application is utillized by the component of Odac 6.25.1.13 (NET) for work with a server.
Whether it is possible, not using OCI, to pass a cursor (or even array) as entry parameter of the kept procedure on a server.
Thanks.
Tried to pass an array:
On a server there is a function which has an entry parameter array.
At an attempt to cause a function from client application causes an error:
What is going wrong?
There is client-server application. Client part is written on C++ Builder 6. Server of Oracle 10.2.
Client application is utillized by the component of Odac 6.25.1.13 (NET) for work with a server.
Whether it is possible, not using OCI, to pass a cursor (or even array) as entry parameter of the kept procedure on a server.
Thanks.
Tried to pass an array:
On a server there is a function which has an entry parameter array.
Code: Select all
create TYPE t_test_rec as object (obj_id number);
create TYPE AR as table of t_test_rec;
function test_array(tbl in AR) return number;
Code: Select all
odacQuery->CreateProcCall("pkg_tst_array.test_array");
odacQuery->Prepare();
odacQuery->ParamByName("tbl")->AsArray->AllocObject("AR"); // "Access Violation"
odacQuery->ParamByName("tbl")->AsArray->ItemAsInteger[0] = 101;
odacQuery->ParamByName("tbl")->AsArray->ItemAsInteger[1] = 102;
odacQuery->ParamByName("tbl")->AsArray->ItemAsInteger[2] = 103;
odacQuery->Execute();
odacQuery->Close();