Subject | Delphi dbExpress and Threads |
---|---|
Author | Christian Kaufmann |
Post date | 2005-05-09T09:29:58Z |
Hi,
I tried in the Borland news groups and go no answer, maybe mentioning
Firebird there is not really welcome. So I try here:
I have an application, that uses dbExpress to connect to a Firebird
database (with Upscene driver). The system is built to run with
different threads. It works fine on the local, single processor
machine, but there are problems on a multi processor machine.
Finding what I did wrong is not easy, so I have some questions to
start:
I created a pool of DB objects (a connection and some queries), where
a thread can aquire an object to get/manipulate data in the database.
Should these objects (with the TSqlConnection's) always be created in
the main thread?
I think, a connection can be "Active", when left in the pool and later
used by another thread. What about queries? Should queries always be
recreated by a thread?
Thank's for any help.
cu Christian
I tried in the Borland news groups and go no answer, maybe mentioning
Firebird there is not really welcome. So I try here:
I have an application, that uses dbExpress to connect to a Firebird
database (with Upscene driver). The system is built to run with
different threads. It works fine on the local, single processor
machine, but there are problems on a multi processor machine.
Finding what I did wrong is not easy, so I have some questions to
start:
I created a pool of DB objects (a connection and some queries), where
a thread can aquire an object to get/manipulate data in the database.
Should these objects (with the TSqlConnection's) always be created in
the main thread?
I think, a connection can be "Active", when left in the pool and later
used by another thread. What about queries? Should queries always be
recreated by a thread?
Thank's for any help.
cu Christian