You should always var your query name and use a query name to make it
a local variable and avoid race conditions.
What for? All variable names are local by default anyway.
Furthermore, giving a name to a query will force CF to keep the
connection alive during the whole HTTP request,
and use
You should always var your query name and use a query name to
make it a local variable and avoid race conditions.
If you don't give your query a name in the first place, what possible race
condition could result?
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software
You should always var your query name and use a query name
to make it a local variable and avoid race conditions.
What for? All variable names are local by default anyway.
I think that the original statement referred to the use of queries (or other
variables) within a function/CFC method.
I think he was referring to within a CFC, does CF put the query name by
default into the scope local to that cffunction tag or to the whole
object? I have always just var'd them, but it could very well be an old
habbit no longer needed in newer versions of CF.
On 10/2/07, Claude Schneegans
if you create a
variable, you should make that variable local to the function/method if it's
only going to be used within that function.
Oh I see, you're right, but I still don't see the utility to name the
query, then to create a variable.
Garbage collection doesn't happen immediately when
I get occasional SQL deadlocks on an application.
[Macromedia][SQLServer JDBC Driver][SQLServer]Transaction (Process ID 65) was
deadlocked on lock | communication buffer resources with another process and
has been chosen as the deadlock victim. Rerun the transaction.
I noticed that some of my
I don't believe so.
You should check your lock type(s) you are using. By default sql server
uses row locking but you may be in a situation where page or table locking
is taking place.
Check out this
http://www.sql-server-performance.com/tips/reducing_locks_p1.aspx for some
good advice.
--
Chad,
You should always var your query name and use a query name to make it
a local variable and avoid race conditions.
With that said, that is not the cause of your problem.
The deadlock is occurring at the database level. Normally I can get
rid of deadlocks by tuning the query. There are
Could not specifying a name on the CFQuery cause these deadlocks?
No, that won't cause a deadlock. What will cause a deadlock is two
transactions running at the same time, that need to use the same resources,
such that the first transaction locks something needed by the second
transaction, which
9 matches
Mail list logo