<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="java.sql.*" %>
<HTML>
<BODY>
<p>按资产序号查询的结果：
  <% 
    String name=request.getParameter("name");
          if(name==null)
            {name="";
            }
     byte b[]=name.getBytes("ISO-8859-1");
     name=new String(b);
String zichanxuhao,zichanleixing,yongtu,peizhi,jiage,goumairiqi,shiyongzhouqi,beizhu,zhuangtia,zichangmingcheng,fuwu;
    Connection con=null;
    Statement sql=null;
    ResultSet rs=null;
       try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          }
       catch(ClassNotFoundException e){}
       try { con=DriverManager.getConnection("jdbc:odbc:sun","sa","");
             sql=con.createStatement();
             String condition="SELECT * FROM zichan WHERE zichanxuhao ="+"'"+name+"'";
             rs=sql.executeQuery(condition);
             out.print("<Table Border>");
              out.print("<TR>");
              out.print("<TH width=300>"+"资产序号");
              out.print("<TH width=300>"+"资产类型");
              out.print("<TH width=150>"+"用途");
              out.print("<TH width=150>"+"配置");
              out.print("<TH width=150>"+"价格");
              out.print("<TH width=500>"+"购买日期");
              out.print("<TH width=300>"+"使用周期");
              out.print("<TH width=150>"+"备注");
              out.print("<TH width=150>"+"状态");
              out.print("<TH width=300>"+"资产名称");
              out.print("<TH width=150>"+"服务");
              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("</Table>");
              con.close();
           }
    catch(SQLException e)
           {  }
%>

</BODY>
</HTML>