That seemed to work, but I don't think for the reason you specified.  

I have also gotten it to work this way

My original query was something like this:


<cfquery name="someqry" datasource="somedns">
Insert into sometable (somefields) 
Select somefields from someothertable
Select SCOPE_IDENTITY() as someid
Where someID=<cfqueryparam cfsqltype="cf_sql_integer"
value="#arguments.someId#">
</cfquery>

I have changed it to the following:

<cfquery name="someqry" datasource="somedns">
Declare @someid integer
Set @someid=<cfqueryparam cfsqltype="cf_sql_integer"
value="#arguments.someId#">
Insert into sometable (somefields) 
Select somefields from someothertable
Select SCOPE_IDENTITY() as someid
Where [EMAIL PROTECTED]
</cfquery>


I think the cf engine has somewhere code similar to the following:

If qrytext startswith "insert" or qrytext startswith "update" or qrytext
startswith "delete"
   //null the query variable
   Qrynameref=null;

Basically this is a bug in CF... how do we get them to fix it?  I don't
think we can roll out our app to CF8 until this is fixed... we potentially
have dozens of these. 

Russ
> -----Original Message-----
> From: C S [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 15, 2008 4:16 PM
> To: CF-Talk
> Subject: Re: cf8 query weirdness
> 
> >Any other suggestions?
> 
> Wrap the whole thing in a set nocount on/set nocount off to prevent
> rowcounts from interfering with the query results.
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299139
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to