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: Calling PACKAGEs from OCI C applications

Re: Calling PACKAGEs from OCI C applications

From: Adrian Nakon <a8nakon_at_uk.ibm.com>
Date: 1998/01/16
Message-ID: <69nut1$1700$1@zen.hursley.ibm.com>#1/1

Hi Mark.

If you are trying to call this embedded PL/SQL from an OCI call, you will need to treat the whole call like a PL/SQL procedure. ie.

BEGIN
 <<whatever PL/SQL you want to call >>
END; What you should do is treat the above PL/SQL as a string and run it through the parser. Of course, you will also need to bind any variables required to pick up any return information.
PL/SQL imbedded in OCI only uses BIND variables - even to return information. If you are defining a variable (ie. for output use only - as in standard OCI/SQL), that could give you the 904 as well.

Hope this helps,

Adrian.

Mark E. Hansen wrote in message <34BE857F.13EB50FE_at_unify.com>...
>I'm using OCI Version 7, and need to call a package in the
>Oracle version 8 database server that I've connected to. The
>specific package is DBMS_ROWID, and the method is ROWID_TO_EXTENDED.
>
>Does anyone have some advice on how to call this from my OCI C
>application? When I treat it as a normal statement, I get back
>the error 904: Invalid Column Name.
>
>For those who want to know, here is what I do:
>
>oopen()
>
>oparse() with a statement text of:
>
>"SELECT DBMS_ROWID.ROWID_TO_EXTENDED('AAAABBBB.CCCC.DDDD', 'auth',
> 'table', rowid_convert_external) FROM DUAL"
>
>Where the rowid variable is a rowid that I've constructed from the
>parts in the Cda_Def structure after an INSERT statement. I'm trying
>to convert this "restricted" rowid into an "extended" rowid.
>
>I looked into the PL/SQL Manual for any information on calling
>PL/SQL statements from within OCI applications, but can't find
>anything.
>
>Can anyone help?
>
>Thanks,
>
>--
>Mark E. Hansen Internet: mailto:meh_at_Unify.Com
>Unify Corporation WWW: http://www.unify.com
>3927 Lennane Drive Voice: (916) 928-6234
>Sacramento, CA 95834-1922 FAX: (916) 928-6401
>
> ** That which is without remedy should be without regard **
>- w.s.
Received on Fri Jan 16 1998 - 00:00:00 CST

Original text of this message

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