Subject Re: [firebird-support] FB embedded thread-safe
Author Helen Borrie
At 05:55 PM 3/01/2005 -0600, you wrote:

> >
> > Please advise: is it safe to use the firebird embedded edition from a
> > multi-threaded app simultaneously from a few threads if each thread
> > has a separate database handle? Say a separate instance of
> > TIBDataBase (Delphi) is created within each thread.
> >
> > The manual doesn't explain this question :(
>
>It's not possible. The whole concept behind the embedded version is to only
>allow one connection to the database. You could not use multiple threads
>with multiple connections.

Actually, you can make multiple connections to the same database as long as
all the connections are coming from the same client (the one that is
embedded with *that* server instance). You just can't make multiple
connections from divers clients, e.g. an app connecting via fbclient.dll on
the same machine, an app connected to an embedded database in a different
application directory, or any remote clients.

So (provided TIBDatabase is session-safe, i.e. can be isolated from every
last artifact of all other connections) you can create as many instances of
it as you need, subject of course to machine resource limits.

./hb