为什么会出现这样的错误(低级)

x98188 2003-09-25 10:36:48
出现的错误是
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'

[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'uid=' 中。

/ne/hz.asp,行17






index.asp
<!--#include file="conn.asp"-->
<html>
<head>
<tr>
<%
if not rs.eof then
rs.movelast
do while not rs.Bof

if rs("bj")=0 and rs("jh")=0 and rs("gh")=0 and rs("hz")=-1 then

%>
<td>
<A HREF=hz.asp?product=<%=rs("uid")%><%=rs("fenlei")%>>营养保健食品
</A></div>

</td>
<%
end if
rs.moveprevious
loop
end if
%>

<td>
<div align="center"><a href="jh.asp">家居护理用品</a></div>
</td>
<td>
<div align="center"><a href="gh.asp">个人护理用品</a></div>
</td>
<td>
<div align="center"></div>
</td>
</tr>
<tr>
<td>
<div align="center">安利新闻</div>
</td>
<td>
<div align="center">安利之家</div>
</td>
<td>
<div align="center">安利论坛</div>
</td>
<td>
<div align="center"></div>
</td>
<td> </td>
</tr>
</table>
</td>
<td><img src="images/top_r3_c3.gif" width="60" height="48"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="images/top_r4_c1.gif" width="245" height="20"><img src="images/top_r4_c2.gif" width="465" height="20"><img src="images/top_r4_c3.gif" width="60" height="20"></td>
</tr>

</table>
<% rs.close
set rs=nothing
%>
</center>
</div>
</body>
</html>

hz.asp
<!--#include file="conn.asp"-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<table>
<%

uid=Request("uid")
fenlei=Request("fenlei")
sql = "Select * From product Where uid=" & uid

Set rs = conn.Execute(sql)


%>
<%

Dim repeat3
Repeat3 =3
startrw = 0
endrw = HLooper1__index
numberColumns =3
numrows = 4

while((numrows <> 0) AND (repeat3 <> 0) and (Not rs.EOF))

startrw = endrw + 1
endrw = endrw + numberColumns

%>

<tr align="center" valign="top">
<%
While ((startrw <= endrw) AND (Not rs.EOF))
%>
<td width="232"> <table cellspacing=0 width=232 align=center>
<tbody>
<tr>
<td width=63 rowspan=5 valign="top"> <div align="center"><img src="img/<%=rs("pic")%>" width="55" height="75" border="0"></div></td>
<td width="71"> <div align="right">名 称:</div></td>
<td width=90><%=rs("name")%></td>
<tr>
<td width="71"> <div align="right">编号:</div></td>
<td width=90><%=rs("unid")%></td>
</tr>
<tr>
<td width="71"> <div align="right">市场价:</div></td>
<td width=90><font color="#FF0000">¥</font> <font color="#FF0000"><%=rs("price")%></font></td>
</tr>
<tr>
<td width="71" height="7"> <div align="right">会员价:</div></td>
<td width=90 height="7"> <font color="#FF0000">¥<%=rs("price")%></font><font color="#FF0000">
  </font></td>
</tr>
<tr>
<td colspan="2"> <div align="left">详细资料 <font color="#FF0000">购买</font></div></td>
</tr>
<tr>
<td width="63"> </td>
<td align=absmiddle
wth="50%" width="71"> </td>
<td align=absmiddle
wth="50%" width="90"> </td>
</tr>
</tbody>
</table></td>
<%

startrw = startrw + 1
rs.MoveNext()
Wend

%>
</tr>
<%
repeat3=repeat3-1

numrows=numrows-1
Wend
%>


</table>
</body>
</html>
...全文
93 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
liudong963 2003-09-26
  • 打赏
  • 举报
回复
在sql = "Select * From product Where uid=" & uid语句之前做个uid判断,如果uid为空就提示参数错误。
比如:
if Trem(uid)="" then
response.write "请输入用户ID号"
else
....
'到结束
end if
luluso 2003-09-25
  • 打赏
  • 举报
回复
sql = "Select * From product Where uid=" & uid
改成:
sql="select * from product where uid='"&uid&"'"

28,406

社区成员

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

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