rs.update 不成功

来源:百度知道 编辑:UC知道 时间:2024/05/19 20:18:25
<%
action=request("ok")
if action="" then
Set rs = conn.Execute("select * from bconfig")
%>
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<form action=config2.asp method=post name=setup>
<tr class=backs><td colspan=2 class=td height=18>网站开关设置  </td></tr>
<tr><td width=20% align=right>网站开关状态  </td><td > <input type="radio" name="kaiguan" value="1" <%if rs("kaiguan")<>0 then%>checked<%end if%>>开放   <input type="radio" name="kaiguan" value="0" <%if rs("kaiguan")=0 then%>checked<%end if%>>关闭</td></TR>
<tr><td width=20%

首先 这段代码 肯定出错了,报错内容可能为 在rs关闭时或未打开时不能执行rs.close 命令。
你打开rs 用的是 静态打开所以 不能用rs.close命令
注意第4行
Set rs = conn.Execute("select * from bconfig")

至于你说没有报错信息,并不是没有报错,而是你没看见,有可能是你前面在提交表单时用的是隐藏提交。而实际已经 显示出来了只是你没有看到。

如果还有问题 再联系我
本人 有一个vb asp 群 如有兴趣请加17770992