You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Gayal <ga...@gmail.com> on 2007/07/02 11:02:37 UTC

Terminating batch Job

Hi,

I'm new to Derby and going through tutorials lately, and came with a small
bug.

I'm using "ij" on Windows Command line and it gets terminated even with
"n||N"  when asked Terminated batch Job (Y/N)?

-- 
With Best Regards,
Gayal Rupasinghe

Re: Embedding the database in a java application

Posted by Ole Gunnar Borstad <ol...@stud.ntnu.no>.
Hi,

I think this is what you're looking for:

http://db.apache.org/derby/docs/10.2/workingwithderby/

Go to Activity 3 and study the example code.

- Ole Gunnar

Siterer Brandon Dohman <br...@eiu.edu>:

> I have recently written a small client/server program in java.  I   
> have the client connect to the server and send information back and   
> forth.  the server is on the same computer as the derby database,   
> and handles all the communication between the java code and the   
> derby database, ie: sql commands.  Currently i am starting derby   
> from inside the netbeans ide but would like to be able to have the   
> java code start the database, so that I can just run the jar file   
> w/out having to do things from inside netbeans all of the time.  I   
> have looked for a way to start the database from java code but have   
> been unsuccessful in finding it.  any help would be greatly   
> appreciated.
>
> Thanks
>
>




Re: Embedding the database in a java application

Posted by Kurt Huwig <k....@iku-ag.de>.
Am Montag, 2. Juli 2007 schrieb Brandon Dohman:
> I have recently written a small client/server program in java.  I have the
> client connect to the server and send information back and forth.  the
> server is on the same computer as the derby database, and handles all the
> communication between the java code and the derby database, ie: sql
> commands.  Currently i am starting derby from inside the netbeans ide but
> would like to be able to have the java code start the database, so that I
> can just run the jar file w/out having to do things from inside netbeans
> all of the time.  I have looked for a way to start the database from java
> code but have been unsuccessful in finding it.  any help would be greatly
> appreciated.
>
> Thanks

Add the derby.jar to the classpath, then do:

       Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
       final Connection con = DriverManager.getConnection(
                    "jdbc:derby:/home/kurt/databasename;create=true");

-- 
Mit freundlichen Grüßen

Kurt Huwig
GnuPG 1024D/99DD9468 64B1 0C5B 82BC E16E 8940  EB6D 4C32 F908 99DD 9468

Embedding the database in a java application

Posted by Brandon Dohman <br...@eiu.edu>.
I have recently written a small client/server program in java.  I have the client connect to the server and send information back and forth.  the server is on the same computer as the derby database, and handles all the communication between the java code and the derby database, ie: sql commands.  Currently i am starting derby from inside the netbeans ide but would like to be able to have the java code start the database, so that I can just run the jar file w/out having to do things from inside netbeans all of the time.  I have looked for a way to start the database from java code but have been unsuccessful in finding it.  any help would be greatly appreciated.

Thanks