高手帮忙看看这个错误怎么改 错误出在177行

zkioo 2009-12-14 01:42:15
本身这个单元格(绿色标明的这个)是放在左边的 我把它移到右边来了,结果数据就读取出错了 ,要怎么修改才能让这个单元在右边正常读取, 期待高手帮忙,谢谢、
<!--#include file="conn.asp"-->
<!--#include file="admin/inc/config.asp"-->
<!--#include file="admin/inc/function.asp"-->
<!--#include file="admin/inc/admin_code.asp"-->
<%
dim sql
dim rs
dim rstype
dim typesql
dim typeid,typename,classname,classid,Nclassname,Nclassid,tem
dim title
set rs=server.createobject("adodb.recordset")
sql="update product set hits=hits+1 where productID="&request("id")
rs.open sql,conn,1,3
sql="select Aclass.class,ANclass.Nclass,product.title,product.classid,product.Nclassid from product,Aclass,ANclass where product.classid=Aclass.classid and product.Nclassid=ANclass.Nclassid and xs=1 and product.productID="&request("id")
rs.open sql,conn,1,1
if not rs.eof then
title=rs("title")
classid=rs("classid")
Nclassid=rs("Nclassid")
classname=rs("class")
Nclassname=rs("Nclass")
end if
rs.close
%>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<meta name="keywords" content=" <% response.write mainkey %>">
<title> <% response.write title%>-湖南自考信息门户 </title>
<style type="text/css">
<!--
-->
</style>
<link href="css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {color: #0099FF}
-->
</style>
</head>
<!--#include file="top.asp"-->

<table width="912" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="912" height="327">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="602" height="700" align="left" valign="top" class="rentd1"> <table width="100%" height="4" border="0" cellpadding="0" cellspacing="0">
<tr>
<th scope="col"> </th>
</tr>
</table> <table width=100% border=0 cellpadding=0 cellspacing=0 class="text">
<tr>
<td height="28" align="center"> <%
sql="select class,classid from Aclass"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "还没有任何栏目"
response.end
else
do while not rs.eof
%>
<%
rs.movenext
loop
end if
rs.close
dim key
sql="select * from product where xs=1 and productid="&request("id")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "没有找到相关信息。"
response.end
end if
key=rs("title")
%> <br>
<font color="#164A63" size="4" face="黑体"> <%=rs("title")%> </font> </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="2" class="text">
<tr>
<td> <div align="center"> </div>
<div align="center">
<SCRIPT LANGUAGE="JavaScript"> </script>
<SCRIPT LANGUAGE="JavaScript"> <div align="left"> <div align="left"> <font class="b1"><!-- Begin
//修改链接地址
var U = "photo.asp?pp=<%=rs("pp")%>&title='<%=rs("title") %>&images=<%=rs("images")%>";
//修改窗口位置、大小
var X = 10; // x position
var Y = 10; // y position
var W = 450; // width
var H = 500; // height

// Do not edit below this line.
var s="resizable,left="+X+",top="+Y+",screenX="+X+",screenY="+Y+",width="+W+",height="+H;
function popMe(){
var SGW = window.open(U,'TheWindow',s)
}
// End -->
</font> </div>
</div>
</script>
</div> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" align="center" class="text"> <font class="b1">点击: <%=rs("hits")%>
<script language="JavaScript">
</script>
</font> 日期: <font class="b1"> <%=rs("dateandtime")%> </font> </td>
</tr>
</table>
<table width="96%" border="0" align="center" cellpadding="5" cellspacing="0" class="context">
<tr>
<td height="141">
<p>
<% if rs("images")="" then %>

</p>
<p>
<%else%>
<a href=" <%=rs("images")%>" target="_blank"> <img src=" <%=rs("images")%>" border="0"> </a>
<%end if%>
<br>
<%tem=rs("content")
//tem=replace(tem,"   "," ")
response.write tem%>
</p> </td>
</tr>
</table> </td>
<td width="10" valign="top">  </td>
<td width="300" valign="top" class="rentd1"> <table width="100%" height="4" border="0" cellpadding="0" cellspacing="0">
<tr>
<th scope="col"> </th>
</tr>
</table>
<p> <img src="images/informa.png" width="300" height="261" /> </p>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" background="sech.png">
<tr>
<td height="21" align="left" class="text" scope="col"> <span class="STYLE1">>>模糊搜索 </span> </td>
</tr>
</table>
<table width="99%" border="0" cellpadding="0" cellspacing="0" >
<form name="form1" method="post" action="seach.asp">
<tr>
<td height="50" align="left">
<input name="key" type="text" class="input1" id="key2" size="25">
<br>
<input type="submit" name="Submit3" value="查找">
<input type="submit" name="Submit22" value="清除"> </td>
</tr>
<tr>
<td height="10" align="center">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" background="sech.png">
<tr>
<td height="22" align="left" class="text" scope="col"> <font color="#0099FF">>>热点信息 </font> </td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td>
<table width="369%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="left"> <span class="text">
<%
rs.open "select * from product where nclassid="&Nclassid&" and xs=1 order by hits desc",conn,1,4
if rs.eof <>true then
for i=1 to 6
%>
</span>
<table width="100%" height="22" border="0" align="center" cellpadding="0" cellspacing="0" background="images/dian1.gif">
<tr>
<td width="93%"> <a href="textview.asp?id= <%=rs("productid")%>" target="_blank"> <%=left(rs("title"),14)%> </a> </td>
</tr>
</table>
<span class="text">
<% rs.movenext
If rs.EOF Then Exit For
next%>
<%end if
rs.close
%>
</span> </td>
</tr>
</table>
</td>
</tr>
</table>
<p>  </p> </td>
</tr>
</table> </td>
</tr>
<tr>
<td class="tabledown"> <p>  </p>
</td>[/color] </tr>
</table>
<!--#include file="down.asp"-->
</body>
</html>
...全文
121 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
bing475879749 2009-12-14
  • 打赏
  • 举报
回复
把你的红色部份改成这个试试??
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from product where nclassid="&Nclassid&" and xs=1 order by hits desc",conn,1,1
if rs.eof <>true then
for i=1 to 6
%>
lovebaby 2009-12-14
  • 打赏
  • 举报
回复
不懂你什么意思,报什么错?

28,406

社区成员

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

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