2 d12kyd d12kyd 于 2016.03.18 15:18 提问

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
u013772876   2016.03.18 16:41

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

Royal_lr
Royal_lr   Ds   Rxr 2016.03.18 17:34

没有用户名和密码的吗

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!