Well, If the method called can call one proc and is returning two record sets which are required - sure they are not calling the same data sets but they may be required - and one hit to the DB is better than separate calls - if there is certainly good reason and better performance over your idea I would be happy to try it out!
Also the SP would probably not get called again and again internally for as long as the Query/Query plan is cached on SQL Server. -----Original Message----- From: Marc Campeau [mailto:[EMAIL PROTECTED] Sent: 03 March 2005 15:24 To: CF-Talk Subject: Re: Stored Procedures in a CFC I would do it differently (then returning a struct/array with both recordset). Please give comments/suggestions/whatevers as I'm just thinking out loud. In essence, your SP returns two recordsets which don't hold the same data, they could be related but they are not the same. Why not create two methods for your CFC each returning one of these recordsets. They would both use another private method which would run the SP and then store its results in private variables. It would also ensure that the SP isn't run again and again if it's been run recently. Two me that's better encapsulation. The Application doesn't have to know how the CFC gets the recordsets all it knows is that by calling either of the methods it will get back the data it needs. -- Marc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:197249 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