您的位置:首页 > 编程语言 > ASP

(0x80040E07) 标准表达式中数据类型不匹配。

2009-12-17 10:39 323 查看
博物馆软件中遇到的问题

错误内容:
标准表达式中数据类型不匹配。
/ylstudio/gbookdel.asp, 第 6 行

错误代码
<!--#include file="conn.asp" -->
<%
lid=request(id)
sql="select * from book where id=cint('&lid&')"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
if not rs.eof then
rs.delete
rs.update
response.redirect "ok2.asp"
end if
%>




最佳答案

sql="select * from book where id=cint('&lid&')"
修改为:
sql="select * from book where id="&cint(lid)

cint是ASP的函数,不能传给SQL,SQL无法识别

把where id=cint('&lid&')" 或者把where id='&lid&'  改成where id="&cint(lid)

就可以了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  sql asp file
相关文章推荐