db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geetha Attili <geetha.bharathi.att...@oracle.com>
Subject Cannot access DB on Classpath
Date Thu, 20 Jun 2013 23:08:17 GMT
Hi ,
I am trying to connect to a JavaDB Database  on Classpath , I tried 
various things as given in the doc, but I feel the behaviour is very 
inconsistent or may be I am doing some silly mistake.

In a Command prompt
 > cd D:\DerbyDemo
ij version 10.8
//created a sample database jdb_classpath
ij>connect 'jdbc:derby:jdb_classpath;create=true;';
//created a sample Table
ij>create table mytable(id numeric);
//Disconnected from the jdb_classpath database

I have then Set the Classpath to include D:\DerbyDemo ;
Opened a new command prompt
  tried connecting to the jdb_classpath using the following syntax
ij>connect 'jdbc:derby:/jdb_classpath';

ERROR XJ004: Database '/jdb_classpath' not found.

As per the Doc 
<http://docs.oracle.com/javadb/>  as 
in example, this should have worked

  * /jdbc:derby:/myDB/

    Access /myDB/ (which is directly in a directory in the classpath) as
    a read-only database.


ij>connect 'jdbc:derby:classpath:jdb_classpath';
Connection successful. there is no other database with the same name in 
the classpath .
Do I have to use the classpath  subprotocol always?

Many Thanks in Advance,

View raw message