how do i connect to a derby database created in Netbeans externally?

I've created a a Java DB in Netbeans, I can connect to the Java DB server and then to my database from Netbeans. I need to use this database outside of Netbeans... a table from this database is used in a program which i created with netbeans... i open the program using the .jar file outside of netbeans... but i can't access the table.

can anyone help me with this?

[381 byte] By [karanmadhoka] at [2007-11-27 0:45:56]
# 1
^
karanmadhoka at 2007-7-11 23:11:37 > top of Java-index,Java Essentials,Java Programming...
# 2

what exactly are you wanting to do? to connect to the database i use this

String driverName = "org.apache.derby.jdbc.ClientDriver";

Class.forName(driverName);

String url = "jdbc:derby://localhost:1527/table name";

String username = "username";

String password = "password";

connection = DriverManager.getConnection(url, username, password);

you need to make sure that you have the derbyclient.jar file in the librarie for your project.

Message was edited by:

developprograms

developprogramsa at 2007-7-11 23:11:37 > top of Java-index,Java Essentials,Java Programming...
# 3
ya, i used similar code to connect to the database in my code...with Netbeans, before running my program, I start the Java DB server from Tools>Java DB Database. Is their any way of starting this server on my computer outside of netbeans?
karanmadhoka at 2007-7-11 23:11:37 > top of Java-index,Java Essentials,Java Programming...
# 4
In embedded mode, starting Derby can be accomplished by loading the driver.Class.forName("org.apache.derby.jdbc.EmbeddedDriver");In a network deployment, you can use the start-up scripts supplied.
filestreama at 2007-7-11 23:11:37 > top of Java-index,Java Essentials,Java Programming...
# 5
Where are my Duke Stars? I answered your question so now I need Duke Stars! My emotional well-being hinges on you giving me Duke Stars!
filestreama at 2007-7-11 23:11:37 > top of Java-index,Java Essentials,Java Programming...