db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com.au>
Subject Re: Opening a database with spaces in a filename
Date Mon, 29 Aug 2005 00:40:42 GMT
Rajesh Kartha wrote:

> Daniel Noll wrote:
>
>>
>> I've just discovered that when opening a URL with spaces in it, I get 
>> an error like this:
>> "Database 'directory:C:\Test\My Databases\Database' not found."
>>
>> This is on Windows, and trying the same path with short filenames 
>> instead, worked.
>>
>> I've tried:
>>    - Using / instead of \
>>    - Using %20 to replace the spaces (like normal URL encoding... 
>> which would seem reasonable for a URL.)
>>    - Both of the above at the same time...
>>
>> Neither worked.
>>
>> Directories with spaces in them aren't exactly rare, so my question 
>> is, how do I encode a URL for a Derby database?  The developer guide 
>> doesn't describe how Derby's URLs are supposed to be encoded.
>>
>> Daniel
>>
> Hi Daniel,
>
> The error  above shows 'directory', was that in the url that was used. 
> You need to just give the path to the database.
> I just tried the following: successfully:

I think I'm probably experiencing some other problem.

Whether I put "directory:" in or not (the docs say it's optional, I 
always put it in for clarity, in case it ever has the same path as 
something on the classpath) the version with the short filename works, 
where the version with the long filename doesn't.  It's funny, though.  
I hadn't created a database on a directory with spaces in it for months, 
so I never even noticed this happening.

Daniel

-- 
Daniel Noll

NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax:   (02) 9283 9020

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.


Mime
View raw message