Subject RE: [IBO] FB embedded or not
Author Helen Borrie
At 12:16 PM 7/01/2005 -0700, you wrote:

> > This same question got asked back on June 2nd by someone else but
> > there wasn't an answer:
> >
> > How can I know if IBO is connected via FB embedded or FB Server?
> > (IB_Connection1.Characteristics.dbVersion doesn't say).

Jason wrote:


>That's the only way I can think of to find out is through some sort of API
>call or you might be able to get information out of the version number
>passed back. This probably would be better asked in a Firebird support
>forum.

It would only get bounced back here, since this is ENTIRELY an application
issue.

There is (by design) no distinction made at the API level. It's the client
that decides which server engine it's going to connect to. The embedded
library can be a client to *any* running server except a fully installed
server that is running on the same machine. The client requests a
connection to a server engine and, if a connection is allowed, it is
made. End of story.

The version number won't help you. The embedded server is - well - just
the Firebird engine, regardless of its delivery model or platform. Its
version response is the same across all builds of the same engine.

The one thing you can do (currently) with embedded that you can't do with a
full server is log on with an invalid user name and password. So, if you
can connect under these conditions, you know you're connected to the
embedded engine. (This applies ONLY to embedded on Windows).

While this test is good enough for now, future versions of Firebird may
provide an authentication layer for embedded which will break your application.

It gets down to you, to deploy some kind of configuration file or Registry
setting that your application must set before connecting; or perhaps to
take the extra step of adjusting your IBO code so that it loads a client
library with some special name, e.g. fbembed.dll.

Helen