Didn't think it would be this complex, but:

<!--- process order --->
<cfset dbManager = new DatabaseManager />
<cfset canContinue = "false" />
<cftransaction action="BEGIN" />
        <cfset uniqOrderId = generateID() />
        
        <cfset canContinue = dbManager.doInsert(cartObject.getDatabase(),
uniqOrderId, cartObject.generateQueryString()) />

        <cfif canContinue>
                <cfset canContinue =
dbManager.doInsert(paymentObject.getDatabase(), uniqOrderId,
paymentObject.generateQueryString()) />
        <cfelse>
                <cftransaction action="ROLLBACK" />
        </cfif>

        <cfif canContinue>
                <cfset canContinue =
dbManager.doInsert(shopperObject.getDatabase(), uniqOrderId,
shopperObject.generateQueryString()) />
        <cfelse>
                <cftransaction action="ROLLBACK" />
        </cfif>

<cfif canContinue>
        <cftransaction action="COMMIT" />
</cfif>


The DatabaseManager.cfc handles the actual CFQuery calls.

My question is - could this work?

Its probably rubbish code, but hey - its 10.30 on a Sunday night :)

-Bryan


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of barry.b
> Sent: Sunday, 15 February 2004 10:04 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] Re: cfc's and cftransactions
> 
> 
> mate, can you put the idea down as pseudocode, just to make 
> it clear what
> you want to do?
> 
> cheers
> barry.b
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to 
> [EMAIL PROTECTED]
> 
> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> http://www.mxdu.com/ + 24-25 February, 2004
> 


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to