You should probably look into using scope_identity() rather than the method you use below...that may help you out a bit...
 
INSERT into blah(....) values(....)
SELECT ID = SCOPE_IDENTITY()
 
Rowcount can cause some headaches...
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Jeff Howard
Sent: Wednesday, October 04, 2006 9:50 AM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Issue with return from cfquery

So I got access to the CF Admin this morning and between that and Profiler I can see what is causing my issue and can resolve.  Thanks for everyone's help once again.  It was a comination of advice that got me to this point.
 
Now I was wondering if anyone could tell me why this issue is happening to try and avoid/combat it in the future.
 
When I add a new record to the db I immediately pull that id back out with this query:
 
SET  ROWCOUNT 1
     SELECT id
     FROM table
     ORDER BY id DESC
 
This seems to set the rowcount for ALL queries after this one.  When I uncheck "Maintain connections across client requests" it works fine, but as long as the box is checked the 'rowcount' remains one for all requests to this db.
 
Can anyone give a brief explaination of the 'why' for me on this.
 
thanks for all the help,
Jeff


Stay in the know. Pulse on the new Yahoo.com. Check it out.
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------

-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------

Reply via email to