Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package common;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- public class GmsisDatabase {
- private GmsisDatabase(){
- }
- public Connection getConnection()
- {
- String host = "jdbc:derby://localhost:1527/sample";
- String username = "Asehailia";
- String password = "Tg@123";
- Connection con = null;
- try{
- con = DriverManager.getConnection( host, username, password );
- }
- catch (SQLException e) {
- System.out.println(e.getMessage());
- }
- return con;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement