RE: CF9 cfquery not giving same insert results as CF7

2010-01-29 Thread DURETTE, STEVEN J (ATTASIAIT)
: Thursday, January 28, 2010 9:10 PM To: cf-talk Subject: Re: CF9 cfquery not giving same insert results as CF7 I've found a query that used Select @@Identity as NewAgentID without having a Set NoCount on or off. This query still worked and did not have to be altered at all. That brings up

Re: CF9 cfquery not giving same insert results as CF7

2010-01-29 Thread Michael Dinowitz
Thanks. This gives me a bit of extra information on top of the research I've done on the topic. Now comes a few extended questions. :) 1. When a cfquery has a result attribute defined, it will return data about the query and in the case of an insert, the id of the inserted item. The assumption

RE: CF9 cfquery not giving same insert results as CF7

2010-01-29 Thread DURETTE, STEVEN J (ATTASIAIT)
29, 2010 9:37 AM To: cf-talk Subject: Re: CF9 cfquery not giving same insert results as CF7 Thanks. This gives me a bit of extra information on top of the research I've done on the topic. Now comes a few extended questions. :) 1. When a cfquery has a result attribute defined, it will return data

RE: CF9 cfquery not giving same insert results as CF7

2010-01-29 Thread Leigh
As for the SET NOCOUNT ON and SET NOCOUNT OFF, they have no effect on these.  The only thing that does is prevent extra network traffic by stopping the extra reporting of how many rows were affected for each piece of the query. In CF8 it did have an effect on cfquery's in some situations.

Re: CF9 cfquery not giving same insert results as CF7

2010-01-28 Thread Michael Dinowitz
: CF9 cfquery not giving same insert results as CF7 OK, so it turns out that this is a known issue that came into effect between CF 7 and CF 8. I can do one of three things here. 1. replace the name attribute with the result attribute: cfquery name=AddAgent becomes cfquery result=AddAgent 2

Re: CF9 cfquery not giving same insert results as CF7

2010-01-27 Thread Michael Dinowitz
OK, so it turns out that this is a known issue that came into effect between CF 7 and CF 8. I can do one of three things here. 1. replace the name attribute with the result attribute: cfquery name=AddAgent becomes cfquery result=AddAgent 2. add a result attribute of the same name to the

Re: CF9 cfquery not giving same insert results as CF7

2010-01-27 Thread Mahcsig
Depending on the database, you could also try just adding: SELECT identityfield = SCOPE_IDENTITY() to the end of the insert queries, this one is SQL Server specific though. ~Mahcsig On Wed, Jan 27, 2010 at 1:25 PM, Michael Dinowitz mdino...@houseoffusion.com wrote: OK, so it turns out

RE: CF9 cfquery not giving same insert results as CF7

2010-01-27 Thread Brook Davies
[mailto:mdino...@houseoffusion.com] Sent: January-27-10 1:26 PM To: cf-talk Subject: Re: CF9 cfquery not giving same insert results as CF7 OK, so it turns out that this is a known issue that came into effect between CF 7 and CF 8. I can do one of three things here. 1. replace the name attribute