• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

Accessing DAO from multiple threads

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
sjohnv
Asked:
sjohnv
1 Solution
 
trestanCommented:
I think you need to use semaphore and wait functions to control the synchronization object.
0
 
PaullkhaCommented:
DAO (most versions) should not be used in multithreaded environments. Please check article ID: Q151407 from MS.
0
 
mmachieCommented:
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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now