I'm on 8.0.1 and it appears that CF doesn't override the default SQL
Server isolation level if you don't specify one in your cftransaction
tag.

I ran the following code whilst tracing:
<cftransaction>
<cfquery name="test" datasource="test">
        select *
        from table
</cfquery>
</cftransaction>

This is what I got:

SET IMPLICIT_TRANSACTIONS ON
select * from test
IF @@TRANCOUNT > 0 COMMIT TRAN
IF @@TRANCOUNT > 0 COMMIT TRAN SET IMPLICIT_TRANSACTIONS OFF
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

When I added isolation="serializable" to the cftransaction tag, I get
"SET TRANSACTION ISOLATION LEVEL SERIALIZABLE" immediately prior to the
select.

~Brad



-------- Original Message --------
Subject: Re: SQL Gurus... obtaining the correct Incremental ID
From: Dave Watts <dwa...@figleaf.com>
Date: Wed, April 28, 2010 4:54 pm
To: cf-talk <cf-talk@houseoffusion.com>


> That would ONLY work if you used SET TRANSACTION ISOLATION LEVEL
> SERIALIZABLE or WITH(TABLOCKX HOLDLOCK)

This is one of those things I never am completely clear on, but I
believe that the default isolation level for CFTRANSACTION is
serializable in CF 7+.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333207
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to