I call a stored procedure via classic ASP (1.1). I loop through the results and print out items on a page. Pretty basic concept but what I'm finding is that if a row from the database comes back as null, the next row doesn't display even though it's not null and has data in it. See the code below:
Expand|Select|Wrap|Line Numbers
- details1Query = "EXECUTE storedprocedure"
- set details1RS = conn.Execute(details1Query)
- do while not details1RS.eof
- Response.Write("value1: " & details1RS("value1") & "<br>")
- Response.Write("value2: " & details1RS("value2") & "<br>")
- Response.Write("value3: " & details1RS("value3") & "<br>")
- Response.Write("value3: " & details1RS("value4") & "<hr>")
- details1RS.MoveNext
- loop
value1 has text - it will print out fine
value2 is null - Nothing prints
value3 has text - nothing prints
value4 has text - it will print out fine
If I comment out value2 then value3 prints. Any ideas why this would be occuring? It appears that if a value is null then it breaks the next row underneath it. The stored procedure that it is calling joins multiple tables together. value2 and value3 are from different tables. Any information would be helpful.
Thanks