Results 1 to 6 of 6

Thread: lock records ?

  1. #1
    Join Date
    Aug 2006
    Posts
    3

    Question Unanswered: lock records ?

    Hi
    how can i lock records in access when updatting , with sql commands not automaticly with access ?
    tanX

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    When you update in Access (or for that matter most other databases) at a minimum, the row you're updating is AUTOMATICALLY locked during the update. Depending on schemes and settings, either a page (records around the one being updated) or the entire table can also be locked.
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Aug 2006
    Posts
    3
    Hi
    it means there isn't any sql command for locking (like in supra d.b. with command "with lock explicit" )?
    tanX alot

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by NiceRose
    Hi
    it means there isn't any sql command for locking (like in supra d.b. with command "with lock explicit" )?
    tanX alot
    No ... You mean the LockOptimistic/Pessimistic? Those only specify WHEN the lock occurs ... The 1st being at the last possible moment and the other upon the creation of the recordset ...
    Back to Access ... ADO is not the way to go for speed ...

  5. #5
    Join Date
    Aug 2006
    Posts
    3
    Quote Originally Posted by M Owen
    No ... You mean the LockOptimistic/Pessimistic? Those only specify WHEN the lock occurs ... The 1st being at the last possible moment and the other upon the creation of the recordset ...
    I mean, when i want to create new query in access , in sql view( not in design view), i have to write some sql commands like :
    update table1 values(x,y,z,.....) where emp_id=12 and .... ;

    is there any sql command that i can write it here and lock that record or all records of that table (manually) ?

    tanX alot

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by NiceRose
    I mean, when i want to create new query in access , in sql view( not in design view), i have to write some sql commands like :
    update table1 values(x,y,z,.....) where emp_id=12 and .... ;

    is there any sql command that i can write it here and lock that record or all records of that table (manually) ?

    tanX alot
    When you execute the query, those records will be locked automatically during the action process ... I should ask, why do you want to manually loock the records?
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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