|
-
Nov 20th, 2000, 09:02 AM
#1
Thread Starter
Member
Hi
I am trying to write a VB app that writes to an Access Database. The DB will be run in a multiuser environment.
My question is: What happens if more than 1 user attempts to add a record to the DB (by clicking the "Add" button on the form) at exactly the same time?
Any help would be appreciated
Thanks
Gregg
-
Nov 20th, 2000, 09:18 AM
#2
Fanatic Member
Depends on your locking strategy. Check out locking in Access help. The strategies available are: No locks, Record Lock and All Records. Optimistic locking and pessimistic locking are available through DAO.
Basically, with No Locks, one of the users will have posted the amendment first (the network packets could not be delivered "at exactly the same time") and the other will recieve notification and will be asked whether they want to unwind their change or overwrite the previous change.
With Record Lock, the user will see a locked symbol for the record when it is already being edited. The lock may not be apparent until they attempt an edit).
With All Records, the data will be locked by the first user to access the data.
Optimistic locking only locks a data page during the Update phase and Pessimistic locking locks the data page as soon as an edit has been invoked.
A data page is 2K long and may be one or many records.
Cheers,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 20th, 2000, 09:25 AM
#3
Thread Starter
Member
That`s definitely cleared up a few problems!
cheers Paul
Gregg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|