1

I am connecting to remote excel file using jdbc driver:

Class.forName(JDBC_DRIVER);
        System.out.println("Connecting to database...");
        conn = DriverManager.getConnection("jdbc:excel:smb://username:pass@host/path/Data.xlsx");
        System.out.println("Connected to " + "url" + " successfully");

It works fine, but when I enter wrong username/password it connects successfully too. How should I implement it to get exception when connecting with wrong credentials?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Lusi
  • 391
  • 9
  • 28

0 Answers0