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: External Procedures: Embedded SQL and OCI callbacks both possible?

Re: External Procedures: Embedded SQL and OCI callbacks both possible?

From: Finn Ellebaek Nielsen <fen_at_changegroup.dk>
Date: Tue, 23 Jul 2002 23:14:18 +0200
Message-ID: <3d3dc72b$0$80830$edfadb0f@dspool01.news.tele.dk>


Hi.

I'm only guessing here because I haven't tried it myself. Going back to your original version:

HTH. Finn

"Stewart Houck" <shouck_at_pnm.com> wrote in message news:32h%8.720$pY3.79601870_at_newssvr17.news.prodigy.com...
> Yep, I checked out both the 8i and 9i ProcC/C++ and Application
Development
> Fundamentals documentation.
>
> I tried using the statement you suggest, however "host_context" is of type
> sql_context* and I do not how (or if) I can grab the OCI handles from it.
>
> The documentation says "The REGISTER CONNECT statement will return the set
> of OCI handles (OCIEnv, OCISvcCtx, and OCIError) that are associated with
> the current Oracle connection and transaction". However, I don't know how
I
> can reference the handles it returns.
>
>
> "Finn Ellebaek Nielsen" <fen_at_changegroup.dk> wrote in message
> news:3d3d18d5$0$11847$edfadb0f_at_dspool01.news.tele.dk...
> > Hi there.
> >
> > Have you checked the documentation, eg
> >
>

http://download-west.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a89861/pc
> > _07pls.htm#8055.
> >
> > It mentions using
> >
> > EXEC SQL REGISTER CONNECT USING :epctx RETURNING :host_context;
> >
> > thus connecting Pro*C and getting OCI environment handles in one go.
> >
> > HTH.
> >
> > Cheers,
> >
> > Finn
> >
> > "Stewart Houck" <shouck_at_pnm.com> wrote in message
> > news:wTYZ8.563$5r7.93319216_at_newssvr15.news.prodigy.com...
> > > Oracle 8i Enterprise Edition 8.1.7.3
> > >
> > > I have the need in an external procedure (Pro*C) to both call a
> procedure
> > > containing embedded SQL and to also use an OCI callback. I can
> > successfully
> > > do one or the other, but not both. It seems that the problem has to do
> > with
> > > the contexts they both need (though I'm not sure). The following
> > statements
> > > are at the beginning of the routine to set the contexts:
> > >
> > > status = OCIExtProcGetEnv(ctx, &envh, &svch, &errh);
> > > EXEC SQL register CONNECT USING :ctx;
> > >
> > > With the above statements, I receive an ORA-1012 (not logged on) error
> > when
> > > the SQL is executed. If I reverse the order, I get an ORA-03114 (not
> > > connected to oracle) and then ORA-03113 (end-of-file on communication
> > > channel), and I seem to lose the connection to the extproc.
> > >
> > > Is it possible to use both Embedded SQL and OCI callbacks in one call
to
> > an
> > > external procedure? If so, how is it done.
> > >
> > > Thanks
> > >
> > >
> >
>
>
Received on Tue Jul 23 2002 - 16:14:18 CDT

Original text of this message

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