Table Locking

Results 1 to 4 of 4

Thread: Table Locking

  1. #1
    Xiang Guest

    Default Table Locking

    I am working on an application which needs to lock the table when any of the users is manipulating that particular table.<BR>I named a table "Entitylock" which inserts a record with all details of table locked like when, which and who locked the table, when any of the tables in the database is locked.<BR>The problem is how to unlock the table, when the user abruptly closes the session or when the session is timed out.<BR>Please let me know how I can work this out !!<BR>(Using SessionID as one of the attributes make any sense)<BR><BR>Thank you in advance

  2. #2
    Heaven's Martini Guest

    Default hmm

    well<BR><BR>you can use the global.asa Session on_End event<BR>that can capture a bunch.<BR><BR>(perhaps running code on all pages to check for an unlocked table by a user would be tough. or maybe setup sql server agent and have a proc run every n seconds that unlocks all tables x seconds after opening (or minutes) if not already done so.<BR><BR>good luck, nothing is sure fire perfect.

  3. #3
    Join Date
    Dec 1969
    Los Angeles, CA

    Default What are you talking about

    What db are you using?<BR><BR>HOW are you locking the table?? WHAT is locking the table??<BR><BR>And when you say "manipulating that particular table" you mean editing records or modifying the table?? Are you saying you lock the ENTIRE table when a user access a ROW of data??<BR><BR>

  4. #4
    Join Date
    Dec 1969

    Default Why not just...

    let ADO do the locking for you:<BR><BR>rs.Open strSQL,Conn,adLockPessimistic <BR><BR>from the helpfiles:<BR><BR>"adLockPessimistic 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."<BR><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