Results 1 to 2 of 2

Thread: SQL 7.0 and Deadlocks

  1. #1
    Guest
    In my application, there are 2 programs inserting data into a table and another process which selects and updates data from the same table.

    When all the 3 processes are run at the same time the insert statements produce a deadlock.

    Can anybody let me know if I can use some table hint, say ROWLOCK or PAGLOCK with the insert statement? Or is there is some way to prevent the deadlocks from occuring?

  2. #2
    Lively Member
    Join Date
    Jan 1999
    Posts
    81

    Batching

    there are 2 ways to do this... 1 batch your updats... that way the database takes them as it can handle them... The other method is cloning... use the clone function with your datacontrol to give you 3 recordsets to update instead of a single recordset... since there 3 instance you dont haft to worry about locking becuase it will use 3 different db flags or bookmarks...

    Hope this helps

    -------------------------
    There is never only one right answer. That is the magic of programming.
    -------------------------

Posting Permissions

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



Click Here to Expand Forum to Full Width