asp中对象无法关闭该怎么解决?
ADODB.Recordset 错误 '800a0e78'
对象关闭时,不允许操作。
/通讯录/delnew.asp,行 12
代码:
<%
Dim objconn
Dim objrs
Dim sql
Dim bianhao
bianhao=request("userid")
sql="delete from net_table where userid="&"'"&bianhao&"'"
Set objconn=server.CreateObject("adodb.connection")
objconn.open"driver={SQL server};server=127.0.0.1; database=myform1;uid=sa;PWD=;"
Set objrs=server.CreateObject("adodb.recordset")
objrs.open sql,objconn,2,2
objrs.close
Set objrs=Nothing
objConn.close
Set objconn=Nothing
bianhao=bianhao&"信息已删除"
%>
<script language=vbscript>
alert("<%=bianhao%>")
Window.Location.href="index.asp"
</script>
[解决办法]
非sql server内容,请你去asp版问.
[解决办法]
'这样试试,其实真正代码方式不是你这么写的,不过按你的改下试试、、。、<%Dim objconnDim objrsDim sqlDim bianhaobianhao=request("userid")sql="delete from net_table where userid="&"'"&bianhao&"'"Set objconn=server.CreateObject("adodb.connection")objconn.open"driver={SQL server};server=127.0.0.1; database=myform1;uid=sa;PWD=;"Set objrs=server.CreateObject("adodb.recordset")objrs.open sql,objconn,2,2bianhao=bianhao&"信息已删除"objrs.closeSet objrs=NothingobjConn.closeSet objconn=Nothing%><script language=vbscript> alert("<%=bianhao%>") Window.Location.href="index.asp" </script>
[解决办法]
sql="delete from net_table where userid="&"'"&bianhao&"'"
Set objconn=server.CreateObject("adodb.connection")
objconn.open"driver={SQL server};server=127.0.0.1; database=myform1;uid=sa;PWD=;"
objconn.exec(sql)
objConn.close
Set objconn=Nothing