HELP: How to use DAO in Visual C++ from multiple threads? 
Author Message
 HELP: How to use DAO in Visual C++ from multiple threads?


I am trying to access an Access database with the following scenario.

I have a device (SCSI Jukebox)  that is operated by a separate thread
in our application. This device will occasionly return statistics or
errors.  This information must be stored in an access database.
Further, the main thread (GUI for the most part) must also access this
database).  Yet another thread is to be used to replicate the data to
a SQL Server.

The problem I am having is that which ever thread first accesses the
database, the rest of the database access attempts fail from other
threads.  Presumably, this has been because of handles not being valid
between threads.  I have not been able to track it that deep.  The
inevitable result is an access violation deep in the MFC DAO code to
create a workspace (presumably the default).

Can I get around this by using a separte workspace in each thread?  If
so, then how do I do that?  Every attempt I have made has failed
because of some "Exclusive access by another user", which I can only
assume is another thread in the same application.  I have not been
able to create any other workspaces.

Please help ASAP, as I am close to my deadline and I am not close to
finishing because of this problem.

Tom Veldhouse
Metamor Industry Solutions

Mon, 04 Mar 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Using DAO 3.51 in Visual C++ .Net

2. Using DAO SDK with Visual C++ 6.0

3. MFC using Visual C++ is with Multiple Inheritance


5. MFC using Visual C++ is with Multiple Inheritance

6. HELP, PC Slows down, using Threads, DAO, DirectX Play

7. (Q) Visual C++ DAO Help DBGrid Unbound Mode

8. Help: Using Borland C++ 16 bit DLL with Visual C++ 5.0

9. How to compile Visual C++ 1.0 source code using Visual C++ 4.0

10. DAO and Multiple Threads

11. error U1081 when compiling program using visual c++ *** HELP *** - Makefile (0/1)

12. Query multiple databases using DAO


Powered by phpBB® Forum Software