日期:2014-05-17  浏览次数:20934 次

对象关闭时,不允许操作(求助,哪里错了
<%@LANGUAGE= "VBSCRIPT "   CODEPAGE= "936 "%>
<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN "   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<!--#include   file= "db.inc.asp "--> '与数据库连接
<%
set   rst=server.createobject( "ADODB.recordset ")
on   error   resume   next
if   request.querystring( "act ")= "del "   then
  id=request.querystring( "id ")
  conn.begintrans
  rst.open   "delete   from   userinfo   where   u_id= ' "&id& " ' ",conn,1,3
  rst.delete
  rst.close
  if   err.number <> 0   then
  conn.rollbacktrans  
  response.write "删除会员失败 <br> 原因: "&err.description
  else  
  conn.committrans
  response.write "删除会员成功 "
  end   if

end   if
%>
<html   xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 "   />
<title> 会员管理 </title>
<style   type= "text/css ">
<!--
.STYLE5   {color:   #000000;   font-size:   12px;   }
-->
</style>
</head>

<body>

<table   border= "1 "   cellpadding= "0 "   cellspacing= "0 "   bordercolor= "#000000 ">
    <tr>
        <td     align= "center "   valign= "middle "> 用户名 </td>
        <td     align= "center "   valign= "middle "> 密码 </td>
        <td     align= "center "   valign= "middle "> 姓名 </td>
        <td     align= "center "   valign= "middle "> 年龄 </td>
        <td     align= "center "   valign= "middle "> 操作 </td>
    </tr>
<%
set   rst=server.createobject( "ADODB.recordset ")
sql= "select   *   from   userinfo "
rst.open   sql,conn,1,1
while   not   rst.eof
%>
<tr>
        <td     align= "center "   valign= "middle "> <%=rst( "u_id ")%> </td>
        <td     align= "center "   valign= "middle "> <%=rst( "u_password ")%> </td>
        <td     align= "center "   valign= "middle "> <%=rst( "u_name ")%> </td>
        <td     align= "center "   valign= "middle "> <%=rst( "u_age ")%> </td>
        <td     align= "center "   valign= "middle ">
<a   href= "admin.asp?act=del&id= <%=rst( "u_id ")%>   ">