50求导出EXCEL的问题,奇怪~~~大家帮帮忙````我找不到错在哪?急````
如风 2006-10-31 08:26:13 代码很简单,如下:
<!--#include file=../inc/conn.asp-->
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<%response.ContentType="application/vnd.ms-excel"%>
<%
Dim month_p
month_p=request.Form("month_p")
%>
<table border="1" cellspacing="1" cellpadding="5" align=center>
<tr>
<th height="23" colspan=6 align=center><%=month_p%>月新增村级服务站报表</th>
</tr>
<tr height="23" align=center>
<td width=80>县市</td>
<td width=90>乡镇</td>
<td width=90>村</td>
<td width=180>新增村级服务站名称</td>
<td width=70>联系人</td>
<td width=110>联系电话</td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from D_town_Info where daibd_time='"&month_p&"' order by id desc"
'response.write sql
rs.open sql,conn,1,1
while (not rs.eof)
%>
<tr align=center height="23">
<td width=80 align=center nowrap bgcolor=#33FFFF><%=rs("area_name")%></td>
<td width=90 align=center nowrap><%=rs("city")%></td>
<td width=90 align=center nowrap><%=Mid(rs("daibd_name"),1,Len(rs("daibd_name"))-3)%></td>
<td width=180 align=center nowrap><%=rs("daibd_name")%></td>
<td width=70 align=center nowrap><%=rs("jingyz_name")%></td>
<td width=110 align=center nowrap><%=rs("tel")%></td>
</tr>
<%
rs.movenext
Wend
rs.close
%>
</table>
</BODY>
</HTML>
同一段代码,为什么有的月份能导出,有的月份就报错:
INERTNET EXPLORER 无法下载report.asp 来自 218.204.105.134
INERTNET EXPLORER 无法打开该INTERNET站点.请求的站点不可用,或找不到.请稍候再试.
谁知道为什么会这样,要怎么解决????