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

📄 dbsqlmanager.java

📁 JSP+SQL应用开发网上书店系统,采用BMP模式开发
💻 JAVA
字号:
package hell;import java.sql.*;import hell.*;public class DBSQLManager {  protected Connection conn=null;  protected Statement stmt=null;  protected ResultSet rs=null;  protected String sqlStr;  public DBSQLManager() {    try    {      sqlStr="";      DBConnectionManager dcm=new DBConnectionManager();      conn=dcm.getConnection();      stmt=conn.createStatement();    }    catch(Exception e){    System.out.println(e);    }  }public Statement getStmt(){    return stmt;      }public Connection getConn(){      return conn;      }public ResultSet getRs(){      return rs;      }public void setSqlStr(String newSqlStr){      this.sqlStr=newSqlStr;      }public String getSqlStr(){      return sqlStr;      }public void executeQuery() throws Exception{      rs=stmt.executeQuery(sqlStr);      }public void executeUpdate() throws Exception{      stmt.executeUpdate(sqlStr);      }public void clse() throws SQLException{      if(stmt!=null){      stmt.close();      stmt=null;      }  conn.close() ;  conn=null;    }}

⌨️ 快捷键说明

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