>         SET NOCOUNT ON
> 
>         SELECT    @orderKey =
> SCOPE_IDENTITY()
> 
>         SET NOCOUNT OFF
> 
>         SELECT @orderKey as orderKey
> 
>     </cfquery>
> 
>     <cfreturn qry_order_commit_1.orderKey>
> 
> </cffunction>

The SET NOCOUNT should be the very first statement. Try moving it before the 
variable declaration.  But is there some reason you need the variable @orderKey 
here? If not, you could simply SELECT SCOPE_IDENTITY() AS OrderKey. 

Though having said that, with CF8+ you could simply use cfquery's result 
attribute to grab the new 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333964
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to