Multi-threaded ADO problem in VC++ 
Author Message
 Multi-threaded ADO problem in VC++

I am experiencing a problem with an application that uses
ADO and MS ODBC driver for Oracle.  The app is written in
VC++ 6.0 using MDAC 2.7 and Oracle 8.0.5.  This app is
multi-threaded and installed as a service on WNT 4.0 SP
6a, and runs a couple of Oracle stored procedures which
return a "ref cursor" through ADO.

Usually the calls to the Oracle stored procedures return
their "ref cursors" through ADO recordsets properly.  
However, under certain load and timing circumstances, the
ref cursors return an empty record set with zero records,
while the database table feeding the ref cursors have many
rows.  When this occurs, neither ADO or Oracle returns any
error messages to the application.  Oracle does not report
any error messages to any of its log files.

Without supplying the VC++ code for the calls, does anyone
know of any "issues" with running ADO in a multi-threaded
environment with Oracle?  This problem is strange, becuase
when this problem occurs, running the same stored
procedure that the threads are using, in SQL+ returns a
valid, non-zero length "ref cursor".  Thanks in advance
for any and all responses.



Wed, 01 Jun 2005 23:49:38 GMT  
 Multi-threaded ADO problem in VC++
Michael,
I don't have any experience with multithreading the ODBC Driver on an Oracle
Instance, but we use Oracle OLEDB Native Drivers (8i) successfully in a
multithreaded ADO as well as direct OLEDB environments.

The only problems that we have ever come across with respect to ADO is when
we would share a connection across threads, and not manage concurrent
access -- that caused a lot problems.  Our solution was to either 1) create
connections in each thread, or 2) serialize all calls on a single connection
using a critical section associated with the connection.

Here is a note on the ODBC Driver:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc...
bcoraclethread_safety_notes_on_api_functions.asp

regards
roy fine

p/s/ if you use Oracle Native OLEDB drivers, download the latest 8i/9i from
the Oracle MetaLink site.

Quote:
> I am experiencing a problem with an application that uses
> ADO and MS ODBC driver for Oracle.  The app is written in
> VC++ 6.0 using MDAC 2.7 and Oracle 8.0.5.  This app is
> multi-threaded and installed as a service on WNT 4.0 SP
> 6a, and runs a couple of Oracle stored procedures which
> return a "ref cursor" through ADO.

> Usually the calls to the Oracle stored procedures return
> their "ref cursors" through ADO recordsets properly.
> However, under certain load and timing circumstances, the
> ref cursors return an empty record set with zero records,
> while the database table feeding the ref cursors have many
> rows.  When this occurs, neither ADO or Oracle returns any
> error messages to the application.  Oracle does not report
> any error messages to any of its log files.

> Without supplying the VC++ code for the calls, does anyone
> know of any "issues" with running ADO in a multi-threaded
> environment with Oracle?  This problem is strange, becuase
> when this problem occurs, running the same stored
> procedure that the threads are using, in SQL+ returns a
> valid, non-zero length "ref cursor".  Thanks in advance
> for any and all responses.



Thu, 02 Jun 2005 00:30:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Multi-Thread v.s. ADO Connection

2. Multi-threaded Views with VC++ ???

3. VC++6.0 Multi-threading: Dialog or SDI/MDI

4. VC++6.0 Multi-threading: Dialog or SDI/MDI

5. Libraries and multi-threading in VC++

6. Help: OLE: VB client and multi-threaded VC++ in-proc server

7. VC++6.0 Multi-threading: Dialog or SDI/MDI

8. Multi-Threading, Multi-Functions, Real-Time, How?

9. problem with MS sample code for ado in vc++

10. Multi-Threaded UI problem involving Asynch Sockets

11. Multi-threaded DAO(3.5) SDK and UNICODE problems

12. Multi-threading ATL problem

 

 
Powered by phpBB® Forum Software