Subject Creating DB on Embedded Firebird via Jaybird
Author Rafael Castaneda Ribeiro
Hey All,

First of all, let me introduce mysefl, my name is Rafael and I´m a
Computational Science student.

I´ve been using Jaybird and Embedded Firebird on the construction of a
DataMining tool. So far I was able to embed the firebird and create a
class that can sucessfully connect to an existing firebird database.

Im having some problems on the creation of a new DataBase, and I would
like to know if any could help.

The code is:

import org.firebirdsql.management.FBManager;
import org.firebirdsql.GDS.GDSType;

public class FireBirdCreator
{
public FireBirdCreator()
{
FBManager manager = new FBManager(GDSType.getType("EMBEDDED"));

try
{
manager.start();
manager.createDatabase("e:/test.fdb","sysdba","masterkey");
}
catch(Exception e)
{
System.out.println(e);
}
}

public static void main (String args[])
{
FireBirdCreator fbc = new FireBirdCreator();
}
}

It compiles normally, but when I try to run I get the following error
message:

"org.firebirdsql.gds.GDSException: Unable to complete network request to
host "localhost". Failed to estabilish a connection.
null "

I have check the archives of the group, but there is no solution
regarding this problem. It seems to me that the FBManager is failing to
understand the Embedded nature of the database to be created. It should
not make network requests.

Also I´ve been investigating the API to learn how to manually create a
new database, and there is a method called "isc_create_database" on
org.firebirdsql.gds.GDS which is an Interface implemented by
AbstractGDS, which is an Abstract Class that I, of course, cannot extend
since I have no idea of the implementation of some methods.

Has anyone ever created a new database on embedded firebird using jaybird??

thanks all,

Rafael.