|
-
Mar 12th, 2001, 12:55 PM
#1
Thread Starter
New Member
Hi guys,
I have a loop to write out the contents of my query.
<%
do while NOT oRSv.EOF
Response.Write "<option value='" & oRSv("Date") & "'>"
Response.Write oRSv("Date") & "</option>   "
Response.Write "<option value='" & oRSv("Step") & "'>"
Response.Write oRSv("Step") & "</option><br>"
oRSv.MoveNext
Loop
oRSv.Close
Set oRSv=nothing
%>
its in an asp page but its writting out my data 5 times instead of once. because the number of frecords differ everytime I have no way of stopping this.
Any Ideas?
-
Mar 12th, 2001, 01:08 PM
#2
Hyperactive Member
Try this:
Code:
Do Until oRSv.EOF
Response.Write "<option value='" & oRSv("Date") & "'>"
Response.Write oRSv("Date") & "</option> "
Response.Write "<option value='" & oRSv("Step") & "'>"
Response.Write oRSv("Step") & "</option><br>"
oRSv.MoveNext
Loop
-
Mar 12th, 2001, 01:27 PM
#3
Thread Starter
New Member
still no luck
nope it didnt work
thanks anyway
-
Mar 21st, 2001, 03:21 PM
#4
Addicted Member
What are you trying to do?
You know I read your post and the others and I am not sure what it is you want to do with the code?
Your code is setup to do a query and then loop through all the results (5, 10, however many) and print them out. If you have 10,000 records and there is no restrictions in your query it will continue to run.
So what is it you want to see?
-
Mar 21st, 2001, 05:35 PM
#5
Member
yea... u need to show us your querystring
also don't forget about Exit Do.
-
Mar 22nd, 2001, 06:26 AM
#6
Thread Starter
New Member
resolved
I was only new to sql server 7 and i imported the data too many times, silly me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|