Subject Re: [firebird-support] Unsuccessful execution error
Author Dave Hughes
On Thu, May 18, 2006 18:51, Woody wrote:
> From: "Rik Barker" <rik.barker@...>
>> I'm a bit confused. Should I be creating a new connection for each
>> query? Won't that stop me using the embedded server? Apologies if this
> is
>> documented somewhere, I've read somewhere in the region of 800 pages of
>> Firebird and Interbase documentation today and I've mildly fried my
>> brain.
> Yes, threads should have their own database connection. With embedded,
> one application can connect as many times as it needs to. Embedded limits
> the connection to specifically one application at a time but not
> necessarily
> one connection from that application.

Yes. I'm not sure if anyone's actually documented this behaviour (i.e.
embedded permitting multiple connections from separate threads of a single
application) but it's certainly the way it works in practice, as I've been
finding out recently. Although one has to be slightly careful about using
COMMIT to "synchronize" the view of the database between the threads, it
can be seriously useful for each thread to have a distinct "isolated" view
of the database.



Dave Hughes