SHARE
TWEET

Untitled

a guest Jan 21st, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void openConection()
  2. {
  3.     try
  4.     {
  5.         Properties props = new Properties();
  6.         props.put ("charSet", "ISO-8859-1");
  7.         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  8.         String dbURL = "jdbc:odbc:Driver={Microsoft AccessDriver (*.mdb)};DBQ=";
  9.         dbURL += this.path + ";DriverID=22;READONLY=false)";
  10.         this.connection = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft AccessDriver (*.mdb)};DBQ=" + this.path, props);
  11.         this.statement = this.connection.createStatement();
  12.         System.out.println("Success");
  13.     }catch(Exception e)
  14.     {
  15.             System.out.println("Error :" + e);
  16.     }
  17. }
  18.    
  19. ("jdbc:odbc:Driver={Microsoft AccessDriver (*.mdb)};DBQ=" + this.path, props
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top