博物馆软件中遇到的问题
错误内容:
标准表达式中数据类型不匹配。
/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) 就可以了。
版权声明:本文为ttt015651原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。