ASP循环问题
最近在搞一个小程序,里面有一段循环不知怎么写,大家帮帮忙?要求:
1.因为记录中可能有多条相同的(ID不一样)的记录,这时,如果发现记录中有记录的"TYPE"字段为TRUE,就转向操作页面.
2.如果记录TYPE全是FALSE,就提示"记录不存在"
本人新手,大家帮帮忙!
本人写的草稿:
Set rs=conn.execute("select * from samplelog where borrower='"&borrower&"' and location='"&location& "'")
do while rs("type")=true
response.Write "<script>"
response.write "window.location.href='return1.asp';"
response.end
exit do
response.Write "<script>"
response.Write "alert('此样品已归还!');"
response.write "window.location.href='return.asp';"
response.write "</script>"
response.end
movenext
loop