Advertisement
Guest User

Untitled

a guest
Dec 28th, 2018
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. public class dbConnection {
  2. private static final String SQCONN = "jdbc:sqlite:evidentionalsystem.sqlite";
  3.  
  4.     public static Connection getConnection()throws SQLException{
  5.  
  6.         try{
  7.             Class.forName("org.sqlite.JDBC");
  8.             return DriverManager.getConnection(SQCONN);
  9.         }
  10.         catch (ClassNotFoundException ex) {
  11.             ex.printStackTrace();
  12.         }
  13.         return null;
  14.     }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement