Not sure why you would need a trigger when SCOPE_IDENTITY would do the trick (or @@identity depending on your needs)
"This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant, Richmond, Surrey, TW9 1DN, 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 -----Original Message----- From: James Holmes To: CF-Talk Sent: Fri Oct 06 06:23:34 2006 Subject: Re: locking, I think Yes, but then we are back to the original question of how to get that last ID from the DB so the code can use it. To be completely safe, there are two alternatives: 1) Use a trigger on the table to perform an "autoincrement" operation with the sequence. Wrap the INSERT and the subsequent SELECT MAX(someID) in a cftransaction, with an isolation level of serializable. This last bit is important. 2) Get the value from the sequence first and then do the insert, remembering the value that was obtained from the sequence. This can be done in a stored procedure or in CF code. On 10/6/06, Aaron Rouse <[EMAIL PROTECTED]> wrote: > For people who are used to SQL server, the best thing to do would be to > setup a trigger and that trigger in Oracle could grab the next sequence > value and insert it when new data is being inserted into the table. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255762 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4