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: Sharing Connection in Pro*C and OCI

Re: Sharing Connection in Pro*C and OCI

From: Kenneth C Stahl <BluesSax_at_Unforgettable.com>
Date: Thu, 01 Jul 1999 07:59:24 -0400
Message-ID: <377B581C.B5838F76@Unforgettable.com>


You are right of course, the lda isn't required to be global. I guess I've just always done it that way.

Not sure why the other guy below is having problems. Hopefully he will post some code so that we can see what is happening.

Ken

Thomas Kyte wrote:

> >Hi Kenneth,
> >I've tried this and could not get it to work on HP-UX in C++. The only
> >difference is that I declared "Lda_Def lda;" to be local within a function.

> can you elaborate on what "could not get it to work on HP-UX" means? what
> didn't work?
>
> I've done this on lots and lots of platforms, including hp, solaris, nt, ibm,
> pyramid, sequent, etc....
>
> the lda doesn't have to be global either -- you would have to call sqllda each
> time to set it up is all.
>
> >Which platforms and languages have you tried this on?
> >
> Kenneth C Stahl wrote:
> >>
> >> Actually, there is nothing to it.
> >>
> >> 1. Define an OCI LDA globally:
> >> Lda_Def lda;
> >> 2. Make your connection to Oracle with Pro-C
> >> EXEC SQL CONNECT :uid IDENTIFIED BY :pwd;
> >> 3. Make the following call:
> >> sqllda(&lda)
> >>
> >> Then just pass the lda to your API.
> >>
>
Received on Thu Jul 01 1999 - 06:59:24 CDT

Original text of this message

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