求助,这段代码那里有问题?
<%id=request.QueryString("id")
Conn.execute("update 留言信息 set check=check+1 where ID="&id)
%>
错误类型:
Microsoft JET Database Engine (0x80040E14)
UPDATE 语句的语法错误。
请高手们指点!
把sql语句内容打出来看看 <%
id=request.QueryString("id")\
'response.write(id)
Conn.execute("update 留言信息 set check=check+1 where ID="&id)
%>
我用了response.write(id)
进行测试,输出有值
不知道是那里出了问题? 把SQL语句打出来,天晓得你把ID打了出来 gbookchk.asp
<!--#include file="gbconn.asp" -->
<%
if request.cookies("adminok")="" then
response.redirect "index.asp"
end if
%>
<%
id=cint(request.QueryString("id"))
'response.Write(id)
conn.execute"update 留言信息 set check =check+1 where ID="&id
%>
index.asp的部分代码是:
<tr>
<td width="58%" height="22"> 管理员你好,请你操作:
[<a href="gbookedit.asp?id=<%=rs("id")%>"><font color="#008000">编辑留言</font></a>]
[<a href="gbookdel.asp?id=<%=rs("id")%>"><font color="#FF0000">删除留言</font></a>]
[<a href="gbookchk.asp?id=<%=rs("id")%>"><font color="#FF0000">审核留言 </font></a>] </td>
<td width="25%" height="22">
<p align="right">IP:<font color="#000000"><%=rs("ip")%></font> </p> </td>
</tr>
大家帮忙看看
到底问题出在何处?
谢谢 我的目的就是想修改表“留言信息”中的check(数字类型)的值
就是让check在原来的基础上加1
还有没有别的方式实现呢? Conn.execute("update 留言信息 set check=check+1 where ID="&id)
确认字段拼写都正确吗? 我的问题解决了,
谢谢大家的参与! 别人到最后还是不晓得他怎么解决的,还指望以后有人帮他吗? 最好不要使用中文来对数据表或字段命名 conn.execute"update 留言信息 set check =check+1 where ID="&id
conn.execute "update 留言信息 set [check] =[check]+1 where [ID]="&id 原来 错在check 是一个关键字
页:
[1]
