MS Access JDBC驱动(共享)
本人找到了真正的可以用的MS Access JDBC驱动程序再此共享一下
Test java code
--------------------------------
public DataBase(String TableName){
try{
Class.forName("com.hxtt.sql.access.AccessDriver");
con = DriverManager.getConnection("jdbc:access:/./db/Test.mdb");
//System.out.println("OK");
state=con.createStatement();
rs=state.executeQuery("select * from "+TableName+" order by User_ID");
rsmd = rs.getMetaData();
Datas = new Vector<String>();
while(rs.next()){
for(int i =1;i<=rsmd.getColumnCount();i++)
Datas.add(rs.getString(i).trim());
}
Titles = new Vector<String>();
for(int i =1;i<=rsmd.getColumnCount();i++)
Titles.add(rsmd.getColumnName(i).trim());
// System.out.println(Datas+"\n"+Titles);
}catch(Exception e){
e.printStackTrace();
}
}
--------------------------------------------
具体用法可以看里面的html帮助文挡
.......................................
无语了
太大传不上去
----------------解决方案--------------------------------------------------------