Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Returning Recordset with Oracle SP
You should create a recordtype for your recordset and then declare a record based on this type and put a returning clause specifying the recordtype at the end of your ref cursor.
beeckm_at_my-deja.com wrote in message <8tk40q$k1t$1_at_nnrp1.deja.com>...
>Hi there,
>
>I am having a problem in some stored procedures
>that return recordsets to ADO (Visual Basic).
>
>I put all my SPs in one package and use a REF
>CURSOR as an argument to return the recordset.
>Thus, a Stored procedure requiring 3 args
>actually has 4: the ref cursor, but you don't
>have to bind it so OK I pass 3 params, and my SP
>returns a RS.
>
>I have a problem when my SP does NOT require args
>and the only arg is the REF CURSOR itself, the
>ADO Commandtext looks like
>
>{call SP_LIS_APPGROUPACCESS }
>
>ald the SP in the package looks like:
>
>Procedure SP_LIS_APPGROUPACCESS(pRS OUT
>pRecordSet)
>IS
>BEGIN
>OPEN pRS for SELECT
>GAUSRGRP,GATAGXXX,GAFLVIEW,GAFLUPDT,GAFLCREA,GAFLD
>ELE,GAFLACC1,GAFLACC2,GAFLACC3,GAUSUPDT,GADTUPDT,G
>ATMUPDT
>From APPGRACC;
>end SP_LIS_APPGROUPACCESS;
>
>And the package header looks like:
>
>PACKAGE "RS" AS
>TYPE pRecordSet is REF CURSOR;
>Procedure SP_LIS_APPGROUPACCESS(pRS OUT
>RecordSet);
>END RS;
>
>Does anyone have an idea how I can get this to
>work?
>
>Greetings,
>M.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Thu Nov 02 2000 - 10:57:31 CST