Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread EDB and MultiThreading
Fri, Dec 14 2007 5:00 PMPermanent Link

Gordon Turner
I'm a newbie to threading.  I'm having a performance problem on one form
in my app that populates several grids with data from various tables and
thought that a way to improve performance would be to load each grid in
a separate thread.  (EDB 1.06v1 Unicode/Delphi 2005)

Part of the problem I'm having is database access failures when I try to
execute multiple query threads.  Each thread works fine on it's own, but
I seem to have problems when I perform another query before the first
has completed, whether that query is in a different thread, or in the
main application thread.

Conceptually, do I need a separate Session component for each thread, or
can the various threads share a common session?  Any resources someone
can point me to that would help with my learning curve?
--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Sat, Dec 15 2007 4:16 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Gordon


You HAVE to fully isolate table access in each thread. That, in DBISAM and ElevateDB, means a separate session, database and table/query component(s).

Check out section 4.3 in the pdf manual

Roy Lambert
Sat, Dec 15 2007 9:54 AMPermanent Link

Gordon Turner
Roy Lambert wrote:
>
> You HAVE to fully isolate table access in each thread. That, in DBISAM and ElevateDB, means a separate session, database and table/query component(s).
>
> Check out section 4.3 in the pdf manual

Thanks Roy, that's what I needed to know.  I'd been trying to use an COM
module for actual database access, so that I could just replace the
module when I needed the application to target a different database.  I
may need to re-think how I do this to support multi-threading.

--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Mon, Dec 17 2007 3:30 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gordon,

<< Conceptually, do I need a separate Session component for each thread, or
can the various threads share a common session?  Any resources someone can
point me to that would help with my learning curve? >>

See here:

http://www.elevatesoft.com/edb1d7_multi_threaded_applications.htm

--
Tim Young
Elevate Software
www.elevatesoft.com

Image