We tend to avoid them since we use SP's for all our SQL anyway. We find it easier to manage. Personally I don't like triggers - I think they are evil.
;-) -----Original Message----- From: Jeff Garza [mailto:[EMAIL PROTECTED] Sent: 01 February 2005 16:11 To: CF-Talk Subject: Re: EASY: grabbing the id of a newly created item.. Triggers have their place and we use them judiciously. You just have to really keep on top of your documentation so you understand what's happening when you do an insert. I'd much rather use a trigger than have to code a whole bunch of extraneous CF to acheive the same goal. The other advantage for triggers is that they operate independantly of the mechanism used to create the entry. A lot of our apps have both a web based interface and an MSAccess interface to the same data. Cheers, Jeff Garza ----- Original Message ----- From: "Robertson-Ravo, Neil (RX)" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Tuesday, February 01, 2005 8:50 AM Subject: RE: EASY: grabbing the id of a newly created item.. > Best to avoid triggers full stop. > > -----Original Message----- > From: Jeff Garza [mailto:[EMAIL PROTECTED] > Sent: 01 February 2005 15:41 > To: CF-Talk > Subject: Re: EASY: grabbing the id of a newly created item.. > > If you are using SQL Server 2000, I would recommend moving away from using > @@IDENTITY as it can return incorrect information if you have a trigger > set > up on the table you are inserting into. It will return the ID from the > Trigger action rather than the newly inserted row. SCOPE_IDENTITY() does > not have these issues. That's all we use now as I've been burned once > where > > the DBA added a trigger to a table without my knowledge... Took the > longest > time to figure out why that process wasn't working. > > Cheers, > > Jeff Garza > > ----- Original Message ----- > From: "Robertson-Ravo, Neil (RX)" <[EMAIL PROTECTED]> > To: "CF-Talk" <[email protected]> > Sent: Tuesday, February 01, 2005 8:20 AM > Subject: RE: EASY: grabbing the id of a newly created item.. > > >> SQL Server is simply @@IDENTITY >> >> 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:192571 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

