Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2004
    Posts
    105

    Unanswered: adLockPessimistic / adLockOptimistic

    hi all i have another question
    i have that programme where different users should be able to read data from a database and make changes in those, concerning on what permissions they have.
    now if 2 or more users try to change things in a database that could result in some mistakes so i thought i need to do the connection with adLockPessimistic
    but then i read that adLockOptimistic might do it too?
    does adLockPessimistic mean two persons cant read from a table at the same time? or just not make changes at the same time?
    and what if one user opens that special field to read then a second user makes a change? then the first user wont see that meanwhile there has been made some changes unless he closes and reopens it
    does somebody know which adLock i would best use here?
    Thanks

  2. #2
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    as far as I know optimistic lock, before sending new data to table, assumes record on the table is not changed. which means only last change will be efective.

    pesimistic lock won't let any user to change data on locked record until, it is released. basicaly with pesimistic lock, only one user can modify the record. and others has to wait until active user finished.
    ghozy.

  3. #3
    Join Date
    Oct 2004
    Posts
    105
    thanks i guess i will better use pessimistic then

  4. #4
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    yes, pesimistic lock sounds better on the programmer's side, but your users may start complain abaout it after a while. so be careful .
    ghozy.

  5. #5
    Join Date
    Oct 2004
    Posts
    105
    thanks yeah but i think they would complain also if something would get mixed up

  6. #6
    Join Date
    Oct 2004
    Posts
    105
    Hi i have a problem with that adlockpessimistic
    now i already put the adlockpessimistic to the open so actually only one user should be able to open that specific recordset at one time no?
    it still lets both users have access to that record at the same time though and i get errors like one person writes something and if another person has it open at the same time then what the first person wrote into the recordse wont be there anymore
    does anybody know how i can change that?
    Thanks so much

  7. #7
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    hi,
    I believe this is very unusual problem. I personaly never tried pesimistic lock. my customers never like the idea. maybe you should open a new thread for this problem. since it is different than original problem in this thread.
    ghozy.

  8. #8
    Join Date
    Oct 2004
    Posts
    105
    yes i will do that thanks

Posting Permissions

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