Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Stored Procedure Question

Re: Stored Procedure Question

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 29 Jul 1999 17:48:40 +0800
Message-ID: <37A02378.913@yahoo.com>


Thomas Kyte wrote:
>
> A copy of this was sent to Peter Daniels <peterd_at_snapsystems.com>
> (if that email address didn't require changing)
> On Wed, 28 Jul 1999 15:18:55 -0600, you wrote:
>
> >That's awesome! Thanks. Will it work with ADO Recordsets?
> >
>
> not to my knowledge but my knowledge of ADO/RDO is about 0.
>
> >Thomas Kyte wrote:
> >
> [snip]
>
> >>
> >> If you are trying to write a stored procedure that returns a result set then....
> >>
> >> it'll look like this:
> >>
> >> create or replace function sp_ListEmp return types.cursortype
> >> as
> >> l_cursor types.cursorType;
> >> begin
> >> open l_cursor for select ename, empno from emp order by ename;
> >> return l_cursor;
> >> end;
> >> /
> >>
> >> With 7.2 on up of the database you have cursor variables. Cursor variables
> >> are cursors opened by a pl/sql routine and fetched from by another application
> >> or pl/sql routine (in 7.3 pl/sql routines can fetch from cursor variables as
> >> well as open them). The cursor variables are opened with the privelegs of the
> >> owner of the procedure and behave just like they were completely contained
> >> within the pl/sql routine. It uses the inputs to decide what database it will
> >> run a query on.
> >>
> >> Here is an example:
> >>
> [snip]
>
> --
> See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
> Current article is "Part I of V, Autonomous Transactions" updated June 21'st
>
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries Reston, VA USA
>
> Opinions are mine and do not necessarily reflect those of Oracle Corporation

...but (with my equivalent knowledge on all things Visual Basic, ie 0) I think if you use Oracle Objects for OLE, then you get pass nice "bulky" things back and forth between client and server..

--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Thu Jul 29 1999 - 04:48:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US