⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkbean.java

📁 sql+struts+jsp 提供考试的一般需求
💻 JAVA
字号:
package manage;
import java.sql.*;
import javax.sql.*;
public class checkBean {
    Connection conn=null;
    Statement stmt=null;
    ResultSet rst=null;
    public checkBean(DataSource ds)throws Exception{
        conn=ds.getConnection();
    }
   public boolean insert(String sql){
        try{
            stmt=conn.createStatement();
            if(stmt.executeUpdate(sql)!=1){
                return false;
            }

        }catch(SQLException e){
            e.printStackTrace();
        }
      return true;
    }
   public boolean delete(String sql){
         try{
             stmt=conn.createStatement();
             if(stmt.executeUpdate(sql)!=1){
                 return false;
             }

         }catch(SQLException e){}
             return true;
     }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -