<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,java.io.*"%>

<html>
<body>
<center>
<html>
<body>
<%  String sDBDriver = "sun.jdbc.odbc.JdbcOdbcDriver";  
    String sConnStr = "jdbc:odbc:try";//“try”的意思就是与刚才设置的数据源名对应; 
    Connection Con = null;
    Statement Stmt = null;
     try          /*加载驱动程序*/
    {
    Class.forName(sDBDriver); 
     }
    catch(java.lang.ClassNotFoundException e)
    { 
   out.print("Connect to Database error: " + e.getMessage());
     }
   try          /*建立连接*/
    {
   Con = DriverManager.getConnection(sConnStr,"sa",""); 
     }
   catch(SQLException e)
   {
   out.print(e.toString());
    }
    Stmt = Con.createStatement();    /*创建JDBC声明*/ 
    boolean bl=Stmt.execute("delete from EMPLOYEE where ename='fa'");    //关闭连接、释放资源
    Stmt.close();
    Con.close();  
    %>    
<center>
</body>
</html>
