ClientDriver for remote access and EmbeddedDriver for local access
The default constructor should always use the simplest, possible way
to connect to an embedded database.
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- a/javadb/org/homelinux/largo/app/App.java
+++ b/javadb/org/homelinux/largo/app/App.java
@@ -5,12 +5,7 @@
public class App {
public static void main (String args[]) {
try {
- DBClient db = new DBClient (
- "org.apache.derby.jdbc.EmbeddedDriver",
- "jdbc:derby:clubstatistik",
- null, null
- );
-
+ DBClient db = new DBClient ();
db.query ("select * from euroleague order by team");
while (db.hasNext ()) {
--- a/javadb/org/homelinux/largo/sql/client/DBClient.java
+++ b/javadb/org/homelinux/largo/sql/client/DBClient.java
@@ -22,7 +22,7 @@
*/
public DBClient () throws Exception {
this.driver = "org.apache.derby.jdbc.EmbeddedDriver";
- this.dbURL = "jdbc:derby://localhost/clubstatistik";
+ this.dbURL = "jdbc:derby:clubstatistik";
this.username = null;
this.password = null;