db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean T. Anderson" <...@bristowhill.com>
Subject Re: Derby Protocols
Date Sat, 20 May 2006 21:00:57 GMT
Maryam Moazeni wrote:
> Hi,
> 
> What is the difference between this
> 
> "jdbc:derby://localhost:1527/"
> 
> AND
> 
> "jdbc:derby:net://localhost:1527/" ??


"jdbc:derby://localhost:1527/" is the connection URL syntax used by the
derby network client driver (derbyclient.jar). Summary info is at:

   http://db.apache.org/derby/docs/10.1/adminguide/cadminappsclient.html

"jdbc:derby:net://localhost:1527/" is the connection URL for the IBM DB2
Universal driver (db2jcc.jar). Summary info is at:

   http://db.apache.org/derby/docs/10.1/adminguide/cadminapps810777.html

There are a couple other syntax differences between the two that I have
gotten tripped up on before. For example, with the db2jcc.jar driver,
there's a colon after the dbname and a semicolon at the end:

   'jdbc:derby:net://localhost:1527/bookstore:user=app;password=app;'

The embedded and the derby network client drivers both have a semicolon
after the db name and nothing at the end:

Derby network client driver:
   'jdbc:derby://localhost:1527/bookstore;user=app;password=app'

Embedded driver:
   'jdbc:derby:bookstore;user=app;password=app'

I hope this helps.

regards,

 -jean


Mime
View raw message