asp怎样判断表单列表的数量

来源:百度知道 编辑:UC知道 时间:2024/05/28 00:55:59
asp怎样判断表单列表的数量,主要是看看表单中的列表中有无数据.

列数 rs.fieldscount
行数 rs.recordcount

<!--#include file="conn.asp"-->'注意路径
<%
set rs=server.createobject("adodb.recordset")
sql="select * from 表"
rs.open sql,conn,1,1
if rs.eof then
response.write"<script>alert('数据库中暂无资料!');window.location='需要导入的页面.asp'</script>"
else
'资料库中有资料则这裏显示你的显示的数据资料
end if
%>