使用Access数据库,以下程序运行正常。改为SQL数据库后,以下程序运行似乎出现死循环一样,查看进程,w3wp.exe占用CPU极高。请各位大虾朋友帮忙分析下是什么原因。
<!--#include file="top.asp"-->
<%
if request("del")<>"" and Session("Class")=0 then
Sql = "Delete From house Where id="&request("del")
Conn.Execute(Sql)
response.redirect"show.asp"
response.end
end if
if request("del")<>"" then
id=request("del")
set rs=server.createobject("adodb.recordset")
sql="select * from house where id="&id
rs.open sql,conn,1,3
if Session("Class")=1 and rs("shop")=Session("shop") then
Sql = "Delete From house Where id="&request("del")
Conn.Execute(Sql)
response.redirect"show.asp"
response.end
end if
end if
if request("delx")<>"" and request("aaaa")<>"" then
did=request("delx")
sql="select * from house where id="&did
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
aaaaa=request("aaaa")
FilePath=server.mappath("lookh/images/house/"&aaaaa)
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(FilePath) Then
fso.DeleteFile(FilePath)
end if
conn.execute"update house set pic1=null where id="&request("delx")
response.Redirect"more.asp?id="&request("delx")
response.end
end if
if request("delx")<>"" and request("bbbb")<>"" then
did=request("delx")
sql="select * from house where id="&did
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
bbbbb=request("bbbb")
FilePath=server.mappath("lookh/images/house/"&bbbbb)
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(FilePath) Then
fso.DeleteFile(FilePath)
end if
conn.execute"update house set pic2=null where id="&request("delx")
response.Redirect"more.asp?id="&request("delx")
response.end
end if
if request("delx")<>"" and request("cccc")<>"" then
did=request("delx")
sql="select * from house where id="&did
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
ccccc=request("cccc")
FilePath=server.mappath("lookh/images/house/"&ccccc)
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(FilePath) Then
fso.DeleteFile(FilePath)
end if
conn.execute"update house set pic3=null where id="&request("delx")
response.Redirect"more.asp?id="&request("delx")
response.end
end if
if request("Auditing")<>"" then
id=request("Auditing")
set rs=server.createobject("adodb.recordset")
sql="select Auditing from house where id="&id
rs.open sql,conn,1,3
rs("Auditing")=1
rs.update
response.redirect"show.asp"
response.end
end if
'信息反审核
if request("noAuditing")<>"" then
id=request("noAuditing")
set rs=server.createobject("adodb.recordset")
sql="select Auditing from house where id="&id
rs.open sql,conn,1,3
rs("Auditing")=0
rs.update
response.redirect"show.asp"
response.end
end if
'将信息放入回收站
if request("dell")<>"" then
id=request("dell")
set rs=server.createobject("adodb.recordset")
sql="select * from house where id="&id
rs.open sql,conn,1,3
rs("dell")=1
rs.update
response.redirect"show.asp"
response.end
end if
'将信息从回收站还原
if request("redell")<>"" then
id=request("redell")
set rs=server.createobject("adodb.recordset")
sql="select * from house where id="&id
rs.open sql,conn,1,3
rs("dell")=0
rs.update
response.redirect"show.asp"
response.end
end if
'推荐房源
if request("nominate")<>"" then
id=request("nominate")
set rs=server.createobject("adodb.recordset")
sql="select * from house where id="&id
rs.open sql,conn,1,3
rs("nominate")=1
rs.update
response.redirect"show.asp"
response.end
end if
'取消房源推荐
if request("fnominate")<>"" then
id=request("fnominate")
set rs=server.createobject("adodb.recordset")
sql="select * from house where id="&id
rs.open sql,conn,1,3
rs("nominate")=0
rs.update
response.redirect"show.asp"
response.end
end if
'重点展示房源
if request("focus")<>"" then
id=request("focus")
set rs=server.createobject("adodb.recordset")
sql="select * from house where id="&id
rs.open sql,conn,1,3
rs("focus")=1
rs.update
response.redirect"show.asp"
response.end
end if
'取消重点展示房源
if request("nofocus")<>"" then
id=request("nofocus")
set rs=server.createobject("adodb.recordset")
sql="select * from house where id="&id
rs.open sql,conn,1,3
rs("focus")=0
rs.update
response.redirect"show.asp"
response.end
end if
'房屋已成交
if request("ok")<>"" then
id=request("ok")
set rs=server.createobject("adodb.recordset")
sql="select * from house where id="&id
rs.open sql,conn,1,3
rs("ok")=1
rs.update
response.redirect"show.asp"
response.end
end if
%>
<%
'跟单情况记录
if request("trackadd")<>"" then
set rs9=server.CreateObject("adodb.recordset")
sql9="select * from housetrack"
rs9.open sql9,conn,1,3
houseid=request("trackadd")
userid=Session("uid")
content=request("content")
rs9.addnew
rs9("houseid")=houseid
rs9("userid")=userid
rs9("content")=content
rs9.update
houseid=request("trackadd")
Response.Write"<script language=JavaScript>"
Response.Write"alert(""恭喜!跟单信息成功提交"");"
Response.Write"window.location='more.asp?id="&houseid&"'"
Response.Write"</script>"
else
response.Write""
end if
%>
<%
if request("trackid")="" then
if request("trackadd")="" then
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from house where id="&id
rs.open sql,conn,1,3
rs("fw_lls")=rs("fw_lls")+1
rs.update
end if
end if
%>
<%
branch=Session("branch")
set rs1=server.createobject("adodb.recordset")
sql1="select * from branch where id="&branch
rs1.open sql1,conn,1,3
%>
<body bgcolor="#F9F9F9">
<TABLE cellSpacing=1 cellPadding=0 width=900 align=center bgColor=#ffffff border=0>
<TR vAlign=top>
<TD width=214 class="line"><!--#include file="left.asp"--></TD>
<TD width=5 bgColor=#ffffff></TD>
<TD class="line">
<TABLE width="98%" border=0 align="center" cellPadding=0 cellSpacing=0 borderColor=#111111 background="images/c-b.gif" style="BORDER-COLLAPSE: collapse">
<TR>
<TD> </TD>
</TR>
<TR>
<TD><DIV align=center>
<%if request("trackid")<>"" then %>
<form name="form1" method="post" action="more.asp?trackadd=<%=request("trackid")%>">
<table width="98%" height="30" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FF0000">
<tr>
<td bgcolor="#FF9900"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="119"><div align="right">跟单情况记录: </div></td>
<td><input name="content" type="text" id="content2" size="60"></td>
<td width="57"><input type="submit" name="Submit" value="提交"></td>
<td width="7"> </td>
</tr>
</table></td>
</tr>
</table>
</form>
<% end if %>
<table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<%
if request("trackid")<>"" then
hid=request("trackid")
elseif request("trackadd")<>"" then
hid=request("trackadd")
else
hid=request.QueryString("id")
end if
sql="select * from house where id="&hid
set rs=conn.execute (sql)
%>
<tr bgcolor="#F3F3DA">
<td colspan="2"><div align="center">您正在查看 <font color="#FF0000">
<%
ddid=rs("shop")
if ddid<>0 then
set rs11=server.createobject("adodb.recordset")
sql11="select * from branch where id="&ddid
rs11.open sql11,conn,1,3%>
<%=rs11("branch")%>
<%
rs11.close
set rs11=nothing
%>
<%else%>
顾客
<%end if%>
</font>
<% fw_lls=rs("fw_lls")%>发布的编号为<font color="#FF0000">
<% =rs("bh") %>
</font>的<font color="#FF0000">
<%if rs("mytype")=2 then %>出售
<% end if %>
<%if rs("mytype")=1 then %>
求购
<% end if %>
<%if rs("mytype")=4 then %>出租
<% end if %>
<%if rs("mytype")=3 then %>求租
<% end if %>
<%if rs("mytype")=5 then %>合租
<% end if %>
</font>信息,该信息已被浏览<font color="#FF0000">
<% =fw_lls%>
</font>次
<%if rs("ok")=1 then%>
<font color=red> <strong>此房已成交</strong></font>
<%end if%>
</div></td>
</tr>
<%if rs("pic1")<>"" or rs("pic2")<>"" or rs("pic3")<>"" then%>
<tr bgcolor="#FFFFFF">
<td colspan="2"><table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<%if rs("pic1")<>"" then%>
<img src="../images/house/<%=rs("pic1")%>" width="100" height="100"><a href="javascript:if(confirm('删除后将不能恢复,请问您仍然要删除此图片吗?'))location='more.asp?aaaa=<%=rs("pic1")%>&delx=<%=rs("id")%>'" class="ylw_red">删除</a>
<%end if%>
</div></td>
<td><div align="center">
<%if rs("pic2")<>"" then%>
<img src="../images/house/<%=rs("pic2")%>" width="100" height="100"><a href="javascript:if(confirm('删除后将不能恢复,请问您仍然要删除此图片吗?'))location='more.asp?bbbb=<%=rs("pic2")%>&delx=<%=rs("id")%>'" class="ylw_red">删除</a>
<%end if%>
</div></td>
<td><div align="center">
<%if rs("pic3")<>"" then%>
<img src="../images/house/<%=rs("pic3")%>" width="100" height="100"><a href="javascript:if(confirm('删除后将不能恢复,请问您仍然要删除此图片吗?'))location='more.asp?cccc=<%=rs("pic3")%>&delx=<%=rs("id")%>'" class="ylw_red">删除</a>
<%end if%>
</div></td>
</tr>
</table></td>
</tr>
<%else%>
<tr bgcolor="#FFFFFF">
<td colspan="2"><div align="center">暂无任何图片!!!</div></td>
</tr>
<%end if%>
<tr bgcolor="#FFFFFF">
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><%
fw_uid=rs("fw_uid")
set rs1=server.CreateObject("ADODB.recordset")
sql1="SELECT id,faceimg,hyuser,hyname,col,telephone,phone,aboutme,sex FROM hycenter where id="&fw_uid
rs1.open sql1,conn,1,3
%> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" height="200" border="0" cellpadding="1" cellspacing="1" bgcolor="#79DEFF" class="text_14px">
<tr bgcolor="#FFFFFF">
<td width="30" rowspan="7" bgcolor="#ECFBFF" class="text_14_b"><p align="center">会<br>
员<br>
信<br>
息</p> </td>
<td width="160" rowspan="7" bgcolor="#FFFFFF"><table width="122" height="146" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<%tt=11
dd=rs1("faceimg")
yy=dd&tt
%>
<%if len(yy)<3 then %>
<img height="136" src="../images/face/39.jpg" width="112">
<%else%>
<img height="136" src="../images/face/<%=rs1("faceimg")%>" width="112">
<%end if%>
</div></td>
</tr>
</table></td>
<td width="90" bgcolor="#ECFBFF"><div align="right"><strong>用户ID:</strong></div></td>
<td> <%=rs1("hyuser")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#ECFBFF"><div align="right"><strong>姓名:</strong></div></td>
<td> <%=rs1("hyname")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#ECFBFF"><div align="right"><strong>性别:</strong></div></td>
<td> <%if rs1("sex")=1 then%>男<%else%>女<%end if%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#ECFBFF"><div align="right"><strong>手机号:</strong></div></td>
<td><div align="left"> <%=rs1("telephone")%></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#ECFBFF"><div align="right"><strong>经纪公司:</strong></div></td>
<td><div align="left"> <%=rs1("col")%></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#ECFBFF"><div align="right"><strong>电话:</strong></div></td>
<td> <%=rs1("phone")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#ECFBFF"><div align="right"><strong>说明:</strong></div></td>
<td> <%=rs1("aboutme")%></td>
</tr>
</table></td>
</tr>
</table>
<%
rs1.close
set rs1=nothing
%></td>
</tr>
</table><%
houseid=request("id")
sql3="select * from complaints where houseid="&houseid
set rs3=server.createobject("adodb.recordset")
rs3.open sql3,conn,1,3
t=1
if not rs3.eof or not rs3.bof then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2" class="line_x_box">
<tr>
<td height="30" bgcolor="#E1E1E1"> <strong>投诉记录</strong></td>
</tr>
<tr>
<td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<%do while not rs3.eof%>
<tr class="line_x_b">
<td height="30" class="line_x_b">
<%
Reasonid=rs3("Reasonid")
sql4="select * from Reason where id="&Reasonid
set rs4=server.createobject("adodb.recordset")
rs4.open sql4,conn,1,3%><%=t%>、<%if rs3("Reasonid")=0 then %><%=rs3("content")%><%else%><%=rs4("Reason")%><%end if%><font color="#999999"> | <%=rs3("names")%> | <%=rs3("telephone")%></font></td>
</tr><%
t=t+1
rs3.movenext
loop
rs3.close
set rs3=nothing
%>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<%end if%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="97">
<div align="right">所在城市:</div></td>
<td width="660">
<div align="left">
<% =rs("fw_city")%>
</div></td>
</tr>
<tr>
<td bgcolor="#F3F3DA">
<div align="right">所属区域:</div></td>
<td bgcolor="#F3F3DA">
<div align="left">
<% =rs("fw_quyu")%>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<div align="right">小区名称:</div></td>
<td bgcolor="#FFFFFF">
<div align="left">
<% =rs("fw_name")%>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<div align="right">小区位置:</div></td>
<td bgcolor="#FFFFFF">
<div align="left">
<%=rs("Regional")%> <strong>区域</strong> <%=rs("Near")%> <strong>附近</strong>
</div></td>
</tr>
<tr bgcolor="#F3F3DA">
<td>
<div align="right">房屋类型:</div></td>
<td>
<div align="left">
<% =rs("fw_leixing")%>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<div align="right">房屋结构:</div></td>
<td>
<div align="left">
<% =rs("fw_shi")%>室
<% =rs("fw_ting")%>厅
<% =rs("fw_wei")%>卫
<% =rs("fw_yangtai")%>阳台
</div></td>
</tr>
<tr bgcolor="#F3F3DA">
<td>
<div align="right">朝向:</div></td>
<td>
<div align="left">
<%if rs("fw_face")=0 then %>东
<% end if %>
<%if rs("fw_face")=1 then %>
南
<% end if %>
<%if rs("fw_face")=2 then %>
西
<% end if %>
<%if rs("fw_face")=3 then %>
北
<% end if %>
<%if rs("fw_face")=4 then %>
东南
<% end if %>
<%if rs("fw_face")=5 then %>
东西
<% end if %>
<%if rs("fw_face")=6 then %>
东北
<% end if %>
<%if rs("fw_face")=7 then %>
西南
<% end if %>
<%if rs("fw_face")=8 then %>
西北
<% end if %>
<%if rs("fw_face")=9 then %>
南北
<% end if %> </div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<div align="right">所在楼层:</div></td>
<td>
<div align="left">
<% =rs("fw_louceng")%>
</div></td>
</tr>
<tr>
<td bgcolor="#F3F3DA">
<div align="right">房屋面积:</div></td>
<td bgcolor="#F3F3DA">
<div align="left">
<% =rs("fw_mianji")%>
平方米 </div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<div align="right">装修情况:</div></td>
<td>
<div align="left">
<%if rs("fw_zhuangxiu")=1 then%>毛坯
<%end if%>
<%if rs("fw_zhuangxiu")=2 then%>普通装修
<%end if%>
<%if rs("fw_zhuangxiu")=3 then%>精装修
<%end if%>
<%if rs("fw_zhuangxiu")=4 then%>豪华装修
<%end if%>
</div></td>
</tr>
<tr bgcolor="#F3F3DA">
<td>
<div align="right">房屋配套:</div></td>
<td>
<% =rs("fw_peitao")%> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<div align="right">价 格:</div></td>
<td>
<div align="left">
<% =rs("fw_jiage")%>
<% =rs("fw_jiageLX") %>
</div></td>
</tr>
<tr bgcolor="#F3F3DA">
<td>
<div align="right">发布日期:</div></td>
<td>
<div align="left">
<% =rs("fw_fbri")%>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>
<div align="right">有效期:</div></td>
<td>
<div align="left">
<% =rs("fw_guoqi")%>天
</div></td>
</tr>
<tr bgcolor="#F3F3DA">
<td>
<div align="right">其他说明:</div></td>
<td>
<div align="left">
<%
fw_qtsm=rs("content")
if fw_qtsm="" then
response.Write"无"
else%>
<% Response.Write(fw_qtsm) %>
<% end if %>
</div></td>
</tr>
</table>
<table width="678" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="40"><div align="center">
<table width="70%" border="0" cellspacing="4" cellpadding="4">
<tr>
<td><%if Session("Class")=0 and rs("dell")<>1 and rs("focus")<>1 then %>
<table width="80" height="25" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr>
<td bgcolor="#FFFFFF"><div align="center"> <a href="javascript:if(confirm('你确实要设置为重点展示房源吗?'))location='more.asp?Focus=<%=rs("id")%>'">重点展示</a> </div></td>
</tr>
</table>
<% end if %>
字数限制,以下继续…………