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

Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI question

Re: OCI question

From: sm <sm_at_No.Spamming>
Date: 1997/08/04
Message-ID: <33e64eb7.13531296@newshost.us.oracle.com>#1/1

On Sun, 03 Aug 1997 01:26:58 -0700, Marcos Guirland Nowosad <nowomarc_at_embratel.net.br> wrote:

Use the anonymous plsql block method.

BEGIN :x := func1; END;

Bind 'x' using obndra() to a host variable. The host variable will be populated by the return value after oexec().

Hope this helps.
sm

>Hello All,
> My department is developing a system written in C which uses
>Oracle OCI
>to connect with our Oracle database (version 7.1 for Windows for
>Workgroups). We need to execute some functions and storage procedures
>created in our database, so we are executing PL/SQL statements which
>call these functions and procedures.
> The problem is that we neither know how to get the result of a
>function
>nor the value of an OUT parameter of a storage procedure into a variable
>of the C program, using the OCI binding functions.
> Someone suggests us to execute the following tricky SQL
>statement
>
> SELECT func1() FROM DUAL;
>
> and then fetch the result, using the fetching OCI functions.
> But we would like to execute functions in anonymous PL/SQL
>statement
>like:
>
> BEGIN
> x:= func1();
> END;
>
> and get (somehow) the value of the variable x into a variable of
>the
>program, since our system requires PL/SQL programming.
>
> Does anyone have the answer?
> Thanks in advance !!
>
> Marcos
Received on Mon Aug 04 1997 - 00:00:00 CDT

Original text of this message

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