At 02:03 PM 2/11/2003 -0500, Neil H. wrote:
>I recently changed some code from using select MAX(ID) from table to select
>@@identity and it is throwing serialization errors out the wazoo!  Can
>anyone shed some light on the subject and offer a way to improve this so
>errors are not thrown?  I was thinking of using a SP instead of my CF code
>but I would appreciate any suggestions!

I use this all the time without worries.

<cfquery>
         set nocount on
         (query syntax)
         select VarName = @@identity
         set nocount off
</cfquery>
<cfset SomeOtherVar = yourqueryname.VarName>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to