Re: Connecting to a Database using PRO*C in a multithreading environment

From: D. Turpin <dominict_at_keops.com>
Date: 1996/05/21
Message-ID: <4nsdok$orq_at_wagner.spc.videotron.ca>#1/1


I am using Pro*C version 2.1.2.0.3

Problem is, a reconnect takes about 5 seconds...which I cannot afford Heck, im real time here, I have less than 500ms!

josh_d_at_magicnet.net (J Davis) wrote:

>dominict_at_keops.com (D. Turpin) hurled up:

>>How can one make a connection to a database visible through all
>>threads of the application?

>>the thing is, if I connect to my database in my main thread and access
>>data from there, there's no problem.
 

>>BUT
 
>>if I try to access the database from ANOTHER thread than the main (a
>>child thread), the connection is not visible (and yet it is still
>>active in the main)

>>is this an unresolvable bug?
 

>If you are using post PRO*C 1.4 you can connect again in the child
>processes. You can connect normally or set up the connect string like
>this:
 

>exec sql connect :username identified by :password using :dbname;
 

>The dbname identifies the discrete connection to ORACLE. It is
>probably not necessary but will help your program to easier to
>understand if it knows which connection to use.
Received on Tue May 21 1996 - 00:00:00 CEST

Original text of this message