Solved

ASP Classic RecordSet loop

Posted on 2015-02-19
4
126 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 33

Accepted Solution

by:
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)
            rs_attorneys.MoveNext
        Loop
    End If
0
 
LVL 33

Expert Comment

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

Author Comment

by:amucinobluedot
ID: 40627479
Sorry Big, it worked perfectly.

Thank You!!
0
 
LVL 33

Expert Comment

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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

810 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