Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP Classic RecordSet loop

Posted on 2015-02-19
4
Medium Priority
?
143 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
[X]
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
4 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

730 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