Re: Using CFLock around a query

2007-05-09 Thread Jochem van Dieten
Ali Awan wrote: Every once in a while on my intranet application I get Database errors. MS SQL Server will throw an error that the transaction was deadlocked. It happens around a piece of code in which I have 2 queries, an Update and a Delete which are nested inside a CFTransaction. On

Re: Using CFLock around a query

2007-05-09 Thread Ali Awan
Yes and no. In one case, I found concurrent queries and I also found 2 sessions hitting the same table. Did you find any concurrent queries? For a deadlock you need at least two SQL sessions hitting the same object. It is not unlikely this can deadlock, but to be certain we need to see the

Re: Using CFLock around a query

2007-05-09 Thread Jochem van Dieten
Ali Awan wrote: In one case, I found concurrent queries and I also found 2 sessions hitting the same table. If the concurrent queries do not lock the records in the same order as the transaction does, that can cause deadlocks. It is not unlikely this can deadlock, but to be certain we

Using CFLock around a query

2007-05-08 Thread Ali Awan
Every once in a while on my intranet application I get Database errors. MS SQL Server will throw an error that the transaction was deadlocked. It happens around a piece of code in which I have 2 queries, an Update and a Delete which are nested inside a CFTransaction. It also happens on

RE: Using CFLock around a query

2007-05-08 Thread Ben Nadel
, 2007 4:55 PM To: CF-Talk Subject: Using CFLock around a query The main question is: Is it ok to put a CFLock around one or more cfqueries that are nested in a Cftransaction. E.G.: cflock cftransaction cfquery name=q1 update table1 yadda yadda

Re: Using CFLock around a query

2007-05-08 Thread Ali Awan
Ben, I'm doing an exclusive lock. What kind of lock are you doing? Scope/name/exclusive? . Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com ~| Deploy Web Applications Quickly across