Thanks but it's still not working. Every time I either try to do the :classpath or :jar options to connect to my db within a jar file it says 'jar:db_name' or 'classpath:db_name' not found.
Is this a bug? Do I need to specify this part as a parameter to databaseName instead of this subprotocol? Kristian Waagan-4 wrote: > > On 19.05.10 16:49, nm56 wrote: >> Hi, a little background: >> >> I'm zipping up a Java App along with a derby db that I created using the >> network server. >> >> Is it possible to read a locally or transplanted derby db that was >> created >> and saved using the network driver by using the embedded driver to read >> it >> or are they just incompatible as I suspect? >> > > Hi, > > You can read a database created by the network server with the embedded > driver. > As a matter of fact, the Derby network server is using the embedded > driver internally to access the database. > >> If they are incompatible, how can I tell the server the location of the >> database I want to access if it is outside of DERBY_HOME? >> > > I suppose you meant compatible here? > You have a few options, but assuming you want read/write access, you can > specify the absolute or relative path to the database in the connection > URL. > For instance: > 'jdbc:derby:/my/db/dir/db' > 'jdbc:derby:../dbs/mydb' > > If you only need read access, you can access the database from a JAR/zip > or from the classpath. See the manual(s) for details. > If you need throw-away databases, you can either create/copy a new > database from a backup/master, or you can boot a backup/master into > memory (non-persisted db) using the in-memory protocol. You can do these > things either by copying the database directory using you OS tools (cp > or copy), or you can use the createFrom/restoreFrom connection attributes. > > > Hope this helps, > -- > Kristian > >> Thanks for any help... >> > > > -- View this message in context: http://old.nabble.com/Read-Server-Created-DB-with-Embedded-Driver-tp28609335p28611444.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
