Thank you Paul that did the trick.

Greg M.

-----Original Message-----
From: paul smith [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 10:10 AM
To: CF-Talk
Subject: Re: cftry cftransaction across multiple includes


I would put the CFTRANSACTION before the first CFINCLUDE and /CFTRANSACTION
after the last CFINCLUDE (in other words, at the level of the CASE
statement)

You can also do it with the database instead of ColdFusion, for example in
M$ SQL:

<cfquery name="UpdateAWads" datasource="#REQUEST.Member_DSN#">
SET NOCOUNT ON
BEGIN TRANSACTION
UPDATE AWads SET AdImpressions=AdImpressions + 1,
AdRan=GetDate(),
AdCTR=convert(money,AdClickThrus)/convert(money,AdImpressions)
WHERE AdID=#AdID#
UPDATE AWmonthCharge SET CurrentCharge=convert(money,CurrentCharge) +
convert(money,#cost#) WHERE CampaignID=#CampaignID# AND YearID=#Year1# AND
MonthID=#Month1#
UPDATE MAX_ID SET tbl_AWimpressions = tbl_AWimpressions + 1
DECLARE @MAX INT
SELECT @MAX = tbl_AWimpressions FROM MAX_ID
INSERT INTO AWimpressions(AdID,ImpPos,ImpCost,ImpID)
VALUES(#AdID#,#Row#,#cost#,@MAX)
COMMIT TRANSACTION
SET NOCOUNT OFF
</cfquery>

best,  paul


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to