alright, I'm gonna try to get the number from DUAL and insert that. I'd like to try triggers, but the last time I tried to make them, I had problems. We aren't allowed to use a GUI (managing tool) to work with the DB. Admittedly, I was pretty much a complete novice at the time. So when I have time I'd like to try again.
Thanks for the sequence information. I had once learned that it's its own table but I had forgotten completely. >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. > >-- >CFAJAX docs and other useful articles: >http://www.bifrost.com.au/blog/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:255814 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4