//java解析.mdb文件的表名集合
this.tableList.clear();
conn = null;
st = null;
rs = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url ="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ="+dbName;//此为NO-DSN方式
//System.out.println("mdb文件路径:"+dbName);
conn=DriverManager.getConnection(url);
conn.setCatalog(dbName);
ResultSet tables = conn.getMetaData()
.getTables(dbName,null,null,new String[]{"TABLE"});
while(tables.next()){
String str = tables.getString(3);//getXXX can only be used once here
tableList.add(str);
}
//关闭连接
.............