db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dyre.Tjeldv...@Sun.COM
Subject Re: embedded apache derby on Windows connection URL
Date Fri, 16 Sep 2005 14:29:28 GMT
The following message is a courtesy copy of an article
that has been posted to comp.lang.java.databases as well.

supermail99@fastmail.fm writes:

> I'm having trouble creating a proper Java connection URL for an
> embedded apache derby database on Windows. My database folder was
> created with ij and is located at
>
> C:\mytestdb
>
> In my program the following line yeilds the error
>
> SQL Exception: Database 'mytestdb' not found.
>
> Connection
> conn=DriverManager.getConnection("jdbc:derby:C:///mytestdb");
>
> What is wrong with this URL?

I don't use Windows, but on Linux I can say
getConnection("jdbc:derby:/tmp/foo")

and I think that jdbc:derby:c:/mytestdb will work on windows

See 
http://db.apache.org/derby/docs/10.1/devguide/
(section Database Connection Examples)

> or, if I use the connection string "jdbc:derby:mytestdb", what is the
> search path?

It's relative to the property derby.system.home
see 
http://db.apache.org/derby/docs/10.1/tuning/
(see the section about properties)

-- 
dt



Mime
View raw message