日期:2014-05-18 浏览次数:20506 次
'这样试试,其实真正代码方式不是你这么写的,不过按你的改下试试、、。、 <% 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 bianhao=bianhao&"信息已删除" objrs.close Set objrs=Nothing objConn.close Set 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