asp有错误,请求帮助!

来源:百度知道 编辑:UC知道 时间:2024/05/25 00:29:55
错误类型:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
第 1 行: '=' 附近有语法错误。
/admin/save_product.asp, 第 44 行

第1,2行如下

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

请问我这代码哪里有错误!?

我的save_product.asp文件如下:

<% if request.querystring("action")="edit" then
set rs=server.createobject("adodb.recordset")
sql="select * from news where id="&trim(request.form("id"))
rs.open sql,conn,1,3 '--这是44行
rs("id")=trim(request.form("sort_id"))

rs("title")=trim(request.form("product_sort"))
rs("small_img")=trim(request.form("small_img"))
<% if request.Cookies("username")="" then
response.Redirect("index.asp")
end if
%>
cookies.asp文件内容!

sql="select * from news where id="&trim(request.form("id"))
该成sql="select * from news where id="&int(request.form("id"))
试试
或者就按上面的试试

应该在44行下加这个:没有加帧向
if not rs.eof then'如果在表中找到这条信息的情况下,事件...
else'如果没有这资料,事件
end if '完毕

cookies.asp页面发出来看一下。
这个页面看着很正常