>> What if you have four concurrent users (or four hundred if >> your app get popular!), what happens if user two gets user >> three's id when she runs LAST_INSERT_ID()? > >This is exactly why databases provide concurrency control. You should use >it. > >> That's the one of the only reasons I can see for using >> alternate keys. Whether it is a UUID created in Coldfusion >> or someother unique value...you KNOW what it is...everytime, >> because you set it, not the DB. > >That's great, as long as there are no other clients using the same database. >Databases provide this functionality for a reason. > >Dave Watts, CTO, Fig Leaf Software >http://www.figleaf.com/ > >Fig Leaf Training: Adobe/Google/Paperthin Certified Partners >http://training.figleaf.com/ > >WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! >http://www.webmaniacsconference.com/
You can use @@identity in a sql statement. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301942 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

