db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: problem with embedded driver
Date Tue, 26 Apr 2011 08:13:47 GMT
steve lescure <stevelescure@yahoo.com> writes:

> thanks for the suggestion. probably a stupid question, but i'll ask anyway.
>
> would the full path be something like 
>
> C:\my_data\NetBeansProjects\On Demand  ?
>
> i see several directories in this location, like
>
> log
> seq0
> tmp 
>
> would i actually put that in the code c:\my_data etc?

The database directory (the one you put in the connection URL) is the
parent directory of log, seg0, tmp. So the "On Demand" directory sounds
like the correct one. When connecting via JDBC in a Java application,
you need to escape the backslashes or replace them by forward slashes.

Something like

    Connection c = DriverManager.getConnection(
            "jdbc:derby:C:\\my_data\\NetBeansProjects\\On Demand");

or

    Connection c = DriverManager.getConnection(
            "jdbc:derby:C:/my_data/NetBeansProjects/On Demand");

should do the trick.

-- 
Knut Anders

Mime
View raw message