Thanks everybody. I knew I was close. The resultset attribute was the key thing I was missing. I guess if I would have read a little deeper, I could have figured it out.
Thanks again! Mark -----Original Message----- From: Kwang Suh [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 12:37 PM To: CF-Talk Subject: Re: Stored Procedure Question To add to this, you can also create multiple querysets from one query. Just do: <cfprocresult name="result1" resultset="1"> <cfprocresult name="result2" resultset="1"> <cfprocresult name="result3" resultset="1"> <cfprocresult name="result4" resultset="1"> <cfprocresult name="result5" resultset="1"> In fact, you can also do: <cfprocresult name="result1" resultset="5"> <cfprocresult name="result2" resultset="1"> <cfprocresult name="result3" resultset="2"> <cfprocresult name="result4" resultset="4"> <cfprocresult name="result5" resultset="3"> Just so you can drive other developers crazy :) ----- Original Message ----- From: "Jared Stark" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, October 04, 2001 9:35 AM Subject: Re: Stored Procedure Question > > <cfstoredproc procedure="procedure_name" datasource="#maindsn#"> > > <cfprocresult name="result1"> > > <cfprocresult name="result2"> > > </cfstoredproc> > > The only difference is you need to add the RESULTSET attribute, like this... > <cfprocresult name="result1" resultset="1"> > <cfprocresult name="result2" resultset="2"> > > The RESULTSET attribute is what determines where the results go. They > simply go in order > of where they are placed in your stored procedure, so if you have > > Select * from people > > Select * from animals > > The results from the people table would be in result1, and the results from > the animal table would > be in result2. > > Pretty slick, eh? > > JS > > ----- Original Message ----- > From: "Mark Stewart" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Thursday, October 04, 2001 8:17 AM > Subject: Stored Procedure Question > > > > All, > > > > I've been using stored procedures for a while now but I've never really > > needed to create one that returned multiple result sets. My question is, > > how do you do that? Would someone be kind enough to show me a little > > pseudo code or a snippet of code on how to accomplish this? > > > > I assume in cf, I would build my cfstoredproc like this: > > > > <cfstoredproc procedure="procedure_name" datasource="#maindsn#"> > > <cfprocresult name="result1"> > > <cfprocresult name="result2"> > > </cfstoredproc> > > > > But I draw a blank when it comes to building the stored proc in SQL > > Server where it would return multiple results. I assume the following: > > > > create procedure [procedure] as > > > > select ... from ... where... > > > > select ... from... where... > > > > How do I specify what query goes with what result? > > > > Thanks for your help! > > > > Mark > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

