Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void openConection()
- {
- try
- {
- Properties props = new Properties();
- props.put ("charSet", "ISO-8859-1");
- Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
- String dbURL = "jdbc:odbc:Driver={Microsoft AccessDriver (*.mdb)};DBQ=";
- dbURL += this.path + ";DriverID=22;READONLY=false)";
- this.connection = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft AccessDriver (*.mdb)};DBQ=" + this.path, props);
- this.statement = this.connection.createStatement();
- System.out.println("Success");
- }catch(Exception e)
- {
- System.out.println("Error :" + e);
- }
- }
- ("jdbc:odbc:Driver={Microsoft AccessDriver (*.mdb)};DBQ=" + this.path, props
Add Comment
Please, Sign In to add comment