日期:2014-05-17  浏览次数:21082 次

出现一个错误,找了好久都不知道问题出在哪里
具体的ASP代码是:set rs=server.CreateObject("adodb.recordset")
rs.open "select top 1 * from news where kksh=1 and sytj=1 order by id desc",conn,1,1%>
  <a href="xx_news.asp?id=<%=rs("id")%>"><img src="<%=rs("pic")%>" alt="<%=rs("title")%>" width="120" height="90" border="0" /></a>
<%
rs.close
set rs = nothing
%></td>
  <td height="40" colspan="3"> <%
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 5 * from news order by id desc",conn,1,1
  %>
  <%
 
if rs.eof and rs.bof then
response.Write("暂时没有新闻信息!")
else
do while not rs.eof
%></td>
  </tr>
  <tr>
  <td width="19" height="19"><img src="image/lb.gif" alt="图书馆新闻" /></td>
  <td width="57%" ><a href="news.asp?id=<%=rs("id")%>" target="_blank"><%=InterceptString(rs("title"),32)%></a></td>
  <td width="13%" align="right"><%=rs("hit")%></td>
  </tr>
  <tr>
  <td colspan="3"><%
 
rs.movenext
loop
end if
rs.close
set rs = nothing
%>
运行时网页却提示:
错误类型:
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配: 'InterceptString'
这是哪里出问题了?我数据库只有五行的数据,是不是数据量不够?还是服务器问题?求指导。

------解决方案--------------------
InterceptString函数是怎样的?
------解决方案--------------------
http://w3school.com.cn/vbscript/vbscript_ref_functions.asp#string

去看看 vbs 函数手册吧