好吧,首先,导入您的库(lib文件夹中的jar文件)。http://sourceforge.net/projects/ucanaccess/files/UCanAccess-2.0.9.1-bin.zip/download
然后检查一下。这可能会有所帮助。
Connection a = DriverManager.getConnection("jdbc:ucanaccess://C:\Users\Vince\Desktop\Teams.accdb");Statement s = a.createStatement();String sqlQuery = "SELECt PlayerID, PlayerName, TeamID " + "FROM PLAYER"+"'";ResultSet rs = s.executeQuery(sqlQuery);while(rs.next()){System.out.println("Connected to DB & found Data!!!");}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)