【jdbc-odbc bridge 链接】
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String path = "C:/Users/jimiao/Desktop/学生成绩.mdb";
String dbur1 = "jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ="+path;
Connection conn = DriverManager.getConnection(dbur1, "sa", "ok");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from 学生");
while (rs.next()) {
System.out.println(rs.getString(1));
}
rs.close();
stmt.close();
conn.close();
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
【jdbc-odbc bridge 链接】
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String path = "C:/Users/jimiao/Desktop/学生成绩.mdb";
String dbur1 = "jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ="+path;
Connection conn = DriverManager.getConnection(dbur1, "sa", "ok");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from 学生");
while (rs.next()) {
System.out.println(rs.getString(1));
}
rs.close();
stmt.close();
conn.close();