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,
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

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192564
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

Reply via email to