Results 1 to 4 of 4

Thread: Can I use Application.lock to wrap DB operations?

  1. #1
    Join Date
    Jul 2004
    Posts
    2

    Can I use Application.lock to wrap DB operations?

    Hi, I use ASP & MS Access. I want to implement a "Block on Select" scenario, which means only one user at a time can read some data from a table or a recordset. Other users have to wait until the first user is done.

    Can I do it like this:

    Application.lock
    DB operations here
    Application.unlock

    Will this guarantee the exclusive reading of the recordset?

    Thanks
    jming

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    that should work. unusual but it'll server the purpose. you just have to inform the user in line to wait their turn.

    FK

  3. #3
    Join Date
    Jul 2004
    Posts
    2
    Hi, Frank

    Then, What is the usual method? Thanks.

  4. #4
    Join Date
    Oct 2002
    Posts
    933
    the unusual part is to searialize user DB access. you must have a good reason for that. Normally, when a record is written to it is already locked.

    FK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •