Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Return PLSQL variable value to OCI
use
char *SQL = "BEGIN MyPackage.GetVersion(:version); END;";
(note the :version)
and then obndrv an integer to :version
hth,
gert
-- reply address is altered to keep the spam down remove the nospamplease part to reply... Edward Baggott <eabaggot_at_hiwaay.net> wrote in article <xu7Lkn$18GA.164_at_news2.ingr.com>...Received on Tue Oct 14 1997 - 00:00:00 CDT
> I have a package that contains a procedure called
> GetVersion ( p_Version INTEGER). Is it possible to call
> this procedure from OCI such that the version gets returned
> into a "C" variable, ie,
>
> int main ()
> {
> int version;
> char *SQL = "BEGIN MyPackage.GetVersion(version); END;";
>
> /* logon, parse, bind, define, exec, fetch, whatever */
>
> if (version = 1)
> do_version1_stuff();
> else
> etc.
> }
>
> How do I do this?
>
> Thanks, Ed
>
>
>
>