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: Is Pro*C reentrant?

Re: Is Pro*C reentrant?

From: Christoph Ganz <c.ganz_at_ids-scheer.de>
Date: 1997/01/15
Message-ID: <32DCABF5.74C4@ids-scheer.de>#1/1

Damon Groenveld wrote:
>
> Hi,
>
> Since we are going to be using DCE soon I need to know if there is a version
> of Pro*C that is thread safe (reentrant). If you have any information that
> could help me please let me know via email at:
>
> damon_at_werple.net.au

Hi Damon,

since nobody else here seems to know about that, let me say that at least in ORACLE 7.3 for NT included in fact Pro*C version 2.2 offering 'Support for Developing Multi-threadad Applications'. It introduces the concept of 'contexts' which are roughly pointers to data areas containing statement-specific data such as connections, cursors and so on. I'm quoting ORACLE documentation:

'With THREADS=YES specified on the command line, the Pro*C/C++ Precompiler ensures that the generated code is thread–safe, given that you follow the guidelines described in “Programming Considerations” on page 3 – 108. With THREADS=YES specified, Pro*C/C++ verifies that all SQL statements execute within the scope of a user–defined runtime context.'

You need to change your sourcecode in order to make it thread-safe and use the corresponding library (SQLLIB18), but it can be done. I'm working on that right now and haven't discovered any problems (apart from the usual tricky situations you get when you deal with multi-threaded applications). I can only speak for ORACLE 7.3 under NT 3.51, though.

Good luck,
Christoph

-- 
Christoph Ganz
IDS Prof. Scheer GmbH
Altenkesseler Str. 17
66115 Saarbruecken
Tel +49 681 9921 660 Fax 501
Received on Wed Jan 15 1997 - 00:00:00 CST

Original text of this message

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