private static final String accessDBURLPrefix = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";     private static final String accessDBURLSuffix = ";DriverID=22;READONLY=false}";      // Initialize the JdbcOdbc Bridge Driver     static {         try {             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");         } catch(ClassNotFoundException e) {             System.err.println("JdbcOdbc Bridge Driver not found!");         }     }      /** Creates a Connection to a Access Database */     public static Connection getAccessDBConnection(String filename) throws SQLException {         filename = filename.replace('', '/').trim();         String databaseURL = accessDBURLPrefix + filename + accessDBURLSuffix;         return DriverManager.getConnection(databaseURL, "", "");     }私人静态的最后字符串accessdburlprefix = “的JDBC为: ODBC :司机= ( Microsoft Access的驱动程序( *. mdb )中) ; dbq = ” ;私人静态的最后字符串accessdburlsuffix = “ ; driverid = 22 ;只读=虚假) ” ; / /初始化jdbcodbc桥式驱动器的静态(尝试( class.forname ( “ sun.jdbc.odbc.jdbcodbcdriver ” ) ; )赶上( classnotfoundexception五) ( system.err.println ( “ jdbcodbc桥式驱动器未找到! ” ) ; ) ) / **创建一个连接到Access数据库中* /公共静态连接getaccessdbconnection (字符串的文件名)抛出sqlexception (文件名= filename.replace ( '' , '/').修剪( ) ;字符串databaseurl = accessdburlprefix +文件名+ accessdburlsuffix ;返回drivermanager 。 getconnection ( databaseurl , “ ” , “ ” ) ; )