一个ASP END 错误解决过程。

原程序:<html>

<head>
<meta content="Microsoft FrontPage 5.0">
<meta content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>认证软件证书检查</title>
</head>

<body>
<!--#include file="dbconn.asp"-->

<p align="center"><font color="#FF0000" size="7">查找漏掉滚动的监督组织信息   </font></p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="98">
  <tr>

      <td width="5%" height="41" align="center" bgcolor="#FFFF00">
    <font color="#0000FF">编号</font></td>
    <td width="8%" height="41" align="center" bgcolor="#FFFF00">
    <font color="#0000FF">记录序号</font></td>
   <td width="21%" height="41" align="center" bgcolor="#FFFF00">
    <font color="#0000FF">组织名称</font></td>
    <td width="8%" height="41" align="center" bgcolor="#FFFF00">
    <font color="#0000FF">项目编号</font></td>
    <td width="1%" height="41" align="center" bgcolor="#FFFF00">
    <font color="#0000FF">项目类型</font></td>
    <td width="11%" height="41" align="center" bgcolor="#FFFF00">
    <font color="#0000FF">实际开始日期</font></td>
    <td width="12%" height="41" align="center" bgcolor="#FFFF00">
    <font color="#0000FF">实际结束日期</font></td>
 

  
    <td width="17%" height="41" align="center" bgcolor="#FFFF00">
    <font color="#0000FF">证书状态</font></td>
  </tr>
<%
 set rs=server.createobject("adodb.recordset")
 sql="select a.RecNO RecNo,a.ProjID ProjID,d.PTType PTType,a.ActBegin ActBegin,a.ActEnd ActEnd,c.BsName BsName,a.PTCode PTCode,b.RegiMemo RegiMemo from tblProjectType a,tblProject b,tblBusiness c,tblProjectTypeCode d,tblProjRegi e where (a.PTCode='200' or a.PTCode='300' or a.PTCode='301' or a.PTCode='302' or a.PTCode='303')  and a.PTCode=d.PTCode and a.ProjID=b.ProjID and b.BsID=c.BsID and a.ProjID=e.ProjID and e.RegiCase<>'撤消'  order by a.ProjID,a.PTCode"
 rs.open sql,conn,1,1
 i=0
 do  while not rs.eof

%>
<% dim RecNO,BsName,ProjID,PTType,ActBegin,ActEnd,PTCode,RegiMemo
RecNo=rs("RecNo")
BsName=rs("BsName")
ProjID=rs("ProjID")
PTType=rs("PTType")
PTCode=rs("PTCode")
ActBegin=rs("ActBegin")
ActEnd=rs("ActEnd")
RegiMemo=rs("RegiMemo")
rs.MoveNext
if  rs("ProjID")<>projID  and ActEnd<>"" then
i=i+1
%>
  <tr>
  <td width="5%" height="56" align="center"><%=i%></td>
<td width="8%" height="56" align="center"><%=RecNo %> </td>
  <td width="21%" height="56" align="center"><%=BsName%> </td>
<td width="8%" height="56" align="center"><%=ProjID%> </td>
<td width="8%" height="56" align="center"> <%=PTType%></td>
<td width="11%" height="56" align="center"> <%=ActBegin%></td>
<td width="12%" height="56" align="center"><%=ActEnd%> </td>
<td width="17%" height="56" align="center" valign="middle" bgcolor="#FFCCFF"><%=RegiMemo%><br>

</td>
  </tr>
 <%
end if
loop
%>

</table>

 


</body>

</html>

 

错误提示:asp中 Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'

/iisHelp/common/500-100.asp,行242 错误 '80020009'

发生意外。


 

原因及解决:开始只以为是语法错误,查了很多遍,主要在 END IF上查,都没找到原因,加个end if又提示多了,提示在if  rs("ProjID")<>projID  and ActEnd<>"" then
发生错误,于是想修改一下,

 

<% dim RecNO,BsName,ProjID,PTType,ActBegin,ActEnd,PTCode,RegiMemo,projID2
RecNo=rs("RecNo")
BsName=rs("BsName")
ProjID=rs("ProjID")
PTType=rs("PTType")
PTCode=rs("PTCode")
ActBegin=rs("ActBegin")
ActEnd=rs("ActEnd")
RegiMemo=rs("RegiMemo")
rs.MoveNext
if not rs.eof then
projID2=rs("ProjID")
if projID2<>projID  and ActEnd<>"" then
i=i+1
%>
  <tr>
  <td width="5%" height="56" align="center"><%=i%></td>
    <td width="8%" height="56" align="center"><%=RecNo %> </td>
   <td width="21%" height="56" align="center"><%=BsName%> </td>
    <td width="8%" height="56" align="center"><%=ProjID%> </td>
    <td width="8%" height="56" align="center"> <%=PTType%></td>
    <td width="11%" height="56" align="center"> <%=ActBegin%></td>
    <td width="12%" height="56" align="center"><%=ActEnd%> </td>
    <td width="17%" height="56" align="center" valign="middle" bgcolor="#FFCCFF"><%=RegiMemo%><br>

</td>
  </tr>
 <%
end if
end if

 

OK,成功,原来是 rs.movenext 到底了没检测造成的,而END 是VB系统的,并不是程序中的提示的错误,微软的一个误导。

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值