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

来源:互联网 发布:mac apple store打不开 编辑:程序博客网 时间:2024/05/01 11:28

博物馆软件中遇到的问题

错误内容:标准表达式中数据类型不匹配。/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,2if not rs.eof thenrs.deleters.updateresponse.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) 就可以了。