Re: OCI to PL/SQL Function using Cursor Variables - GPF's

From: Roderick Prince <rrprince_at_comdisco.com>
Date: 1996/08/26
Message-ID: <322196C1.19D_at_comdisco.com>#1/1


Dave,

Thanks for responding.

It is early on a Monday morning and maybe I am just confused but...

        |<educated guess> you cannot pass a cursor from the programmatic  environment

        |into the pl/sql environment. i believe that cursors created in  pl/sql can

        |be passed around to other pl/sql packages/functions. I agree that you can not allocate a cursor variable in the PL/SQL block and return it to the calling application(don't know why this is true but Oracle says it is, so...). Oracle does claim you can allocate a cursor variable on the client (In a PL/SQL block) and have the stored procedure point it at a result set that you can later use to fetch results into. I am attempting to figure out how to do just that - accept I need to do it from OCI.

So, my goal is to allocate a cursor variable using OCI on the client, then using OCI functions to bind that variable into a SQL statement, and finally to fetch the result (a cursor pointing at a result set) into a local variable. Based on my ability to call functions from OCI that select standard datatypes into local variables, I think it makes sense to expect to be able to bind the cursor variable into a local variable also.

Any ideas on why this doesn't work or how to get the same affect are appreciated,
Roderick...

*----------------------------------------------------*
Roderick Prince Aerial Systems Group, Inc. These thoughts are my own, who else would want them.
*----------------------------------------------------*



|From: dmausner
|To: rrprince
|Subject: Re: OCI to PL/SQL Function using Cursor Variables - GPF's
|Date: Sunday, August 25, 1996 16:11PM
|
|In article <321E1130.51E8_at_comdisco.com>,
| Roderick Prince <rrprince_at_comdisco.com> wrote:
|>Trying to prove that it is possible to create a named stored procedure
|>(not an anonymous block - plenty of those samples around) that accepts
 a
|>cursor variable and fills it with results.
|
|<educated guess> you cannot pass a cursor from the programmatic
 environment
|into the pl/sql environment. i believe that cursors created in pl/sql
 can
|be passed around to other pl/sql packages/functions. i doubt that the
 internal
|pl/sql structures pointed-to by the cursor are accessible from
|OCI, since, after all, the stored procedure is executing p-code on the
|host. not same stacks and heaps at all. <end of educated guess>
|
|--
|Dave Mausner, Consulting Manager, Braun Technology Group, Chicago.
|
  Received on Mon Aug 26 1996 - 00:00:00 CEST

Original text of this message