救命啊~!语法错误 (操作符丢失) 在查询表达式 'id=' 中。

来源:百度知道 编辑:UC知道 时间:2024/06/09 15:14:57
<link href="style.css" rel="stylesheet" type="text/css">
<!--#include file="public.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>FUZHOU OCEANAL STAR BAGS CO.,LTD</title>
</head>
<% sql = "SELECT* FROM pro where id="&request("id")& ""
Set rs2= Server.CreateObject("ADODB.Recordset")
rs2.OPEN sql,Conn,1,1%>
<body>
<div align="center">
<table width="60%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="161" colspan="4"> <div align="center"><img src="<%=rs2("pic")%>" border="0"></div></td>
</tr>
<tr&

你的request("id")可能没有取到值.所以会说操作符丢失...

还有就是把你的查询语句换一下吧...

sql = "SELECT* FROM pro where id="&request("id")& ""

我知道你要表达的意思,,,但在这里.有能程序认为你的语句到sql = "SELECT* FROM pro where id="就结束了..

你改为sql = "SELECT* FROM pro where id="&request("id")
或者 sql = "SELECT* FROM pro where id='"&request("id")&"'"

然后再试一下///

sql = "SELECT * FROM pro where id="&request("id")