Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Accessing DAO from multiple threads

Posted on 1998-08-20
3
Medium Priority
?
233 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

660 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