Test a procedure which returns a sys_refcursor
485251Feb 25 2010 — edited Mar 2 2010Hi all,
Oracle 9i
Got a simple stand alone procedure which has an input param and an output param, the second of which
is a ref cursor.
Can anyone tell me how I can go about testing this from within Pl/SQL (Command line)?
CREATE OR REPLACE PROCEDURE "LOGMNR"."LM"
(p_filename in varchar2, p_recordset OUT SYS_REFCURSOR)
as
begin
begin
dbms_output.put_line('Hello World');
OPEN p_recordset FOR
SELECT *
FROM test_table;
end;
end LM;
Also, and I know this is a huge long-shot. I'm going to be calling this procedure from VB6 (yes I know!), via ADODB, but I'm not
sure what type to add for the second parameter. Anyone called an Oracle procedure with ADODB which returns a refcursor/result set?
cmd.Parameters.Append cmd.CreateParameter("p_filename", adVarChar, adParamInput, 255, "c:\test.dat")
cmd.Parameters.Append cmd.CreateParameter("p_recordset", *???*, adParamOutput, 6000, "")
Regards
Dave