it's a good thought, except the way CF works you can't put an opening tag inside of
another nested tag like that. you could do:
<CFSET inTransaction = ListFind(GetBaseTagList(),"CFTRANSACTION")>
<CFIF NOT inTransaction>
<CFTRANSACTION>
<cfquery name=somequery>
</cfquery>
</cftransaction>
<cfelse>
<cfquery name=somequery>
</cfquery>
</cfif>
It would be nice to do what you're talking about, i've wanted to do that on numerous
occasions.
Steve Nelson
Todd Hartle wrote:
> Since CF does not allow nested transaction I am trying to detect if I'm in a
> transaction or not via the following:
>
> <CFSET inTransaction = ListFind(GetBaseTagList(),"CFTRANSACTION")>
> <CFIF NOT inTransaction>
> <CFTRANSACTION>
> </cfif>
>
> some db stuff
>
> <CFIF NOT inTransaction>
> </CFTRANSACTION>
> </cfif>
>
> However, I get the following error: "An extraneous end tag </CFTRANSACTION>
> has been encountered at document position (50:5) to (50:20). End tags cannot
> be present in CFML templates without a matching start tag."
>
> Any thoughts on doing something like this?
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
> ------------------------------------------------------------------------------
> To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.