Yep, indeed. They should also not be using @@identity :-)
-----Original Message----- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: 04 April 2006 03:51 To: CF-Talk Subject: cftransaction I'm looking through someone elses code and I came across this... <cftransaction> <cfquery name="qInsertData" datasource="#APPLICATION.dsn#"> INSERT INTO t_doctors (#ColNames#) VALUES (#preserveSingleQuotes(ColValues)#) </cfquery> </cftransaction> <!--- pull the pkey back out ---> <cftransaction> <cfquery name="get_new_pkey" datasource="#APPLICATION.dsn#"> SELECT @@identity AS newpkey </cfquery> </cftransaction> having the queries in separate transactions doesn't do anything at all, does it? Wouldn't the whole thing need to be wrapped in cftransaction for it to be effective/ Rick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236864 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54