Solved

ASP Classic RecordSet loop

Posted on 2015-02-19
4
122 Views
Last Modified: 2015-02-24
I have a page in asp that calls different recordsets, In order to write this on a simple txt page we created this loop:

Do until rs_usermap.EOF
redim lista(cont)
lista(cont) = " + "&  rs_usermap("QFrsvalue")
valor = rs_usermap("QFrsvalue")
rs =Mid( valor, InStr(valor,  "rs_"), InStr(valor, ".Fields")-2)
inicio = InStr( valor, "(" & Chr(34))+2
 fin = InStr(valor,  "Val")-3
    field = Mid(valor, inicio, fin - inicio)

Case "rs_Beneficiary"
    If Not rs_Beneficiary.EOF then
      Response.Write rs_Beneficiary(field)
    End If
Select Case rs
  Case "rs_attorneys"
    If Not rs_attorneys.EOF then
      Response.Write rs_attorneys(field)
    End If
rs_usermap.MoveNext
cont=cont +1
Loop

Now, the problem I have is that "rs_attorneys" has more than 1 row on the recordset.
How could I program the loop so that it writes all the rows on "rs_attorneys" and then move to the next recordset ?
0
Comment
Question by:amucinobluedot
  • 3
4 Comments
 
LVL 32

Accepted Solution

by:
Big Monty earned 500 total points
Comment Utility
Try this:

Select Case rs
  Case "rs_attorneys"
    If Not rs_attorneys.EOF then
       Do while not rs_attorneys.eof
           '-- write out your fields here
            Response.Write rs_attorneys(field)
            rs_attorneys.MoveNext
        Loop
    End If
0
 
LVL 32

Expert Comment

by:Big Monty
Comment Utility
did this resolve your issue?
0
 

Author Comment

by:amucinobluedot
Comment Utility
Sorry Big, it worked perfectly.

Thank You!!
0
 
LVL 32

Expert Comment

by:Big Monty
Comment Utility
No prob just wanted to make sure you got it working
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now