On Wed, Apr 28, 2010 at 1:51 PM, Che Vilnonis <ch...@asitv.com> wrote:
> > When using "set nocount on", "select @@identity as xyz" and "set nocount > off" in a cfquery, how can I be certain that two transactions that occur at > roughly the same time obtain the proper incremental id from an Identity > column? Is their a SQl equivalent to CF's cflock tag? > > Thanks, Che > > On MS SQL server I believe anyting above 2000 use the output clause <cfquery> insert into table (col1, col2, col3) output inserted.ID values (col1Val,col2Val,col3Val) </cfquery> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333189 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm