Lock/Unlock DB

Results 1 to 3 of 3

Thread: Lock/Unlock DB

  1. #1
    Join Date
    Dec 1969

    Default Lock/Unlock DB

    I need to update records in my db, and I need to lock the db so that no one else can update at the same time. What is the simplest way to do this? Also, what happens is someone tries to update the db while it is being held by someone else? <BR>Thanks...

  2. #2
    NPKumar Guest

    Default RE: Lock/Unlock DB

    set the lock type of the recordset to adopenoptimistic(3) or adopenpessimistic(2).<BR>It won&#039;t allow others to update the db while you update the db.

  3. #3
    Jeremy_D Guest

    Default RE: Lock/Unlock DB

    While you are updating the records, they will be automatically locked - that&#039;s the whole idea behind a database engine, you don&#039;t have to perform any special actions for that.<BR><BR>If another clinet tries to update the same row you are updating he&#039;ll get a message saying that the row is locked. However, the exact message and the way client-tools handle such locks are (can be) completely different depending on the database engine used: some just give you an error-box stating that the row is locked, others will wait for the lock to be released and tell you that the data has been changed since you last retrieved it. Without knowing which database engine you are using, it&#039;s hard to say anything about these matters at all.<BR><BR>Jeremy_D<BR>

Posting Permissions

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