asp loop question

M

matt shudy

Hi,

I have a page where I am trying to populate a table. I
wrote

Do While Not objNO.EOF AND objTR.EOF
Response.Write "<TR><TD>" & objNo("No") & "</TD>"
Response.Write "<TD>" & objTR("Target") & "</TD></TR>"

objNO.MoveNext
objTR.MoveNext
Loop

But it retuns no results... There are no errors thrown.
Do you have any ideas on what i should check?

Thanks,

Matt
 
J

Jim Cheshire

Matt,

Without seeing all of your code, it's hard to say, but it's highly likely
that this loop will never run. Maybe it should be:

Do While Not objNo.EOF And Not objTR.EOF.

:)

--
Jim Cheshire
Jimco Add-ins
Add-ins for FrontPage 2000-2003
http://www.jimcoaddins.com
===============================
Co-author of Special Edition
Using Microsoft FrontPage 2003
 
M

matt shudy

Thank You so much!!! I've been at it for a long time
trying millions of different combinations, and finally I
thought I should just post a message.

Thanks again,

Matt
 
K

Kevin Spencer

I sure hope that both results sets will always have the same number of rows!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Complex things are made up of
lots of simple things.
 
J

Jim Cheshire

Well if not, he'll obviously (to some) need to change the And to Or. As I
said, hard to say without knowing more.

--
Jim Cheshire
Jimco Add-ins
Add-ins for FrontPage 2000-2003
http://www.jimcoaddins.com
===============================
Co-author of Special Edition
Using Microsoft FrontPage 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top