473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Synchronize Access Database!!

Hi all.
I'm writting a multithreading program that will update a loacal Access
database.
I'm using OleDB connection to get access to the database from each
thread and my question is: how do I synchronize between threads\ how do
I lock the database so no clashes between threads occurs.
do I have to use a diffrent connection\adapters???

Jan 5 '06 #1
1 3195
ta*******@gmail.com wrote:
Hi all.
I'm writting a multithreading program that will update a loacal Access
database.
I'm using OleDB connection to get access to the database from each
thread and my question is: how do I synchronize between threads\ how do
I lock the database so no clashes between threads occurs.
do I have to use a diffrent connection\adapters???


No provider will handle issues like that for you. There are many things
you could (or should) do if the threads are trying to update the same
data simultaneously:

-Keep track of what the threads are updating (sync'ing - not gonna get
in the deep details or how-to's here; there's various ways to sync
threads and such, well documented, and it tends to get a bit
complicated), also to minimize deadlocks and such
-Have code to handle the concurrency issues (it WILL happen no matter
how careful you are)
-Make sure you're using the optimal lock type
-Commit transactions to DB as quickly as possible (not lock things for a
long time) - MANY things you can do for this alone...
-perhaps use a better database - access isn't exactly a great db, but
this is one of those scenarios where it's especially lacking (several
concurrent connections, transactional/high integrity, heavy stress/load,
may need to scale significantly, need to minimize "locking time" and
query execution time, etc). Honestly, I'd look into SQL Server Express
or any other real RDBMS like PostgreSQL. Perhaps that's the very first
thing I would change, it's definitely not helping.

and I'm sure many many more things could be said about it, but that's a
good start.
Jan 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: MHenry | last post by:
Hi, We were going merrily along for 6 years using this database to record all client checks that came into our office, including information about what the checks were for. Suddenly, network...
5
by: premmehrotra | last post by:
I currently have a multi-user access database which is put on a shared drive L: on a Windows Servers. Entire database is one file premdb.mdb. Users access this database from their laptops....
8
by: John Baker | last post by:
Hi: I am URGENTLY in need of some book or web site OR tool that will help me integrate a relatively simple access application into a web page or pages. This is a time recording system (by...
1
by: taleran58 | last post by:
Hi all. I'm writting a multithreading program that will update a loacal Access database. I'm using OleDB connection to get access to the database from each thread and my question is: how do I...
15
by: philip | last post by:
On a form, I have a datagridview. This datagridview is constructed on a dataset filled by a tableadapter. The table adapter do very well what it must do when filling dataset. Insertions,...
7
by: Allison | last post by:
Hi -- we are a small manufacturing looking for a multi-user database to take customer orders (nothing too complicated, with 3 users total). We think we should be using Access, but are wondering...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
21
by: nihad.nasim | last post by:
Hi there, I have a database in Access that I need on the web. The web page should connect to the database and write records for certain tables and view records for others. I want to know a...
8
by: Beany | last post by:
Hi All, I'm starting a new project and need some help... I would like to update a main database file on a PC using PDAs. The PDA will contain the replica file and any changes made by workers on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.