Subject Re: [firebird-support] My Firebird experience (was Re: ODBC queries with parameters failing)
Author Mark Rotteveel
On 28-2-2013 20:02, Kurt Fitzner wrote:
> I really didn't want to have to learn how to use a full client/server
> RDBMS just to create a file. Maybe Firebird isn't the right solution
> for me. All I know is what my experience with Firebird has been so far,
> which is my first experience with it in about five years. For right
> now, I know I don't want client/server. I just want embedded (via
> ODBC). The ODBC driver doesn't support embedded out of the box (it has
> literally everything else, though... it's almost a management tool in
> and of itself).

I don't know the ODBC driver, but it might just have all it needs to
create a database (eg Jaybird has a separate manager class to create a
new database). The firebird-odbc-devel mailinglist might be a better
place for that question though.

> And if that was painful, don't ask me how painful it was to get Jaybird
> to work. Other products put the necessary DLLs inside the .jar. 'Nuff
> said.

Could you describe the problem you had with Jaybird? I might need to
create some additional documentation. Using the native protocols like
embedded is a bit more work than using the Java wire protocol, but it is
usually nothing more than putting the jaybirdxx.dll and the embedded
binaries in the root of your application (or on the PATH).

I guess your problem was specifically with using it in Base as native
library loading, correct locations for binary dependencies etc gets
complicated, and the native driver doesn't actually work correctly with
Base (the workaround in the jdbc:firebirdsql:oo protocol is only for the
Java wire protocol).

As far as I know most JDBC drivers don't include DLLs in the jar. Doing
that also seems to require a 'dirty' trick (extracting the DLL to a
temporary location and then loading it) which I didn't even know before
I googled it now. This trick probably won't work if you have security
manager with a restricted policy in place.

It also makes things a lot more complicated. For Windows it might be
just fine to include a 32 bit and 64 bit dll, but on other platforms it
will get ugly because sometimes you need to compile your own native
library (eg if you don't use linux on x86/x64, or your linux doesn't
have an ABI-compatible version of the system library that it was
compiled against).

For embedded doing this wouldn't be enough, because you would still need
the embedded server which isn't part of Jaybird.

Mark
--
Mark Rotteveel