I let let user pick a directory (either via a property or via a file
selector) than I set the derby.system.home property programtically like

       System.setProperty("derby.system.home", dbLocation);

The value of dbLocation when you print it is for ex.  C:\Documents and
Settings\fred\xyz  (that is the way you should set the value) but when you
use the debugger it will of course show up as   C:\\Documents and
Settings\\fred\\xyz

After this value is set I use the URL like   jdbc:derby:myDB;create=true
and the database myDB is created under the given directory.

Hope this helps
B-)

On Thu, Mar 27, 2008 at 2:15 PM, Ricardo Seromenho <[EMAIL PROTECTED]> wrote:

>  PerfectReign has posted the message above and I am with the same problem.
>
> The question is:
> What should be the Database URL ?
> like this:
> C:\\SOMEWHERE\\
> or
> C\:\\SOMEWHERE\\
> or
> C:/SOMEWHERE/
>
> ?
>
> Thanks
>
>
>
> ----------------
>
>
>  Question about Embedded Derby [image: Click to flag this post]
>
> by PerfectReign <http://www.nabble.com/user/UserProfile.jtp?user=123271>Jan 
> 30, 2008; 09:33pm:: Rate this Message:
> <http://www.nabble.com/Question-about-Embedded-Derby-td15192640.html#><http://www.nabble.com/Question-about-Embedded-Derby-td15192640.html#><http://www.nabble.com/Question-about-Embedded-Derby-td15192640.html#><http://www.nabble.com/Question-about-Embedded-Derby-td15192640.html#><http://www.nabble.com/Question-about-Embedded-Derby-td15192640.html#><http://www.nabble.com/Question-about-Embedded-Derby-td15192640.html#>
> <http://www.nabble.com/Question-about-Embedded-Derby-td15192640.html#>-
> Use ratings to moderate (? <http://www.nabble.com/help/Answer.jtp?id=16>)
>
> I have successfully completed the "Building a *Java* Desktop Datbase
> Application" tutorial at:
> http://www.*netbeans*.org/kb/60/*java*/gui-*db*.html<http://www.netbeans.org/kb/60/java/gui-db.html>
>
> Very nice work!
>
>
> I am now trying to do the same thing only using an Embedded Derby
> database.
>
> I am able to create the database (using ij) and then connect to it.
> However, when I go to run the app, I get an error in my
> CarsAppView.*java* file.
>
> It is at this line (in grey):
>
> entityManager =
> *javax*.persistence.Persistence.createEntityManagerFactory("jdbc:derby:C:\projects\embeddedCar\CARSDBPU").createEntityManager();
>
>
>
> The error message states: "*illegal* *escape* *character*" at each of the
> three backslashes.
>
> Since this is non-editable, what can be done?
>
> --
> ========================================================
> Ricardo José da Silva Seromenho
> Aluno 23842  Universidade do Algarve, Campus de Gambelas
> e-mail: [EMAIL PROTECTED]
> web: http://www.deei.fct.ualg.pt/~a23842/ 
> <http://www.deei.fct.ualg.pt/%7Ea23842/>
>
>

<<icon_unflagged.png>>

<<icon_clear_rating.png>>

<<icon_star_blue.png>>

<<icon_star_grey.png>>

<<icon_blocked_gray.png>>

Reply via email to