Yes. But actually <cftransaction> is used if you have more than one SQL
statement (insert or update) that have to be either all committed or all
rollback.(It's all or nothing deal)
For a single update or insert statement the table is looked for the time of
the transaction by the dbEngine so you don't need the <cftransaction> around
it and <cflock> won't have any impact on the database.
While we are talking about locking, I have a question too.
I understand the need to have exclusive locks when (session(application or
server) variables are being set. I understand that we need read only locks
around the same variables when we read them.
I understand that CF doesn't have the notion of constants, but I thought
that by setting
<cfset application.constInt = 5> and by never changing it during the
execution of the application in fact
(for all practical purposes) we declared a constant.
It seams that the general agreement among people on the list is that even in
those cases we should use readonly locks (or set them up with request
scope). Which probably is OK but if you have 100 (or more of those) to set
them up for each page it looks to me like a waste of time (even if very
small, which probably is less than having 50 readonly locks on each page).
Ben Forta in the August edition of CFDJ said that if you are ABSOLUTELY
sure that a variable (application,session or server) doesn't change you can
leave out the readonly lock.
So my question is: should we lock constants or no?
Marius Milosav
www.scorpiosoft.com
It's not about technology, it's about people.
Virtual Help Desk Demo (VHD)
www.scorpiosoft.com/vhd/login.cfm
----- Original Message -----
From: "Todd Ashworth" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, December 06, 2000 2:34 PM
Subject: cftransaction .. single threaded?
> Is a <cftransaction> block single threaded, or do I have to provide my own
> database side locking for it? The docs aren't very clear on this at all.
>
> Todd Ashworth
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists