Solved

Accessing DAO from multiple threads

Posted on 1998-08-20
3
160 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
3 Comments
 
LVL 8

Expert Comment

by:trestan
Comment Utility
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
Comment Utility
DAO (most versions) should not be used in multithreaded environments. Please check article ID: Q151407 from MS.
0
 

Expert Comment

by:mmachie
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now