
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.