Here's the code I'm running:
if oRS2.Read() then
Response.write("<B>Show schedule for dates:</b> ")
%>
<select name="ddlist" onClick= " = '' + this.options[this.selectedIndex ].value;">
<%
While oRS2.Read()
Response.Write("<option value=" & oRS2("scheduleid") & ">" & FormatDateTime(oRS2("datefrom"),1) & " - " & FormatDateTime(oRS2("dateto"),1) & "</option>")
End While
end if
Response.Write("</select>")
%>
This code works, however it eliminates the first record with the "if oRS2.Read() then" line. How can I determine if a reader holds any records without moving the reader to the next record?
if oRS2.Read() then
Response.write("<B>Show schedule for dates:</b> ")
%>
<select name="ddlist" onClick= " = '' + this.options[this.selectedIndex ].value;">
<%
While oRS2.Read()
Response.Write("<option value=" & oRS2("scheduleid") & ">" & FormatDateTime(oRS2("datefrom"),1) & " - " & FormatDateTime(oRS2("dateto"),1) & "</option>")
End While
end if
Response.Write("</select>")
%>
This code works, however it eliminates the first record with the "if oRS2.Read() then" line. How can I determine if a reader holds any records without moving the reader to the next record?