private static Connection con;

    private static void initialiseDb() throws ClassNotFoundException, SQLException {
        if (con == null) {
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            String connectionUrl = "jdbc:sqlserver://DESKTOP-5QJKKU5\\sqlexpress:1433;databaseName=ssis-tutorial;username=hibernate;password=pa$$w0rd;";
            con = DriverManager.getConnection(connectionUrl);
        }
    }

Leave a Reply

Your email address will not be published. Required fields are marked *