Asp Access 读数据问题
日期:2006-06-12 荐:
Asp Access 读数据问题<% @ language=vbscript %> <html><head><title>read from mdb</title></head><body><H5>< %set cn=Server.CreateObject("AdODB.Connection")cn.open "driver={Microsoft Access Driver (*.mdb)};dbq=f:\study\www\mydb.mdb;"set rs=Server.CreateObject("AdODB.recordset")strQuery="SELECT * FROM PERSON"rs.open strQuery,cnif rs.eof then response.write "Not Record..." else do while not rs.eof response.write "<P>" & "<H3>" & rs("name") & "</H3>" response.write "ok:" & rs("phone") & " " loop end if rs.close set rs=nothing% > </H5></body></html>&&运行后显示错误,&&在Win2000运行,iis没问题的改 do while not rs.eof response.write "<P>" & "<H3>" & rs("name") & "</H3>" response.write "ok:" & rs("phone") & " " loop 为 do until rs.eof response.write "<P>" & "<H3>" & rs("name") & "</H3>" response.write "ok:" & rs("phone") & " " loop楼上写的有问题。do while not rs.eof response.write "<P>" & "<H3>" & rs("name") & "</H3>" response.write "ok:" & rs("phone") & "</p> " rs.movenextloop还是不行的呢。。。rs.open strQuery,cn,1,1do while not rs.eof response.write "<P>" & "<H3>" & rs("name") & "</H3>" response.write "ok:" & rs("phone") & "</p> " rs.movenextloop有没有说是那里出错呀?明显没有movenext操作
标签: