Subject Re: [Firebird-Java] jdbc
Author Mark Rotteveel
On 9-11-2010 16:16, Pruteanu Dragos wrote:
> Hello Firebird,
> My question:
> When I connect to Firebird I have to specify
> jdbc:firebirdsql:localhost/3050:/firebird/test.gdb
> with the path to my database file on the server.
> In my case I want to download Firebird, install it, and do no other actions than
> connect with JDBC, eventually specify in the jdbc link that I want to create a
> new database;
> My sample:
> jdbc:firebirdsql:localhost/3050:/firebird/test.gdb;create=true;
> This is the case for DbSchema tool, where simple users, with less SQL knowledges
> wants to install Firebird and create the database using visual tools.

You will need to use the ServiceManager to programmatically create a
database. This is listed in the docs/faq.html (item 33). You can find
this file in the Jaybird archive that includes the driver.

> Also, is it possible to connect and send a command 'list databases'?
> I mean connect using
> jdbc:firebirdsql:localhost/3050
> and send command
> list databases ?
> This may help to find installed databases ( known to Firebird ). Many times we
> create a database and forget where we put it.

No, this is not possible. Firebird does not have a catalog that keeps
track of the database files. Every database is either accessed through
its file path or through an alias configured in the Firebird configuration.

Mark Rotteveel