Barry,

I don't mean nested transactions as such (nesting across databases), but the
nesting of the tag itself. This trick has been around ever since
cftransaction was introduced.

If I read the docs right, I would assume you can rollback and commit as 2
separate transactions. But like I said I haven't done this for so long
now....

Regards
Andrew Scott




-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Barry Beattie
Sent: Monday, 7 July 2008 5:05 PM
To: [email protected]
Subject: [cfaussie] Re: How do I do concurrent database CRUD in the same
application?


"Now the thing that I am not 100% sure on is a nested cftransaction"


sorry, they are an item that was conspicuous in it's absence in CF8.
for us who are used to such things elsewhere it's something that could
come in handy (although they do have their own pain, as far as how CF
would be able to deploy the idea)


maybe for CF9?

http://www.alagad.com/go/blog-entry/cf-wishlist-named-transactions




On Mon, Jul 7, 2008 at 4:52 PM, CyberAngel <[EMAIL PROTECTED]> wrote:
>
> Chris,
>
> I am surprised you haven't gotten a reply as of yet.
>
> The way I understand it, and I haven't had a chance to look at it yet. But
> if I think it works the way it should then you could do something like
this.
>
> <cftry>
>  <cftransaction action="begin">
>  </cftransaction>
>  <cfcatch>
>  </cfcatch>
>  <cftransaction action="commit" />
> </cftry>
>
> Now the thing that I am not 100% sure on is a nested cftransaction
> action="commit" so it could look something like this.
>
> <cftry>
>  <cftransaction action="begin">
>
>  <cftransaction action="commit">
>   ... Do the log transfer....
>  </cftransaction>
>  </cftransaction>
>  <cfcatch>
>  </cfcatch>
>  <cftransaction action="commit" />
> </cftry>
>
> However, if it was me and I am not sure how you are doing this or what
logic
> you have. But it sounds like a log is going to happen no matter if a
> transaction to the DB is successful or not. Which means this is your
better
> bet.
>
> <cftry>
>  <cftransaction action="begin">
>  .. do your sql logic here
>  </cftransaction>
>  <cfcatch>
>  <cftransaction action="rollback" />
> </cfcatch>
> </cftry>
> <cftransaction action="commit">
>  ... Do the log transfaction....
> </cftransaction>
>
> This way the log is done no matter what, but both scenarios should work.
> Just never done it myself.
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf
> Of Chris Velevitch
> Sent: Monday, 7 July 2008 11:28 AM
> To: [email protected]
> Subject: [cfaussie] How do I do concurrent database CRUD in the same
> application?
>
>
> How do you do application logging into the same database inside a
> transaction that might get rolled back?
>
> --
> Chris
> --
> Chris Velevitch
> Manager - Adobe Platform Users Group, Sydney
> m: 0415 469 095
> www.apugs.org.au
>
> Adobe Platform Users Group, Sydney
> July meeting: Taming The Code
> Date: Mon 28th July 6pm for 6:30 start
> Details to follow.
>
>
>
> >
>



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to