Advertisement

08.04.2008 at 08:06AM PDT, ID: 23619250
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

How can I loop through a stored procedure in Coldfusion using cfstoredproc

Asked by Cashmgmt in ColdFusion Application Server

I have a webpage that loads a table with a company name and the number of clients per company.  I've been using a cfquery and it takes a very long time to load the information.  I have created a stored procedure to do the same thing.  When I run the stored procedure in query analizer, it takes 5/6 seconds to run, a huge improvement!  The problem I'm having is using the stored procedure in coldfusion.  I have the following:

                    <cfstoredproc procedure = "cms_Cust" dataSource = "#Application.dsname#">
                       <cfprocresult name="getlbx">                  
                    </cfstoredproc>                                    
       <CFSETTING ENABLECFOUTPUTONLY="No">

When I load the page, it's only displaying the first record it finds.  How do I loop through it so that it displays all the records found? Thank You in advance for your help!!Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
<cfoutput>
 
<tr bgcolor="#Application.tableHeader#">			
      <td width=1 align="left" valign="bottom" bordercolor="d1cdc6"     bgcolor="d1cdc6"><div align="left"><span class="style6">Company Name</span></div></td>
      <td width=110 align="left" valign="bottom" bordercolor="d1cdc6" bgcolor="d1cdc6"><div align="left"><span class="style6">Number of<br>
      Lockboxes</span></div></td>
      <td width=70 align="left" valign="bottom" bordercolor="d1cdc6" bgcolor="d1cdc6"><div align="left"><span class="style6">Last Processed</span></div></td>
     <td width=84 align="left" valign="bottom" bordercolor="d1cdc6" bgcolor="d1cdc6"><div align="left"><span class="style6">Deposited Checks </span></div></td>
    <td width=114 align="left" valign="bottom" bordercolor="d1cdc6" bgcolor="d1cdc6"><div align="left"><span class="style6">Outstanding<br>
    Exceptions </span></div></td>
   </tr>
  				
   <cfstoredproc procedure = "cms_Cust" dataSource "#Application.dsname#">
    <cfprocresult name="getlbx">                  
    </cfstoredproc>                                     
   <CFSETTING ENABLECFOUTPUTONLY="No">
                      
                      <tr bgcolor="#Application.cellBGTextColor#">
                        
                        <td bgcolor="#tmpBGColor#"><div align="left"><span class="style7">&nbsp;&nbsp;<a href="main.cfm?corporateid=#getco.corporateid#">#getlbx.Company#</a><br>
                        </span></div></td>      
                <td bordercolor="d1cdc6" bgcolor="#tmpBGColor#"><div align="left"><span class="style7">&nbsp;&nbsp;<a href="main.cfm?corporateid=#getco.corporateid#">#getlbx.Lockboxes#</a></span></div></td>
        
                <td bordercolor="d1cdc6" bgcolor="#tmpBGColor#"><div align="left"><span class="style7">&nbsp;&nbsp;<a href="main.cfm?corporateid=#getco.corporateid#">#getlbx.lastdate#</a></span></div></td>
        
                <td bordercolor="d1cdc6" bgcolor="#tmpBGColor#"><div align="left"><span class="style7">&nbsp;&nbsp;<a href="main.cfm?corporateid=#getco.corporateid#">#getlbx.Count#</a></span></div></td>
        
                <td bordercolor="d1cdc6" bgcolor="#tmpBGColor#"><div align="left"><span class="style7">&nbsp;&nbsp;<a href="main.cfm?corporateid=#getco.corporateid#">0</a></span></div></td>
			          </tr>
                    </cfoutput>
[+][-]08.04.2008 at 08:12AM PDT, ID: 22153106

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: ColdFusion Application Server
Sign Up Now!
Solution Provided By: erikTsomik
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628