> 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?

BEGIN TRANSACTION ... END TRANSACTION

If you're using a newer version of SQL Server, you may want to use
SCOPE_IDENTITY() instead of the @@IDENTITY global variable.

http://msdn.microsoft.com/en-us/library/ms190315.aspx

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:333188
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to