Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> return BOTH a recordset and an OUT par from Oracle Stored Proc using ASP and ADO
Hi all
I followed the sample code in paragraph "Retrieving ADO Recordsets using Reference Cursors" (taken from "Professional ASP Data Access" - see
and it works fine.
The only thing is: what if I would like to have also an Output parameter? I tried in several ways but I was not able to retrieve its value.
I mean: the stored procedure compiled and worked if called by anonymous PL/SQL code. Nor I got any error from my asp page. Simply: I could loop thru the recordset, but I was not able to retrieve the value of this output parameter.
Can you help me please?
Here is the procedure:
CREATE OR REPLACE PACKAGE PKG_LID_GUI_UTILS
AS
TYPE t_REF_CURSOR IS REF CURSOR; PROCEDURE PRC_TEST( o_numRet_code OUT varchar2, o_curTest OUT t_REF_CURSOR );
PROCEDURE PRC_TEST( o_numRet_code OUT varchar2, o_curTest OUT t_REF_CURSOR ) IS BEGIN OPEN o_CurTest FOR select error_log_id from lid_transaction_error_log where group_id = 33 and trunc(error_date) = to_date('25-00-2004','dd-mm-yyyy');
o_numRet_Code := 'back from proc';
END;
END PKG_LID_GUI_UTILS;
/
objCommand.CommandText = "{call PKG_LID_GUI_UTILS.PRC_TEST(?)}"
Set objNameParam = objCommand.CreateParameter("o_numRet_Code", adBSTR,
adParamOutput, 10, o_numRet_Code)
objCommand.Parameters.Append objNameParam
Set objRecordSet = objCommand.Execute()
Response.Write "<p>1 out + 1 ref cursor: o_numRet_Code:+++" &
objCommand.Parameters(0) & "----------"
...
Received on Wed Aug 25 2004 - 10:01:49 CDT