ASP Classic RecordSet loop

Posted on 2015-02-19
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
cont=cont +1

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 ?
Question by:amucinobluedot
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 33

Accepted Solution

Big Monty earned 500 total points
ID: 40619650
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)
    End If
LVL 33

Expert Comment

by:Big Monty
ID: 40625816
did this resolve your issue?

Author Comment

ID: 40627479
Sorry Big, it worked perfectly.

Thank You!!
LVL 33

Expert Comment

by:Big Monty
ID: 40627983
No prob just wanted to make sure you got it working

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : All lightning effects with instructions : http://www.mediaf…

615 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