Subject | RE: [IBO] IBO components in a thread |
---|---|
Author | Helen Borrie |
Post date | 2006-07-04T14:59:17Z |
At 09:55 PM 4/07/2006, you wrote:
Originally you wrote:
first data access object in the creation order of the module), along
with its own TIB_Connection, its own transactions, datasets etc.
As for events - OK - but again, your IB_Events has to be specific to
the session in the thread. It's fine for one thread to listen for
events that another thread might have posted (the world turns upon
such things!) but the callbacks must return to the
session-connection-ibevents that *registers* them.
"Error reading data from the connection" means you've crashed it the
connection, by the way - entirely expected behaviour with your setup. :-)
Helen
>Just another note, I've created the same routine which loads the data in aIt certainly does.
>standard Delphi app and it works flawlessly, so it must have something to do
>with the threads.
Originally you wrote:
>What you need for *each thread* is its own TIB_Session object (as the
> > I actually do have other IBO components on the DataModule: They are: 1)
> > TB_SessionProps and 2) TIB_Events. I don't know if any of these two
> could
> > perhaps cause a problem?
first data access object in the creation order of the module), along
with its own TIB_Connection, its own transactions, datasets etc.
As for events - OK - but again, your IB_Events has to be specific to
the session in the thread. It's fine for one thread to listen for
events that another thread might have posted (the world turns upon
such things!) but the callbacks must return to the
session-connection-ibevents that *registers* them.
"Error reading data from the connection" means you've crashed it the
connection, by the way - entirely expected behaviour with your setup. :-)
Helen