Results 1 to 3 of 3

Thread: Strange TABLE LOCK behavior...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Location
    St-Élie d'Orford, Quebec, Canada
    Posts
    133

    Angry

    Hi all,

    I have a table in SQL SERVER 7 that I want to lock when read and free when update is done or cursor closed.

    I use RDOs (resultsets) in VB to do the SELECT part and I specifiy that I want an rdOpenKeyset (updatable) set of rows LOCKED as soon as the SELECT is launched (rdConcurLock) or if you prefer, PESSIMISTIC locking.

    PROBLEM :

    - User 1 locks the table...
    - User 2 wants to read the table so the SELECT wait for the lock to be free.
    - User 1 free the lock...
    - User 2 SHOULD return with the row set BUT...
    -> The row set is EMPTY, I have to requery my SELECT in order to have data in the row set.


    Anyone ever had the same experience before ?
    What did I do wrong ?

    Please help me!!!

  2. #2
    Addicted Member
    Join Date
    Sep 1999
    Location
    Philippines
    Posts
    196
    Maybe you could set the isolation level in your database so that any query to the table would still be allowed.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Location
    St-Élie d'Orford, Quebec, Canada
    Posts
    133
    The thing is that I don't want any other query to be able to select the table. I want the querys to jam on the statement in my code and continue when the lock is free or timeout append... Still with me here ?

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