James Holmes wrote: > You can generally avoid the problem with a cftransaction tag if you're > doing the MAX(id) thing, but the other solutions are better > (especially the new CF8 goodies which, for example, are a life saver > for Oracle).
I've tried using the result.identitycol trick with CF8 and MSSQL and for me, it doesn't work. I just get an error. So what I've stuck to is this... Before the first insert, I do <cfset now = Now()> Then in the insert, for my date_added value, I use #now#. Then after that, when I do my select MAX(id), I also add where date_added = '#now#' AND I also wrap the whole thing in a cftransaction... Rob ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311262 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4