Rick Faircloth wrote: > The ID that was generated is maintained in the server on a per-connection > basis. > This means that the value returned by the function to a given client is the > first AUTO_INCREMENT value generated for most recent statement affecting an > AUTO_INCREMENT column by that client. This value cannot be affected by other > clients, > even if they generate AUTO_INCREMENT values of their own. This behavior > ensures > that each client can retrieve its own ID without concern for the activity > of other clients, and without the need for locks or transactions. > ============================================================================== > > Am I wrong in my understanding? No locks, no transactions needed?
Correct. However, you need to make sure that all your queries use the same connection. In order to do that you need a transaction. (There is some implicit behavior in Adobe's CFML engine that makes all queries in a single request use the same connection, but in for instance the CFML engine from NewAtlanta every query in a request can use a different connection.) Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:301929 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

