Subject | Re: [ib-support] Re: Can anyone help: Error reading data from the connection |
---|---|
Author | Paul Reeves |
Post date | 2002-09-23T13:07:31Z |
Wilson, Fred wrote:
can't confirm or deny this. That said, I have been paying attention over
the last five or six years and yours is the first testimony I have heard
that has had success with re-use of database handles across threads.
In general the story goes like this
- Developer tries to re-use database handles.
- Developer comes to grief
- Developer posts problem to interbase list
(as was) or ib-support (as is).
- Those who have gone before pass on the wise advice that db handles
are not re-entrant (ie, not thread safe.)
So, as the messenger in all this, it seems to me that the only way to
work this is to create the thread and then create the database handle in
the thread.
One day, when I have time, I want to take a look at this issue in more
detail, but for now it remains on my growing list of things I would like
to do, if I had the time.
One question - are you connecting locally or via tcp? (or named pipes?).
Paul
--
Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird and InterBase
> Can anyone else confirm this, absolutely. This sounds a little suspiciousWell, I should come clean and say that based on personal experience, I
> the TSL and all.
can't confirm or deny this. That said, I have been paying attention over
the last five or six years and yours is the first testimony I have heard
that has had success with re-use of database handles across threads.
In general the story goes like this
- Developer tries to re-use database handles.
- Developer comes to grief
- Developer posts problem to interbase list
(as was) or ib-support (as is).
- Those who have gone before pass on the wise advice that db handles
are not re-entrant (ie, not thread safe.)
So, as the messenger in all this, it seems to me that the only way to
work this is to create the thread and then create the database handle in
the thread.
One day, when I have time, I want to take a look at this issue in more
detail, but for now it remains on my growing list of things I would like
to do, if I had the time.
One question - are you connecting locally or via tcp? (or named pipes?).
Paul
--
Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird and InterBase