asp编写网页批量删除sql server中数据
我用vbscript编写的asp页面对sql server数据库中的数据进行批量删除,当数量较少时,可以正确完成操作,但是删除的数目在十条以上时,网页就没有响应了,就要重新启动sql server,通过asp调用ado对象对sql server的数据删除操作不会只能在十条一下吧,希望各位大虾指教,小弟不胜感激 下面是我对数据库操作的vbscript部分代码,请指教if (Request.QueryString("id") <> "") then Recordset1__MMColParam = Request.QueryString("id")
Dim str
idArray=split(Recordset1__MMColParam,",")
for each idstr in idArray
str=str & "id=" & idstr & " or "
next
str= left(str,(len(str)-len(" or ")))
CMD_DelSQL = "DELETE FROM lp_td WHERE " + str + " "
Set XP_cmFileDel = Server.CreateObject("ADODB.Command")
XP_cmFileDel.ActiveConnection = MM_con_STRING
XP_cmFileDel.CommandText = CMD_DelSQL
XP_cmFileDel.CommandTimeout = 0
XP_cmFileDel.CommandType = 1
XP_cmFileDel.Prepared = true
XP_cmFileDel.Execute()