错误:对象关闭时,不允许操作,这个该怎么解决
时间:2011-12-09
来源:互联网
sql语句在sqlserver企业管理其中验证过没有错误的,但是在浏览器中调试的时候就会提示“对象关闭时不允许操作”,百度上查看了一大堆网页,都没有找打哦可以解决的方法,自己问问大家,下面是代码。
HTML code
HTML code
<%@ Language=VBScript codepage="65001"%> <!doctype html system> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body <%Session.CodePage = 65001%>> <% if Request.ServerVariables("REQUEST_METHOD")="POST" then dim k,str,ary,sql set conn=server.createobject("adodb.connection") conn.open"Provider=SQLOLEDB;server=stu19;database=lan;uid=sa;pwd=" set rs=server.createobject("adodb.recordset") str=request.form("a") ary=split(str,",") for k=0 to ubound(ary,1) sql="update 订单表 set sent='是' where Order_ID='" & ary(k) & "'" rs.open sql,conn,1,3 rs.update next response.redirect("order.asp") end if %> </body></html>
作者: Lanal11 发布时间: 2011-12-09
HTML code
<%@ Language=VBScript codepage="65001"%> <!doctype html system> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body <%Session.CodePage = 65001%>> <% if Request.ServerVariables("REQUEST_METHOD")="POST" then dim k,str,ary,sql set conn=server.createobject("adodb.connection") conn.open"Provider=SQLOLEDB;server=stu19;database=lan;uid=sa;pwd=" str=request.form("a") ary=split(str,",") for k=0 to ubound(ary,1) sql="update 订单表 set sent='是' where Order_ID='" & ary(k) & "'" conn.execute(sql) next response.redirect("order.asp") end if %> </body></html>
作者: tcwsyt 发布时间: 2011-12-09
ConnStr="driver={SQL Server};server="&SqlLocalName&";uid="&SqlUsername&";pwd="&SqlPassword&";database="&SqlDatabaseName&";"
on error resume next
Set conn = Server.CreateObject("ADODB.Connection")
conn.commandtimeout=20
conn.open ConnStr
on error resume next
Set conn = Server.CreateObject("ADODB.Connection")
conn.commandtimeout=20
conn.open ConnStr
作者: hefeng_aspnet 发布时间: 2011-12-09
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28