ASP中如何从数据库中读取信息且在页面上设置成动态链接样式???(asp代码) 10
展开全部
<%
on error resume next
Dim strCon, Conn, Rs, Sql
strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/info/info.mdb")
Set Conn = Server.CreateObject("Adodb.Connection")
Set Rs = Server.CreateObject("Adodb.Recordset")
Conn.Open strCon
strsql="select * from Web_Type ORDER BY Small_Order asc,Small_Id asc"
set rs2=conn.execute(strsql)
if rs2.eof and rs2.bof then
else
do while not rs2.eof
%>
<li ><a href="<%=rs2("Small_Url")%>?Big_Id=<%=Big_Id%>&small_Id=<%=rs2("small_Id")%>" title="<%=rs2("Small_Name")%>"><%=rs2("Small_Name")%></a></li>
<%
rs2.movenext
loop
end if
rs2.close
%>
on error resume next
Dim strCon, Conn, Rs, Sql
strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/info/info.mdb")
Set Conn = Server.CreateObject("Adodb.Connection")
Set Rs = Server.CreateObject("Adodb.Recordset")
Conn.Open strCon
strsql="select * from Web_Type ORDER BY Small_Order asc,Small_Id asc"
set rs2=conn.execute(strsql)
if rs2.eof and rs2.bof then
else
do while not rs2.eof
%>
<li ><a href="<%=rs2("Small_Url")%>?Big_Id=<%=Big_Id%>&small_Id=<%=rs2("small_Id")%>" title="<%=rs2("Small_Name")%>"><%=rs2("Small_Name")%></a></li>
<%
rs2.movenext
loop
end if
rs2.close
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询