2 users accessing database at same time

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

Im having a problem.

We have a database on a network drive and have 5 users accessing it, with
the potential for all users to access it at the same time under admin
account.

Problem we have is that when some writes back to the data base and another
user is doing it also at the same time, the data gets corrupted

My question is , is it possible to lock the database when a user is logged
in thus causing anyone else trying to access it be given the message that
there is currently a user logged in?

Trying to keep the system simple.

Thanks in advance.

Greg
 
Greg said:
Im having a problem.

We have a database on a network drive and have 5 users accessing it, with
the potential for all users to access it at the same time under admin
account.

Problem we have is that when some writes back to the data base and another
user is doing it also at the same time, the data gets corrupted

My question is , is it possible to lock the database when a user is logged
in thus causing anyone else trying to access it be given the message that
there is currently a user logged in?

Trying to keep the system simple.

Multiple users opening the same file is a recipe for corruption as you have
seen. If you split the app and gave each user a local front end file and
only shared the data file you should see this problem (mostly) vanish
unless you have some defective network hardware in the mix.

You could create shortcuts for each user that attempt to open the file with
the exclusive command argument. Then the first person opening the file
would automatically lock anyone else out. That would obviously be pretty
annoying if your users are in the file very much.
 
In asp.net we use following code

'Application.Lock
Application("UCount")=cint(Application("UCount"))-1
Application.UnLock

Nitin Singh
 
Back
Top