Reply
How to do SQL query in a ASP while loop
Old 09-07-2004, 05:59 AM How to do SQL query in a ASP while loop
Novice Talker

Posts: 13
Y i cant do SQL Query in ASP while loop, do until, do while loop ?


Code:
    DO WHILE NOT rs6.eof
   sql5 = "SELECT * FROM CK_MO_Testing WHERE Read_Flag = '0' AND Message like 'CK "&rs6("Name")&"%'"
   rs5.open sql5, conn1
   IF rs5.eof AND rs5.bof THEN
	response.write "Nothing"
   ELSE
	response.write rs5("Message")
   END IF
  LOOP
Please help me
superman2004 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 09-08-2004, 06:48 PM
Junior Talker

Posts: 4
superman,

I'm not sure if it is the only thing wrong with your code but it is an infinite loop because rs6 is never incremented (rs6.moveNext).

Are you getting an error or what is going on when you attempt to run the code? I assume it just never comes back because of the infinite loop.

MtnMinded
MtnMinded is offline
Reply With Quote
View Public Profile
 
Old 09-09-2004, 04:35 AM
Novice Talker

Posts: 13
thanks, now i found the way to do it oredi
superman2004 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to do SQL query in a ASP while loop
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11155 seconds with 12 queries