<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../conn/conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" rightmargin="0" topmargin="10" bgcolor="#E3ECFB">
<div align="left"><BR>
<table width="179" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td width="179">
<div align="center">
<%
SQL2="select * from Province order by ProvinceID "
set rs2=server.CreateObject("ADODB.RecordSet")
rs2.open SQL2,conn,1,1
do while not rs2.eof
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="left"><img src="images/plus.gif" width="30" height="15"><a href="left.asp?ProvinceID=<%=rs2("ProvinceID")%>"><%=rs2("Province")%></a></div></td>
</tr>
<tr>
<td><%
ProvinceID=rs2("ProvinceID")
Sql="select * from City_1 where ProvinceID ='"&ProvinceID&"'"
set rs=server.CreateObject("ADODB.RecordSet")
rs.open SQL,conn,1,1
do while not rs.eof
%>
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="bk">
<tr >
<td ><div align="left"><img src="images/blank2.gif" width="50" height="15" border="0"><a href=main.asp?id=<%=rs("SortNameID")%> target="MainFrame"><%=rs("SortName")%></a></div></td>
</tr>
<tr>
<td class="bk"><%
id=rs("SortNameID")
sql1="select * from City_2 where SortNameID='"&id&"'"
set rs1=server.CreateObject("ADODB.RecordSet")
rs1.open sql1,conn,1,1
do while not rs1.eof
%>
<table width="100%" height="12" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="bk" ><div align="left"><img src="images/blank3.gif" width="66" height="16"><a href="main.asp?id=<%=rs1("CityID")%>" target="MainFrame"><%=rs1("City")%></a> </div></td>
</tr>
</table>
<%rs1.MoveNext
Loop
%></td>
</tr>
</table>
<%
rs.MoveNext
Loop
rs.close
set rs=nothing
%>
<div align="center">
</div></td>
</tr>
</table>
<%
rs2.MoveNext
LOOP
rs2.close
set rs2=nothing
conn.close
set conn=nothing
%>
</div></td>
</tr>
</table>
</div>
</body>
</html>
这段代码运行速度太慢了
帮我看看啊,是实现3及树的问题
在数据库中有三个表,是对其进行调用
可是速度太慢了
请大家帮忙啊,谢了