I am trying to embed a Derby DB in my application using the following code to connect to the database:
String host = "jdbc:derby:PlayerScores";
String uName = "user1";
String uPass = "pass123";
String driver = "org.apache.derby.jdbc.EmbeddedDriver";
Class.forName(driver);
Connection conn = DriverManager.getConnection(host, uName, uPass);
When I test the application and try save the data, the following message comes up:
java.sql.SQLException: Database 'PlayerScores' not found
I have checked my libraries and already have the derby.jarand the derbyclient.jarfiles in place.
I have checked my database name and it is correct.
How can I try correct this problem?
String host = "jdbc:derby:PlayerScores;create=true";