Results 1 to 3 of 3

Thread: Writing to a database

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    33

    Unhappy

    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

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    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...

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    33
    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
  •  



Click Here to Expand Forum to Full Width