AM I using DO WHILE NOT and EOF in VBscript Properly
Posted
by
Derek Drummond
on Stack Overflow
See other posts from Stack Overflow
or by Derek Drummond
Published on 2012-06-20T20:38:26Z
Indexed on
2012/06/20
21:16 UTC
Read the original article
Hit count: 242
This block of code is causing my page to fail to load. When I comment out the line `DO WHILE NOT Rs.EOF the page loads properly.
SQL_Command_String = "SELECT * FROM Seminars WHERE [SeminarID] = 5 ORDER BY DESC"
Rs = SQLConnection.Execute(SQL_Command_String)
DO WHILE NOT Rs.EOF
file1 = "./seminars/" & seminar_type & "/" & seminar_year & "/" & Rs("Date") & "-" & Rs("Year") & "_" & Rs("Last") & ".pdf"
file2 = "./seminars/" & seminar_type & "/" & seminar_year & "/" & Rs("Date") & "-" & seminar_year & "_" & Rs("Last") & "(handouts).pdf"
file3 = "./seminars/" & seminar_type & "/" & seminar_year & "/" & Rs("Date") & "-" & seminar_year & "_" & Rs("Last") & "_Flyer.pdf"
Rs.MoveNext
loop
Is the SQL_Command_String an invalid SQL Command or is my reader not being used properly when I try to build that specific file path e.g. Rs("Date")?
Is there an option where I could do something like:
DO WHILE RS.hasNextLine
© Stack Overflow or respective owner