Yes. Any time a variable is set inside a CFC method, it should have the var keyword unless you WANT it to be available to other methods in the CFC (i.e. you want it to be in the CFC wide variables scope). This goes for CFPARAM, CFQUERY, and every (every) other location where a variable is set. My practice is to do: <CFSET var qProducts=""> <CFQUERY name="qProducts".....
The question you have to ask yourself is how and why you're using the CFPARAM tag. > Hi, > > I know that when you declare a variable inside a method of cfc, you should > use the var keyword in front of it to prevent any conflict with variables > outside of it. That is the case with cfset. What about cfparam? When > you declare a variable with cfparam, do you have to worry about that? > > Johnny > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197884 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54