d12kyd
d12kyd
采纳率0%
2016-03-18 07:18 阅读 1.6k

java odbc access 连接数据库失败

public class ConnectionPool {

private String jdbcDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
private String dbPath = "";
private String dbUrl ="jdbc:odbc:driver={Microsoft Access Driver (*.mdb, *.accdb)};" +
        "DBQ=D:\\Workspaces\\MyEclipse 10\\test\\src\\org\\wuhang\\app\\db\\db1.mdb"; 
private String dbUsername = ""; 
private String dbPassword = ""; 
private String testTable = "cate";
private int initialConnections = 5; 
private int incrementalConnections = 5;   
private int maxConnections = 10; 
private Vector connections = null; 



    出现了
    Failed connecting to the Database!
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • u013772876 夜半无声 2016-03-18 08:41

    不用账号密码的吗? 先用数据库客户端登陆试试!

    点赞 评论 复制链接分享
  • Royal_lr Royal_lr 2016-03-18 09:34

    没有用户名和密码的吗

    点赞 评论 复制链接分享

相关推荐