>- see footer for list info -<
OK thanks guys some useful info there

Info about erroring is useful and that it won't rollback if no deletion done.

Second table is an action table to record a host of different actions
being performed on a business area - they want an audit trail of the
deletion and from which table



On 5/17/05, Robertson-Ravo, Neil (RX)
<[EMAIL PROTECTED]> wrote:
> >- see footer for list info -<
> Better practice would be to perform a logical delete rather than a physical.
> Add the following columns to the main table.... bDeleted (bit), dDeletedBy
> (varchar/ID as you see fit), dDateDeleted (datetime) column to the table and
> perform the deletes that way.  What purpose would adding and writing another
> table to track deletes etc when you can do it all in one.
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Richard Lovelock
> Sent: 17 May 2005 11:19
> To: cfdev
> Subject: [CF-Dev] CFTRANSACTION and DELETEs
> 
> >- see footer for list info -<
> I have a block of code that needs to delete a record from a table and
> insert an action audit trail of the deletion in to a different table.
> 
> Something like:
> 
> Delete from X where ID = 1
> 
> Insert into Y Values 1, deleted
> 
> Is this a good place to use CFTRANSACTION around the whole block of two
> queries?
> 
> As I understand - the cftransaction will not perform the second query
> if the first is not successful. If the first query didn't find any
> matching records to delete (i.e. not on the table), would this count
> as 'not successful' and therefore skip the bottom query?
> 
> Hope that's clear!?
> 
> --
> 
> Richard Lovelock
> _______________________________________________
> 
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
> 
> --
> 
> >- Hosting provided by www.cfmxhosting.co.uk -<
> >- Forum provided by www.fusetalk.com -<
> >- DHTML Menus provided by www.APYCOM.com -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
> This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
> Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
> Registered in England, Number 678540.  It contains information which is
> confidential and may also be privileged.  It is for the exclusive use of the
> intended recipient(s).  If you are not the intended recipient(s) please note
> that any form of distribution, copying or use of this communication or the
> information in it is strictly prohibited and may be unlawful.  If you have
> received this communication in error please return it to the sender or call
> our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
> communication are not necessarily those expressed by Reed Exhibitions.
> Visit our website at http://www.reedexpo.com
> _______________________________________________
> 
> For details on ALL mailing lists and for joining or leaving lists, go to 
> http://list.cfdeveloper.co.uk/mailman/listinfo
> 
> --
> CFDeveloper Sponsors:-
> >- Hosting provided by www.cfmxhosting.co.uk -<
> >- Forum provided by www.fusetalk.com -<
> >- DHTML Menus provided by www.APYCOM.com -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
> 


-- 
Richard Lovelock
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to