February 24th, 2011, 09:16 AM
Baffled by Do While Loop
I consider myself pretty advanced when it comes to ASP and am very familiar with simple coding such as if then else and do until statements, but this one has me stumped. After opening a database I am attempting to run a bit of code such as
do until rs.eof
Problem is that that crashes my page. When I remove the do until and insert my block of code followed by a rs.movenext and another block of code it works, meaning I am not at the eof I am a bit clueless as to how to proceed...
Today the world, tomorrow the universe...
February 24th, 2011, 12:06 PM
There's nothing wrong with the loop structure so you must have some problem with the 'do-ing' stuff. maybe if you described what you mean by 'page crashes'?
Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
February 25th, 2011, 08:17 AM
I haven't done *tons* of Classic ASP programming, but I've never seen a recordset processed with a Do Until. For whatever reason, I've *always* seen it done with a Do While. Like this:
Give that a try and see what happens ?
If not rs.EOF Then
Do while not rs.EOF
// code goes here
Certainly can't hurt.