If in doubt, you can use lock hints instead:

SELECT * FROM mytable (nolock) 

UPDATE mytable WITH (rowlock) set field = value

Etc...  In cfquery blocks it may be safer than isolation level statements...


-----Original Message-----
From: jon hall [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 12:57 PM
To: CF-Talk
Subject: setting sql isolation levels within cfquery


  When setting the an isolation level on a transaction within a
  cfquery block affect future queries on the same connection? This
  page seems a bit contradictory on the subject.
 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
set-set_74bw.asp

  If so, should I just reset the isolation level to REPEATABLE READ at
  the end of the query? Any potential downsides to this?

<cfquery datasource="#this.dsn#" name="nextEst">
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
BEGIN TRANSACTION
SELECT * FROM ...
COMMIT TRANSACTION
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ
</cfquery>

The thing I want to avoid is having a connection in the connection pool
stuck on SERIALIZABLE...
-- 
 jon
  mailto:[EMAIL PROTECTED]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to