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: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 01 Jul 1999 11:24:38 GMT
Message-ID: <377b4fa4.52090492@newshost.us.oracle.com>


A copy of this was sent to Andrew Scott <a.scott_at_citr.com.au> (if that email address didn't require changing) On Thu, 01 Jul 1999 11:54:31 +1000, you 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?
>
>Thanks,
>Andrew Scott
>
>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.
>>
>> Ken
>>
>> interld808_at_aol.com wrote:
>>
>> > Does anyone have experience sharing a connection created in a program
>> > that uses Pro*C with an API that uses OCI?
>> >
>> > I have a client that needs to maintain transactional integrity across
>> > these two areas. The manual says you can do it. I am looking for real
>> > world experiences, maybe some sample code.
>> >
>> > -- Ron Olcott, ASC Corporation.
>> >
>> > Sent via Deja.com http://www.deja.com/
>> > Share what you know. Learn what you don't.

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Jul 01 1999 - 06:24:38 CDT

Original text of this message

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