Sure,
<CFIF ListFind(getBaseTagList(), "CFTRANSACTION")>
I am in a transaction
<CFELSE>
I am not in a transaction
</CFIF>
I use it like this on my "action" templates (eg inserting something into
a database
<CFIF NOT ListFind(getBaseTagList(), "CFTRANSACTION")>
<CFTRANSACTION>
<CFINCLUDE "thisTemplate.cfm">
</CFTRANSACTION>
<CFELSE>
DO THE DATABASE STUFF
</CFIF>
On Sat, 2002-04-13 at 10:00, Shawn Grover wrote:
> I'm sure I've seen this topic before, but can't seem to find anything in the
> archives, or through a google search...
>
> Is it possible to dynamically determine if the code being processed is in
> the middle of a CFTransaction?
>
> For instance:
> <cftransaction action="begin">
> <cfquery/>
> <cfif InTransaction>
> Show Message
> </cfif>
> </cftransaction>
>
> I make a call to a custom Error Handler tag in a transaction, and need to
> know if a RollBack needs to be done or not. I'd rather not have to create a
> new attribute/flag for the custom tag, if it's not needed.
>
> Thanks.
>
> Shawn Grover
>
>
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists