Path: news.easynews.com!easynews!dfw-peer!news.verio.net!newsfeed.mathworks.com!oleane.net!oleane!nnrp.oleane.net!not-for-mail
From: "Chris France" <cscillieri@siveco.com>
Newsgroups: comp.databases.oracle.server
Subject: Multithreaded connections hanging problem
Date: Thu, 6 Jun 2002 17:32:35 +0200
Organization: Guest of France Telecom Oleane's newsreading service
Lines: 27
Message-ID: <adnvgg$cis$1@s1.read.news.oleane.net>
NNTP-Posting-Host: 217.167.228.21
X-Trace: s1.read.news.oleane.net 1023377744 12892 217.167.228.21 (6 Jun 2002 15:35:44 GMT)
X-Complaints-To: abuse@oleane.net
NNTP-Posting-Date: Thu, 6 Jun 2002 15:35:44 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Xref: easynews comp.databases.oracle.server:149760
X-Received-Date: Thu, 06 Jun 2002 08:37:28 MST (news.easynews.com)

Hi all,
I am working on an application which should work for both SQLServer And
Oracle.
It manages 2 threads. One for Executing a stored procedure which loops until
a value is changed in a table. The other thread which uses a new separated
connection, will set in this table the value on in order for the first
stored proc to stop (and consequently terminates the first thread).
The application containing the 2 threads is in VC++/ODBC3/Windows2000.
Databses are SQLServer2000 or Oracle 8i.

This works good for SQLServer, but not for Oracle : the first thread works
fine in both cases, but for Oracle the second thread never manages to
connect, it hangs between the DataSource selection and Loging/Pwd window. A
debugger stop shows that (when selecting the proper thread) the connection
hangs on function AfxLockGlobals within the
Db.Open->AllocConnect->AfxLockGlobals calls.

Is there a problem with static data in Oracle odbc ? As it is known that
Oracle ODBC Driver does not support multiple statements with in the same
connection. Here i really have 2 seperated connection in 2 different threads
(2 different worker threads).
I 've tryed with both Oracle and Microsoft Oracle ODBC Driver but there is
no difference.
Any clue ?
Thanks


