注册 登录
编程论坛 J2EE论坛

DBConnectionManager 连接问题

xiaoxiaoyun 发布于 2010-03-18 12:55, 931 次点击
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();
        }
    这儿老是提示错误!
2 回复
#2
cnfarer2010-03-18 14:59
连接到哪儿去啊?
#3
xiaoxiaoyun2010-03-30 12:32
已经解决了,谢谢!
1