On 12/12/05, Chris Velevitch <[EMAIL PROTECTED]> wrote:
> On 12/13/05, Sean Corfield <[EMAIL PROTECTED]> wrote:
> > Your tags don't match (i.e., they are not correctly nested). You
> > cannot split a try/catch across multiple tag executions like that.
> Yes, but how do I extend the cftransaction to do what I'm trying to
> do? Does doing in CFX work?

I'm pretty sure you can't... custom tags can execute code before and
after the body (and the "end" execution has access to the *text* of
the body) but you can't make a custom tag that acts like a <cfloop>
and actually executes CFML code like that...

The closest you could get would be:

<cf_transaction retry="3" datasource="foo" name="fooSelect">
.... some SQL here ...
</cf_transaction>

and have the end tag execution do everything (looping over a try/catch
containing cfquery tags containing the SQL). Your SQL could be
multiple statements (separated by, say, ; ) which your custom tag
would split out into separate strings - and therefore separate cfquery
tags. And then you'd have to synthesize cfqueryparam yourself... a lot
of work...

(credit to Ben Forta for most of that idea - he just happened to be
online while I was trying to answer this!)
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226897
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to