|
@ -0,0 +1,21 @@ |
|
|
|
|
|
package de.hs_fulda.ciip.projjpn; |
|
|
|
|
|
|
|
|
|
|
|
import java.sql.Connection; |
|
|
|
|
|
import java.sql.DriverManager; |
|
|
|
|
|
import java.sql.SQLException; |
|
|
|
|
|
|
|
|
|
|
|
public class Games { |
|
|
|
|
|
private String databaseURL = "jdbc:ucanaccess://GamesDB.accdb"; |
|
|
|
|
|
|
|
|
|
|
|
public boolean checkForConnection() { |
|
|
|
|
|
try { |
|
|
|
|
|
Connection connection = DriverManager.getConnection(databaseURL); |
|
|
|
|
|
|
|
|
|
|
|
connection.close(); |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |