Hi, I have a Pl/Sql procedure signature that look like this
foo(param1 IN type1, param2 IN type1, c OUT REF CURSOR)
.
This stored procedure is being called in C#. In the C# code, I fill a DataTable with this cursor. I would like to know when the cursor will be closed.
Should I close it in the SP? In the code? Or is the object OracleRefCursor will close it when I'll call the Dispose method(cause it has no Close method)?
Thanks
Edit : Here is some example of the code I'm using
Stored proc :
create or replace procedure foo1(param1 IN type1, param2 IN type1, c OUT REF CURSOR)
IS
BEGIN
OPEN c
FOR
SELECT x
FROM table;
END;
create or replace procedure foo2(param3 IN type1, param4 IN type1, c OUT REF CURSOR)
IS
temp type1 := param3;
x type1;
BEGIN
LOOP temp < param4
foo1(temp, param4, c);
FETCH c INTO x;
temp := temp +1;
END LOOP;
END;
Thanks