Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Frank (C++ API, IDS 10 UC5, AIX 5.3) found the parent's DB connection must be closed before spawning a child that also connects, or they interfere. Art Kagel explained a connection can be used by only one task at a time and a forked child shares it; use SET CONNECTION DORMANT or separate connections. Ken mentioned a special ODBC modification; Sheshnarayan asked what it was.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
we use C++ API in our application ( IDS10 UC5 &AIX5.3). We found the
connection in parent process must be closed before it spawns a child process
(the child process also need connect to DB), otherwise they interrupt each
other or just die.... very odd behaviors..
Any idea?
Thanks,
Frank
↪ replying to FRANK
ART KAGEL, — — source: IIUG Forums & Mailing Lists
Well that's not odd at all. Read the ESQL/C manual (that library underlys the
C++ clases), only one thread or task can use a single connection at a time.
Multiple threads in the same process either have to pass the connection between
them using SET CONNECTION ... DORMANT and CONNECT TO ... so that only one
thread
at a time uses a connection, or each thread has to open it's own connection.
When you spawn a child while connected to the database the two processes are
sharing the shared memory structures or the TCP/IP stream or socket of a single
connection. Naturally chaos and confusion will reign.
Art S. Kagel
----- Original Message -----
From: Frank <ids@iiug.org>
At: 2/05 9:39:28
we use C++ API in our application ( IDS10 UC5 &AIX5.3). We found the
connection in parent process must be closed before it spawns a child process
(the child process also need connect to DB), otherwise they interrupt each
other or just die.... very odd behaviors..
Any idea?
Thanks,
Frank
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Please can you explain what do you mean by "....special OBDC driver..."?
Is it something specific attributes (connection/statement) being set to
serve this purpose OR its altogether different ODBC Driver developed for
this specific reason?
Thanks
-Shesh
"Acecpu@aol.com" <Acecpu@aol.com>
Sent by: ids-bounces@iiug.org
07/02/2007 02:35
Please respond to
ids@iiug.org
To
ids@iiug.org
cc
Subject
Re: connections for parent and child process [8367]
We actually had a special OBDC driver mod that allowed multiple threads to
be active. It was useful when the OS would only support 1023 sockets.
Ken
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.