Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Connection getConnection()
- {
- Connection connection = null;
- String DBURL = "jdbc:derby:database/DealershipDB;";
- try
- {
- //Set the directory
- //String dbDirectory = "db";
- //System.setProperty("derby.system.home", dbDirectory);
- //Set the db url, username, and password
- //String url = "jdbc:derby:database/DealershipDB;";
- //String username = "";
- //String password = "";
- connection = DriverManager.getConnection(DBURL);
- return connection;
- }
- catch(SQLException e)
- {
- System.err.println(e);
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement