<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="java.sql.*" %>
<HTML>
<BODY ><Font size=5>
  <% //获取提交的资产序号：
    String number=request.getParameter("number");
          if(number==null)
            {number="";
            }
     byte b[]=number.getBytes("ISO-8859-1");
     number=new String(b);
    Connection con=null;
    Statement sql=null;
    ResultSet rs=null;
       try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          }
       catch(ClassNotFoundException event){}
       try {con=DriverManager.getConnection("jdbc:odbc:sun","sa","");
       sql=con.createStatement();
       //删除操作：
       String deleteAll="DELETE  FROM zichan WHERE zichanxuhao"+" = "+"'"+number+"'";
       sql.executeUpdate(deleteAll);
      %>
     <P>删除记录后的表：
     <%
       rs=sql.executeQuery("SELECT * FROM zichan ");
       out.print("<Table Border>");
            out.print("<TR>");
              out.print("<TH width=200>"+"资产序号");
              out.print("<TH width=150>"+"资产类型");
              out.print("<TH width=100>"+"用途");
              out.print("<TH width=100>"+"配置");
              out.print("<TH width=100>"+"价格");
              out.print("<TH width=150>"+"购买日期");
              out.print("<TH width=150>"+"使用周期");
              out.print("<TH width=100>"+"备注");
              out.print("<TH width=100>"+"状态");
              out.print("<TH width=150>"+"资产名称");
              out.print("<TH width=100>"+"服务");
              out.print("</TR>");
       while(rs.next())
           {    out.print("<TR>");
                out.print("<TD >"+rs.getString(1)+"</TD>"); 
                     out.print("<TD >"+rs.getString(2)+"</TD>");
                     out.print("<TD >"+rs.getString(3)+"</TD>"); 
                     out.print("<TD >"+rs.getString(4)+"</TD>");
                     out.print("<TD >"+rs.getString(5)+"</TD>");  
                     out.print("<TD >"+rs.getString(6)+"</TD>");   
                     out.print("<TD >"+rs.getString(7)+"</TD>");   
                     out.print("<TD >"+rs.getString(8)+"</TD>");   
                     out.print("<TD >"+rs.getString(9)+"</TD>");   
                     out.print("<TD >"+rs.getString(10)+"</TD>");
                     out.print("<TD >"+rs.getString(11)+"</TD>");       
                     out.print("</TR>") ;  
            out.print("</TR>") ;  
         }
       out.print("</Table>");
      con.close();
     }
    catch(SQLException event)
          {out.print(""+event);
          }
 %>
</FONT>
</BODY>
</HTML>
