Subject RE: [Firebird-Java] Re: Java and Embedded Firbird.
Author Ryan Baldwin
Hi

You will need to set the jdbc type that the FBManager will use - so with the
version I believe you have you would do(with the same spelling mistake -
sorry):

FBManager fbManager = new FBManager(FBManager.Type.TWO_EMBEDED);
fbManager.start();
fbManager.createDatabase("C:/fbdb/mydb.gdb", "admin", "passwd");

This should then work. The way the jfbc type to use is specified to
FBManager will be slightly different in the first actual release.

Hope this helps
Ryan

-----Original Message-----
From: Aden [mailto:saden1@...]
Sent: 02 October 2003 22:42
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Re: Java and Embedded Firbird.


Does anyone know if I can create a database with the embedded Firebird?

Currently I have to create a the database beforehand using the
firebird server running on localhost and port 3050 like this:

FBManager fbManager = new FBManager();
fbManager.setServer("localhost");
fbManager.setPort(3050);
fbManager.start();
fbManager.createDatabase("C:/fbdb/mydb.gdb", "admin", "passwd");


I'd like to simply create the database like this using embedded
Firebird (I have tried this and it doesn't work…maybe I'm missing
something?):

FBManager fbManager = new FBManager();
fbManager.start();
fbManager.createDatabase("C:/fbdb/mydb.gdb", "admin", "passwd");


Is this possible?


--- In Firebird-Java@yahoogroups.com, "Ryan Baldwin"
<ryan.baldwin@n...> wrote:
> Hello
>
> >I have never used firebird and it has been an absolute nightmare to
> >get going. The whole concept of getting a jdbc connection without
> >actually having a database to connect to is making me go insane. With
> >Hypersonic you at least know that if the database doesn't exist the
> >jdbc drivers will create it if it can't get a connection. This isn't
> >the case with firebird is it? If it is, how come it doesn't work?
>
> If your new too firebird you may be better off getting started with
the full
> firebird server and Jaybird 1.0.1. Once you are up and running with
these
> switching to the embedded database should be fairly easy - and a
straight
> forward procedure to explain.
>
> You can download an installer for firebird at
> http://sourceforge.net/project/showfiles.php?group_id=9028 - look
under the
> firebird-win32 heading near the bottom of the page. For 1.5 the latest
> installer seems to be Firebird-1.5.0.3744-RC4-Win32.exe.
>
> While their you can download FirebirdSQL-1.0.1.zip from under the
> firebird-jca-jdbc-driver heading. Inside this zip file is faq.html.
This is
> a good starting point for jaybird documentation. Under items 6 and
43 are
> some code examples. As far as im aware jaybird will not create a
database
> automaticly. Item 33 in the FAQ explains how to create a database via
> jaybird.
>
> Documentation for firebird is as far as im aware fairly
patchy/incomplete -
> http://firebird.sourceforge.net/ and http://www.ibphoenix.com/ may
be good
> places to start looking for whats available.
>
> Hope this helps.
>
> Ryan
>
>
>
> -----Original Message-----
> From: Aden [mailto:saden1@y...]
> Sent: 01 October 2003 00:38
> To: Firebird-Java@yahoogroups.com
> Subject: [Firebird-Java] Re: Java and Embedded Firbird.
>
>
> I have never used firebird and it has been an absolute nightmare to
> get going. The whole concept of getting a jdbc connection without
> actually having a database to connect to is making me go insane. With
> Hypersonic you at least know that if the database doesn't exist the
> jdbc drivers will create it if it can't get a connection. This isn't
> the case with firebird is it? If it is, how come it doesn't work?
>
> When it comes to firebird documentation is absolutely zero. This is
> something that has to change if it is to compete with other databases
> out there.
>
> Throw me a bone here guys and for the love of god post some code a
> sample project that uses embedded firebird and java.
>
>
>
>
>
> --- In Firebird-Java@yahoogroups.com, "Ryan Baldwin"
> <ryan.baldwin@n...> wrote:
> > Hello
> >
> > >how the heck do I use it?
> >
> > Usage is almost identical to jaybird in type4(normal) mode. The
database
> > file used is the same as the database file used by the standard
> server. The
> > most important difference is that a only one process can access a
> database
> > file at any time when using the embedded database to access that file.
> >
> > The differences between using jaybird in its 'normal' type 4 mode
> and using
> > jaybird with the embedded server are described in 'brief usage
> instructions'
> > which 'The archive contains'.
> >
> >
> > >Can you post a simple sample code?
> >
> > There is plenty of this around - even in recent posts in this forum.
> > Checkout the FAQ included in the standard jaybird driver
> distribution too.
> > Jaybird is a JDBC driver and so tutorial's like
> >
>
http://developer.java.sun.com/developer/onlineTraining/Database/JDBCShortCo=
u
> > rse/ are applicable to jaybird too.
> >
> >
> > >Also will this work with Hibernate?
> >
> > Im afraid I dont know Hibernate and so cannot answer this.
> >
> > Ryan
> >
> > -----Original Message-----
> > From: Aden [mailto:saden1@y...]
> > Sent: 30 September 2003 17:49
> > To: Firebird-Java@yahoogroups.com
> > Subject: [Firebird-Java] Re: Java and Embedded Firbird.
> >
> >
> > I also want to know what the database file for embedded firebird is
> > and how I can get a JDBC connection to it.
> >
> > Embedded firebird saves to disk right?
> >
> > --- In Firebird-Java@yahoogroups.com, "Aden" <saden1@y...> wrote:
> > > Thanks for the info but how the heck do I use it? Can you post a
> > > simple sample code? Also will this work with Hibernate?
> > >
> > > --- In Firebird-Java@yahoogroups.com, "Ryan Baldwin"
> > > <ryan.baldwin@n...> wrote:
> > > > Hi,
> > > >
> > > > I've uploaded an updated set of files for jaybird and FB1.5
> > embedded to
> > > > http://groups.yahoo.com/group/Firebird-Java/files/ in zip file
> > > > FBEmbeddedRC6ForJaybird.zip.
> > > >
> > > > This archive contains brief usage instructions. I have made these
> > files
> > > > available 'unofficialy' and they are not meant to be of or
packaged
> > > too the
> > > > same standard as the official release.
> > > >
> > > > People who have been using the files from the previous file I
> > > uploaded could
> > > > benefit from using these newer files. I seemed to find that RC4
> of the
> > > > embedded server(and maybe RC1 too) had a major performance problem
> > which
> > > > appears to be fixed in RC6. Minor bugfixes have also been made
> in the
> > > > jaybird native code.
> > > >
> > > > The firebirdsql-full.jar file included is built from CVS a little
> > > while ago.
> > > > I've been having some problems with the pool's in the current CVS
> > > version -
> > > > but it should be possible to check out the latest code from
cvs and
> > > replace
> > > > the firebirdsql-full.jar - the dll's should work OK.
> > > >
> > > > Thanks
> > > > Ryan
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > Firebird-Java-unsubscribe@yahoogroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/



To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/