Hey Mike, If you scope your query as local to the function, the conflict will do away. It's BP for thread safety, etc.:
Instead of: <cffunction name="getEmployees"> <cfquery name="getEmployees">... </cffunction> Do: <cffunction name="getEmployees"> <cfset var getEmployees=""> <cfquery name="getEmployees">... </cffunction> -joe On Thu, 11 Nov 2004 12:28:35 -0500, Michael Dinowitz <[EMAIL PROTECTED]> wrote: > This is not a question, just something I ran into that was interesting. > > Just a small thing I ran into. I'm working with a CFC that has a function in > it called Dupe_Address. This function is called twice in a row. Inside the > function is a query of the same name. When the function is called a second > time, I get an error. Why? > Because the query having the same name as the function 'overwrites' it and > the second call to the function fails. I thought that functions could not > have the name of variables (I.e. things in the variables scope). Never knew > a query would screw it up. > All I had to do in order to fix it was change the query name by adding a q > before the name (my personal standard). > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183965 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54