asp源码如何筛选数据到网页

来源:百度知道 编辑:UC知道 时间:2024/06/24 05:40:20
如图:Down表中的Down_type数字对应class表中的class_id,比如我要筛选广东的数据,就需要筛选Down表中Down_type数值为32的,代码
select Down_type from Down where author=32 提取所有值为32的数据,
输出32这行所有数据到网页的代码如何写?
能注释一下吗?

asp:
<%
dim conn,connstr
set conn =server.createobject("adodb.connection")
connstr ="provider=microsoft.jet.oledb.4.0; data source=" &server.mappath("xx.mdb")
conn.open connstr
if err.number <>0 then
response.write "error"
err.clear
response.end
end if
set rs =conn.execute ("select Down_type from Down where author=32")
if not (rs.eof and rs.bof) then
response.write (rs(0))
end if
rs.close
set rs =nothing
conn.close
set conn =nothing
%>