Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    28

    Unanswered: How to lock whole table by using ADO ?

    I would like to lock a table in .MDB database and prevent other from write to it. Other users are allowed to read this table. Can I do that using ADO ?

    TIA

  2. #2
    Join Date
    Oct 2001
    Location
    Chicago
    Posts
    440

  3. #3
    Join Date
    Jan 2004
    Posts
    184

    Re: How to lock whole table by using ADO ?

    Here are the types of Locking with ADO. As you can see the closest that you get is adLockPessimistic, but that only locks record by record and not the whole table.

    adLockBatchOptimistic 4 Indicates optimistic batch updates. Required for batch update mode.

    adLockOptimistic 3 Indicates optimistic locking, record by record. The provider uses optimistic locking, locking records only when you call the Update method.

    adLockPessimistic 2 Indicates pessimistic locking, record by record. The provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately after editing.

    adLockReadOnly 1 Indicates read-only records. You cannot alter the data.

    adLockUnspecified -1 Does not specify a type of lock. For clones, the clone is created with the same lock type as the original.


    Originally posted by suntisuk
    I would like to lock a table in .MDB database and prevent other from write to it. Other users are allowed to read this table. Can I do that using ADO ?

    TIA

Posting Permissions

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