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: Multi-threaded Pro*C/Pro*C++ applications...

Re: Multi-threaded Pro*C/Pro*C++ applications...

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/10/24
Message-ID: <34589fd1.172686890@newshost>#1/1

On Thu, 23 Oct 1997 17:27:49 -0400, "Kris Spinka" <kris_at_snet.net> wrote:

> Can someone please enlighten me on how I would create a multithreaded
>Pro*C app?? I don't seem to understand how Pro*C can differentiate
>between connections?? I think I should be using OCI for these kind of
>things? Do you folks agree???

If you have pro*c 2.2 or up, then pro*c can do it as well. With pro*c 2.2 and up, there is a command line option "threads=yes" as well as new directives

EXEC SQL ENABLE THREADS;
EXEC SQL CONTEXT ALLOCATE :context_var;
EXEC SQL CONTEXT USE :context_var;
EXEC SQL CONTEXT FREE :context_var;

which allows your pro*c program to have many contexts into the database. This lets you either

depending on your needs.

The pro*c 2.2 and up docs have info on this in the chapter on "Developing a Pro*C/C++ Application"  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

NOTICE: In order to cut down on the amount of time I spend applying silly logic to email addresses like "In order to cut down on spam, remove THIS from my email" or "In order to cut down on spam, reverse my email address", etc, I will simply hit delete when that mail bounces back to me, which is what I do with spam myself.  

I haven't figured out whats more time consuming for me, deleting spam or resending emails after re-reading the whole thing to figure out the algorithm to apply. Received on Fri Oct 24 1997 - 00:00:00 CDT

Original text of this message

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