I'm
sure Stacey will confirm this tomorrow but I believe he is already using another
mechanism to ensure only one thread will be accessing each session at a time (as
his example shows, each thread dies before the next one is created and tries to
use the session).
So the
problem isn't one of getting multiple threads to use the same session at the
same time (they know that doesn't work).
The
problem is one of getting multiple threads to use the same session one after
another. Is this possible or is there some fundamental issue with the way the
BDE is coded which prevents this?
(Correct me if I am wrong Stacey ;-)
David.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Kyley Harris
Sent: Monday, 8 December 2003 5:12 PM
To: 'NZ Borland Developers Group - Delphi List'
Subject: RE: [DUG] BDE and threadseach thread should have its own session object, otherwise if 2 threads use a dataset at the same time off one session you'll get corruption-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stacey Verner
Sent: Monday, 8 December 2003 4:58 p.m.
To: [EMAIL PROTECTED]
Subject: [DUG] BDE and threadsIs it possible to have a bde database connection that can be accessed by multiple threads?e.g.Thread 1:- Create Object X- Connect to database.Thread 1 diesThread 2- Find Object X- Run SQL on databaseThread 2 diesThread 3- Find Object X- Run SQL on databaseThread 4 diesThread 4- Find Object X- Disconnect from database- Destroy XThread 4 diesThis is a service application which is listening for connections, and performing tasks on databases.I want to keep the database connection between requests because the actions performed by the 2nd and 3rd requests can be within a transaction.ThanksStaceyStacey Verner Ph: +64-9-4154790
Software Developer Fax: +64-9-4154791
DDI: +64-9-4154797
CJN Technologies Ltd. Email: [EMAIL PROTECTED]
PO Box 302-278, North Harbour, Auckland 1330, New Zealand
12 Piermark Drive, North Harbour, Auckland, New Zealand
Visit our website at http://www.cjntech.co.nz/
_______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
