db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepa Remesh <drem...@gmail.com>
Subject Re: JDBC URL for NetworkServer
Date Tue, 18 Oct 2005 14:56:28 GMT
On 10/18/05, Chong Yu Meng <chongym@cymulacrum.net> wrote:
> Hi all,
>
> I'm experimenting with Derby's NetworkServer deployment option and I
> came upon something that I'm not sure is unusual or not. I am using the
> ij tool to interface with Derby and I found that if I use the following
> syntax to conect to Derby and create a database:
> ij> connect 'jdbc:derby:someDB;create=true';
>
> I get a "no suitable driver" error message.

This URL will not work with Network server but it will work with Derby
embedded driver.

The syntax of the URL that is required to access the Network Server
with network client driver is:
jdbc:derby://<server>[:<port>]/<databaseName>[;<URL attribute>=<value>
[;...]]

>
> However, if I use this syntax:
> ij> connect 'jdbc:derby://localhost:1527/someDB;create=true';
>
> I get a successful connection and the database gets created. Is this how
> Derby works?

This URL has the right syntax to connect to Network Server using
network client driver.

> There's probably something huge that I have missed
> somewhere. Can anyone give me a link to information either in the
> documentation or website that explains which URLs are to be used when?
>

For embedded driver URLs, you may refer to Section 'Database
connection examples' in Derby Developer's Guide at
http://db.apache.org/derby/docs/10.1/devguide/derbydev.pdf. For
Network Server URLs, you may refer to Section 'Accessing the Network
Server by using the network client driver' in Derby Server and
Administration Guide at
http://db.apache.org/derby/docs/10.1/adminguide/derbyadmin.pdf.

I hope this helps.

Deepa

Mime
View raw message