Solved

Accessing DAO from multiple threads

Posted on 1998-08-20
3
205 Views
Last Modified: 2013-11-20
I have implemented a DAO class in a dll that is being used by a console application. Now the console application is multi-threaded and I am getting an exception trying to open the database from multiple threads. I would like to maintain accessing from multiple threads. Is there a way out?
0
Comment
Question by:sjohnv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Expert Comment

by:trestan
ID: 1321076
I think you need to use semaphore and wait functions to control the synchronization object.
0
 
LVL 2

Accepted Solution

by:
Paullkha earned 50 total points
ID: 1321077
DAO (most versions) should not be used in multithreaded environments. Please check article ID: Q151407 from MS.
0
 

Expert Comment

by:mmachie
ID: 1321078
there is an article on www.codeguru.com with info on dao and multi threading.  i haven't read it, just seen the entry for it under databases.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question