急,这段代码有错吗,asp删除不掉数据。 但是直接填写id号就可以删除。。。
<%jbid=request("jbid")ifjbid=""thenResponse.write"<SCRIPTlanguage=JavaScript>alert('参...
<%
jbid=request("jbid")
if jbid="" then
Response.write "<SCRIPT language=JavaScript>alert('参数错误!');"
Response.Write "this.location.href='wbgl.asp';</SCRIPT>"
Response.End
end if
%>
<%
exea="DELETE FROM wb WHERE id='"&jbid&"'"
set rs=server.createobject("adodb.recordset")
rs.open exea,conn,1,3
rs.close
set rs=nothing
Response.write "<SCRIPT language=JavaScript>alert('删除成功!!');"
Response.Write "this.location.href='wbgl.asp';</SCRIPT>"
Response.End
%> 展开
jbid=request("jbid")
if jbid="" then
Response.write "<SCRIPT language=JavaScript>alert('参数错误!');"
Response.Write "this.location.href='wbgl.asp';</SCRIPT>"
Response.End
end if
%>
<%
exea="DELETE FROM wb WHERE id='"&jbid&"'"
set rs=server.createobject("adodb.recordset")
rs.open exea,conn,1,3
rs.close
set rs=nothing
Response.write "<SCRIPT language=JavaScript>alert('删除成功!!');"
Response.Write "this.location.href='wbgl.asp';</SCRIPT>"
Response.End
%> 展开
1个回答
2012-02-26
展开全部
exea="DELETE FROM wb WHERE id='"&jbid&"'"
改成
exea="DELETE FROM wb WHERE id="&jbid
因为不是字符串类型,不要带单引号
改成
exea="DELETE FROM wb WHERE id="&jbid
因为不是字符串类型,不要带单引号
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询