| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 668 人关注过本帖
标题:求救!!!! [缺少对象] (有详细代码,有详细标识!!)
取消只看楼主 加入收藏
kingstar
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-8-31
收藏
 问题点数:0 回复次数:7 
求救!!!! [缺少对象] (有详细代码,有详细标识!!)

错误提示部分: Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象

/twx2/en/search.asp,行209 代码部分: <!--#include file="Conn.asp"--> <% const MaxPerPage=30 dim totalPut dim CurrentPage dim TotalPages dim i,j dim sql dim rs dim rstype dim typesql dim typeid,typename1 if not isEmpty(request("typeid")) then typeid=request("typeid") else typeid=1 end if if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if %> <html> <head> <title>Search</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta http-equiv="Content-Language" content="zh-CN"> <link href="images/css.css" rel="stylesheet" type="text/css"> <script language='javascript' type='text/javascript'> function ResizeImage(obj, MaxW, MaxH) { if (obj != null) imageObject = obj; var state=imageObject.readyState; var oldImage = new Image(); oldImage.src = imageObject.src; var dW=oldImage.width; var dH=oldImage.height; if(dW>MaxW || dH>MaxH) { a=dW/MaxW; b=dH/MaxH; if(b>a) a=b; dW=dW/a; dH=dH/a; } if(dW > 0 && dH > 0) imageObject.width=dW;imageObject.height=dH; if(state!='complete' || imageObject.width>MaxW || imageObject.height>MaxH) { setTimeout("ResizeImage(null,"+MaxW+","+MaxH+")",40); } } </script> </head> <body leftmargin="0" topmargin="0"> <table width="750" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="700" valign="top" align=center> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <td height="44"><tr> <td height="40"><td width="700" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#B6B6B6"> <tr> <td valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="2" cellspacing="1"> <tr> <td height="37" valign="center" width="700">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF7700"><b>Message</b></font> —— <% page=request("page") if page="" then page=0 ssort=request("ssort") keywords=request("keywords") keywords=LTRIM(RTRIM(keywords)) if ssort="1" then set rs=server.createobject("adodb.recordset") sql ="select * from productxd where p_id like '%"&keywords&"%' order by click Desc" rs.open sql,conn,1,1%> Search for "<font color="#ff0000">The ITEM NO. </font>" Keyword :&nbsp;<b><font color="#ff0000"><%=keywords%></font></b> <% end if if ssort="2" then set rs=server.createobject("adodb.recordset") sql ="select * from productxd where p_endesc like '%"&keywords&"%' order by click Desc" rs.open sql,conn,1,1%> Search for "<font color="#ff0000"> Product introduction </font>" Keyword : &nbsp;<b><font color="#ff0000"><%=keywords%></font></b> <% end if %> </td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height=180> <TR> <TD height="120" COLSPAN=5 valign="top"> <table border=0 cellpadding="0" cellspacing="1" bgcolor=#E7E7E7 width="700" height="180"> <tr><td bgcolor=#ffffff> <table border=0 cellpadding="0" cellspacing="0" width="700"> <% if rs.eof and rs.bof then response.write "<tr height=30><td> 无任何记录!</td></tr>" else totalPut=rs.recordcount totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if

end if if currentPage=1 then showContent showpage totalput,MaxPerPage,"Search.asp" else if (currentPage-1)*MaxPerPage<totalPut then rs.move (currentPage-1)*MaxPerPage dim bookmark bookmark=rs.bookmark showContent showpage totalput,MaxPerPage,"Search.asp" else currentPage=1 showContent showpage totalput,MaxPerPage,"Search.asp" end if end if rs.close end if set rs=nothing sub showContent dim i i=0 do while not rs.eof %> <tr> <td> <table border=0 cellpadding="0" cellspacing="0" > <tr bgcolor="#FFFFFF"> <td width="150" align="left">&nbsp;·<a href="dispinfo.asp?id=<%=rs("id")%>" target="_blank"><%=rs("p_id")%></a></td> <td width="260" align="center"><div align="center"><a href="dispinfo.asp?id=<%=rs("id")%>" target="_blank"><img src="../products/<%=rs("pfile")%>"onload="javascript:ResizeImage(this, 120, 100);" border="0"></a></div></td> <td width="150" align="center"> <%xx=rs("kind_id") Set rs2 = Server.CreateObject("ADODB.Recordset") sql2="select * from xdkind where id="&xx&" Order By Id DESC" rs2.open sql2,conn,3 if not rs2.bof and not rs2.eof then response.Write rs2("En_kind") rs2.close else response.Write("无小类") rs2.close end if %></td> <td width="150" align="center"> <%types=rs("types_id") Set rs1 = Server.CreateObject("ADODB.Recordset") sql="select * from xdtypes where id="&types&"" rs1.open sql,conn,3,2 if not rs1.bof and not rs1.eof then response.Write rs1("en_types") end if rs1.close%></td> </tr> </table> </td> </tr> <TR> <TD background=images/line_h.gif width=90%><IMG height=1 src="images/line_h.gif" width=3></TD></TR> <% i=i+1 if i>=MaxPerPage then exit do rs.movenext loop %> <TR> <TD background=images/line_h.gif width=90%><IMG height=1 src="images/line_h.gif" width=3></TD></TR> <%end sub function showpage(totalnumber,maxperpage,filename) dim n if totalnumber mod maxperpage=0 then n= totalnumber \ maxperpage else n= totalnumber \ maxperpage+1 end if response.write "<tr height=30><td align=right>" response.write "Total:<b>"&totalnumber&"</b> " response.write "&nbsp;Page:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>Pages&nbsp;One page for:<b>"&maxperpage&"</b>" if CurrentPage<2 then response.write "【First】【Back】" else response.write "<a href=search.asp?ssort=" & ssort & "&keywords=" & keywords & "&page=1>【First】</a>" response.write "<a href=search.asp?ssort=" & ssort & "&keywords=" & keywords & " &page="&CurrentPage-1&">【Back】</a>" end if if n-currentpage<1 then response.write "【Next】【The end】" else response.write "<a href=search.asp?ssort=" & ssort & "&keywords=" & keywords & "&page="&(CurrentPage+1)&">" response.write "【Next】</a><a href=search.asp?ssort=" & ssort & "&keywords=" & keywords & "&page="&n&">【The end】</a>" end if response.write "</td></tr>" end function %> </table> </td> </tr> </td> </tr> </table> </TD> </TR> <% rs.close >>>>>>>>>>第209行 set rs=nothing %> </table> </td> </tr> </table> </td> </tr> </table> </table> <% rs1.close set rs1=nothing conn.close set conn=nothing %> </body> </html>

搜索更多相关主题的帖子: 对象 代码 
2005-08-17 05:37
kingstar
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-8-31
收藏
得分:0 
请路过的高手看看,指点一下!!!!

2005-08-17 05:39
kingstar
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-8-31
收藏
得分:0 
版主,快来看看呀,帮忙指点一下呀!
感谢万分!

2005-08-17 11:42
kingstar
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-8-31
收藏
得分:0 
谢谢,代码是有点长,不过哪一行都做了标记...还请多指点.
我如果只放一点,可能就更难以发现问题的所在,
我也是在看了很多网友的类似提问后才这样做的
贴出全部代码,做好标记!方便高手们解决!不对的地方请指正..

2005-08-17 12:04
kingstar
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-8-31
收藏
得分:0 
我把代码往上看了一下,发现第209行的代码 <% rs.close >>>>>>>>>>第209行 set rs=nothing %> 和上面没有什么关联,我删掉后又出现了另外的提示

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

缺少对象: ''

/twx2/en/search.asp,行218 </table> </table> <% rs1.close 此行是218行 set rs1=nothing conn.close set conn=nothing %> </body> </html>


2005-08-17 12:34
kingstar
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-8-31
收藏
得分:0 
版主或者路过的高手帮忙解决一下吧,我实在是看不出是哪里出了问题.
编程中国客流量这么大,怎么浏览贴子的数量怎么这么少呀,都已经发了半天了.

2005-08-17 13:15
kingstar
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-8-31
收藏
得分:0 
谢客位高手帮帮小弟的忙吧

2005-08-17 13:16
kingstar
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-8-31
收藏
得分:0 
问题解决 <% rs.close >>>>>>>>>>第209行 set rs=nothing %> <% rs1.close   >>>>>第218行 set rs1=nothing conn.close set conn=nothing %> 把以上两处全部删掉,问题解决,显示正常

2005-08-17 13:26
快速回复:求救!!!! [缺少对象] (有详细代码,有详细标识!!)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018937 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved