这大概要怎么解决?

Edison621 2005-06-27 04:30:06

Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象: ''

/kexj/home.asp,行297


涉及到这个的相关代码是:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<HTML><!-- InstanceBegin template="/Templates/moban_kexj.dwt.asp" codeOutsideHTMLIsLocked="false" --><HEAD>
<!--#include file="../Connections/conn_db_shuihua.asp" -->
<%
Dim Rs
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = MM_conn_db_shuihua_STRING
Rs.Source = "SELECT DISTINCT country FROM ExpertsData WHERE (country <> '') ORDER BY country"
Rs.CursorType = 0
Rs.CursorLocation = 2
Rs.LockType = 1
Rs.Open()
%>



<%
while not Rs.eof
%>
<A Href="QueryByCountry.asp?CountryName=<%=Rs.Fields.Item("country").Value%>"><font size ="2"><%=Rs("country")%></font></A>
  
<%
Rs.movenext()
wend
%>
...全文
114 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Edison621 2005-06-28
  • 打赏
  • 举报
回复
顶,高手指教啊
Edison621 2005-06-28
  • 打赏
  • 举报
回复
问题解决乐。让人疑惑的是,完全没有修改,只是把QueryByCountry.asp文件覆盖掉原来的(其实新的QueryByCountry.asp和原来的相比没有任何改动,只是先用dreamweaver下载到本机,然后再上传覆盖……怎么就好了呢?
Edison621 2005-06-27
  • 打赏
  • 举报
回复
谢谢楼上,搞定了。不过点击这个链接,本来是要打开一个新页,在新页里显示国家名为选定的那个国家的所有科学家的资料,可是在新页中:
<%
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection = MM_conn_db_shuihua_STRING
Rs.Source = "SELECT name,address,tel,fax from ExpertsData where country='"&Trim(Request("CountryName"))&"' order by name"
Rs.CursorType = 0
Rs.CursorLocation = 2
Rs.LockType = 1
Rs.Open()
%>


<%
while not Rs.EOF
response.write(Rs.Fields.Item("name").Value)
%>
<br>
<%
response.write(Rs.Fields.Item("address").Value)
%>
<br>
<%
if(Rs.Fields.Item("tel").Value<>"") then
response.write(Rs.Fields.Item("tel").Value)
%>
<br>
<%
end if
if(Rs.Fields.Item("fax").Value <>"") then
response.write(Rs.Fields.Item("fax").Value)
%>
<br>
<%
end if
%>
<p><br></p>
<%
Rs.movenext()
wend
%>


而同样又出现了这个错误:

Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象: ''

/kexj/QueryByCountry.asp,行288



Seaoh 2005-06-27
  • 打赏
  • 举报
回复
<%=Rs("country")%>改成<%=Rs.Fields.Item("country").Value%>
Edison621 2005-06-27
  • 打赏
  • 举报
回复
<A Href="QueryByCountry.asp?CountryName=<%=Rs.Fields.Item("country").Value

这行……
lnboy1003 2005-06-27
  • 打赏
  • 举报
回复
具体是哪行啊

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧