Click to See Complete Forum and Search --> : Sharing Ms Access


virlinz
October 5th, 2005, 08:54 PM
Hi
I have a winform application with Ms Access as its database. It is a single user application. Now there are more than one PC having the same application installed in it, therefore I need to share this database so that all the updates made to the database are available to all users. I've read about replica but I think it is inconvenient to synchronize each time updates are made. I was thinking to store this database in a PC and let others PCs have access to it, something like what SQL Server can do. Is this possible for Access? Can someone suggest what is the best approach to tackle this problem. I thank you in advance for your help

erickwidya
October 5th, 2005, 09:29 PM
Is this possible for Access?
if u want to shared, put the Access dbase into one comp(server), then ur application's connection string use the Path to the server
ex : Conn.ConnectionString ="Datasource = \\Server_path\shared_folder\db_name.mdb;..."
but it depends wether ur app can 'customizeable' or not

for replica, not sure about that one since i never used one before

Can someone suggest what is the best approach to tackle this problem.use real Database like MSSQL instead of Access due its limitation

good luck

olivthill
October 6th, 2005, 02:21 AM
Putting your application or your database in a shared folder should be alright. That's the solution that was used in our company.

virlinz
October 7th, 2005, 12:27 AM
Thank you for the replies.
I've tried to share but I got the ISAM not installed error. I tried the solution given in this webpage http://support.microsoft.com/kb/209805 but the same error occurs again.
I found a post (not in CodeGuru) saying
MS Access is not really designed to work for a multi-user environment. You
would definitely run into serious problems with your database everytime 2
users access the same data
Any comments on that statement?

olivthill
October 7th, 2005, 04:30 AM
About the ISAM error, sorry I don't know. I move the "mydatabase.mdb" or "mydatabase.mde" file to a shared folder, and it works for me.

About the warning you quoted, I would reply it is vague. Problems should be addressed in a rational way. Of course, if two users are working on the same record at the same time, then you can have a problem, e.g.

- Client C has orderd an Item I.
- User U1 queries the database and sees that the order is waiting. He fetches the item, and puts it in the mailbag.
- User U2 queries the database and sees that the order is waiting. He fetches the item, and puts it in the mailbag.
- User U1 updates the database, saying the order is complete.
- User U2 wants to update the database, but the order has vanished, and the database issues an error.

In order to avoid that problem, users should never work on the same data at the same time, or the programmer should implement a strategy locking data until a transaction is over.
MS-Access has "UseTransaction" and "RollBackTrans" method, but you can also implement a soft lock, e.g; when User U1 takes the client order, then he should have a button saying "I'm taking care of that order", and the program will set a flag to true in the record preventing other users from reading that record until the flag is set to false.

erickwidya
October 7th, 2005, 09:54 PM
the ISAM is probably caused by MDAC_TYPE that is outdated

try google it to download a new version of it