求一个ASP代码 循环读取数据库从第一条 到最后一条在 表格中显示

2025-02-24 14:01:31
推荐回答(2个)
回答1:


<%
SQL_Res01.Open "SELECT * FROM SQL_Name"
while not SQL_Res01.EOF then
%>



<%
SQL_Res01.MoveNext
wend
SQL_Res01.Close
%>

<%SQL_Res01("字段")%>

回答2:


<%
sql = "select * from tablename"
rs.open sql,conn,1,1
if not rs.eof then
while not rs.eof
response.write("")
rs.movenext
wend
end if
%>
"&rs("字段1")&""&rs("字段2")&"