I've a working Oracle stored procedure that executes a select statement and returns (as an OUT parameter) a cursor. My problem is, I've no idea how to call the proc through VB. I create a Command object and configure the two parameters (1 is a string, 2 is expecting REFCURSOR on Oracle).
If I were to execute this through Oracle (from SQL*Plus) I'd type the following:
SQL> var c refcursor;
SQL> exec mma_plan_events('000000000000087', :c);
to display the results
SQL> print c
My proc looks something like this:
CREATE OR REPLACE PROCEDURE PLAN_EVENTS
(v_ID in varchar, events_cursor out pkg_types.ref_cursor)
is
begin
open events_cursor for
select .... from ... where...= v_id;
return;
end;
The results are in "events_cursor" but I don't know how to call this from VB, passing the proper variables, to get the result.
Any help would be greatyl appreciated.
Thanks,
O.
If I were to execute this through Oracle (from SQL*Plus) I'd type the following:
SQL> var c refcursor;
SQL> exec mma_plan_events('000000000000087', :c);
to display the results
SQL> print c
My proc looks something like this:
CREATE OR REPLACE PROCEDURE PLAN_EVENTS
(v_ID in varchar, events_cursor out pkg_types.ref_cursor)
is
begin
open events_cursor for
select .... from ... where...= v_id;
return;
end;
The results are in "events_cursor" but I don't know how to call this from VB, passing the proper variables, to get the result.
Any help would be greatyl appreciated.
Thanks,
O.