asp用表格输出数据表所有数据
'ASP用表格输出数据表所有数据,方便查看数据,例如没法用access或mssql打开的情况下
<%
rs.open "Select * From [表名]",Conn,1,1
%>
<table border="1">
<tr>
<%
for i=0 to Rs.Fields.Count-1
%>
<td bgcolor="#0099FF"><%=Rs(i).Name%></td>
<%
next
%>
</tr>
<%
do while Not Rs.EOF
%>
<tr>
<%
for i=0 to Rs.Fields.Count-1
%>
<td><%=Rs(i)%></td>
<%
next
%>
</tr>
<%
Rs.MoveNext
Loop
%>
</table>
<%
rs.close
%>
<%
rs.open "Select * From [表名]",Conn,1,1
%>
<table border="1">
<tr>
<%
for i=0 to Rs.Fields.Count-1
%>
<td bgcolor="#0099FF"><%=Rs(i).Name%></td>
<%
next
%>
</tr>
<%
do while Not Rs.EOF
%>
<tr>
<%
for i=0 to Rs.Fields.Count-1
%>
<td><%=Rs(i)%></td>
<%
next
%>
</tr>
<%
Rs.MoveNext
Loop
%>
</table>
<%
rs.close
%>
相关文章
本文标签: ASP
本文作者:漫游
文章标题: asp用表格输出数据表所有数据
本文地址:http://www.roammemo.com/html5/20.html
版权声明:若无注明,本文皆为“漫游的备忘录”原创,转载请保留文章出处。
本文地址:http://www.roammemo.com/html5/20.html
版权声明:若无注明,本文皆为“漫游的备忘录”原创,转载请保留文章出处。