Subject Re: [IBO] NEW: IB/FB Client DLL Selector example
Author Frank Ingermann
Hi Nando,

Nando Dessena wrote:
> Frank,
>
> F> the final release of Firebird 1.5 is approaching, and i am fascinated
> F> esp. by the Embedded version. Playing around with this, it's nice to
> F> be able to choose between GDS32.dll, fbclient.dll and fbembed.dll
> F> without altering code in an application, e.g. to test the
behaviour of
> F> an app against different Release Candidates or FB/IB server versions.
>
> I agree; I was hoping to have fbembed take care of all this, instead
> of IBO itself (which is just one of the many middleware solutions
> Delphi people use, not to mention other development environments).
> Actually, fbembed is already able to act as a client as well as an
> embedded server, the only thing it lacks is the ability to forward a
> local connection string to a local server (without involving TCP/IP,
> that is).
>
> If this last capability isn't added to fbembed before the official
> release, I would have to try to teach IBO how to use two clients, but
> *at the same time* (that's why I wouldn't be able to use your
> solution).

yes, that's something i'd also like to be able to do. my
selector form wasn't intended as a "solution" to this, i
just find it handy as a "service stub" so you can try things
with different versions easily.

> This would involve moving all the function
> pointers IBO uses into something that is instantiated once per
> session (or pooled). A quick glance at the sources shows it should be
feasible;
> then a simple property in IB_Session (which would have to be set
> before the session is opened) would be used to select the client
> library. Two sessions, two client libraries.

i've been thinking about this, too. I'd like to have an app with
a local (embedded) gdb for configuration stuff and "offline" usage
e.g. on a notebook, but at the same time be able to connect to
a "big" gdb on a remote server to move data between the two.

or think about an app that runs from a cdrom with a readonly
database and an embedded server, but can connect to other gdbs
through the normal fbclient, without the need for any setup or
installation.

the fact that ibo would need two different dlls loaded in parallel
makes that impossible atm, but your suggestion would be a way around
this.

( Jason ?? ;-) )

> Another thing that would be needed is convince Jason that it makes
> sense, which it does only if the Firebird folks don't do the right
> thing (bury all this complexity right where it belongs: into
> fbembed).
>
> That's why unfortunately I couldn't take advantage of your work - but
> I think it can be useful to many that don't want to use fbembed as a
> client for whatever reason.

as said, it's made primarily for testing, and it shows the
full paths and version infos of the dlls, so i think it may
be helpful to some people.

> Ciao

Cheers,
Frank