当前位置: 代码迷 >> Java Web开发 >> DBConnectionManager 连接问题
  详细解决方案

DBConnectionManager 连接问题

热度:198   发布时间:2010-03-18 12:55:07.0
DBConnectionManager 连接问题
protected Connection conn = null;        //Connection接口
    protected Statement stmt = null;        //Statement接口
    protected ResultSet rs = null;        //记录结果集
    protected PreparedStatement prepstmt = null;    //PreparedStatement接口
    protected String sqlStr;        //sql String
    protected boolean isConnect=true;    //与数据库连接标识
   
    public DataBase() {
        try
        {
            //数据库连接池包括一个管理类DBConnectionManager
            sqlStr = "";
            DBConnectionManager dcm = new DBConnectionManager();
            conn = dcm.getConnection();//这儿老是提示错误!
            stmt = conn.createStatement();
        }
    这儿老是提示错误!
搜索更多相关主题的帖子: 数据库  null  标识  

----------------解决方案--------------------------------------------------------
连接到哪儿去啊?
----------------解决方案--------------------------------------------------------
已经解决了,谢谢!
----------------解决方案--------------------------------------------------------