Subject | IBO components in a thread |
---|---|
Author | Don Schoeman |
Post date | 2006-07-04T09:19:17Z |
Hi everyone,
I have developed a multithreaded server app. One of the threads is
exclusively used to access the FB database via IBO components which is
located on a DataModule. The thread also creates the instance of the
DataModule on which the IBO components are located. I only use
TIB_Connection, TIB_Transaction and one or two TIBO_Query components on the
DataModule.
As I have mentioned, only this one "database" thread have access to these
components so that there can't be any conflicts between different threads
trying to access the components. After the database thread starts it
attempts to load some data from the database. However, I often get these
weird "error reading connection" and "invalid BLOB handle" error messages.
The database is fine as I can create a new one from scratch and it still
happens. I also tried restarting. This does seem to be a thread related
problem as I've never had this problem with standard Delphi apps. It's also
quite intermittent and happens perhaps once in every 10 startups. When it
started successfully though it it never gets any problems.
I'm kind of out of clues and I'm hoping someone might have a vague idea of
what might be happening. I don't know the internals of IBO so I'm not sure
if there are any stuff in there which might not be thread happy. However, I
doubt that is the case since in my view if only one thread access the
components then one shouldn't have a problem.
Any ideas from the clever people hanging around here will be greatly
appreciated!
Regards,
Don Schoeman
PS:
- Delphi 7 Professional
- IBO 4.3.Aa
- Firebird 1.5.1.4481
I have developed a multithreaded server app. One of the threads is
exclusively used to access the FB database via IBO components which is
located on a DataModule. The thread also creates the instance of the
DataModule on which the IBO components are located. I only use
TIB_Connection, TIB_Transaction and one or two TIBO_Query components on the
DataModule.
As I have mentioned, only this one "database" thread have access to these
components so that there can't be any conflicts between different threads
trying to access the components. After the database thread starts it
attempts to load some data from the database. However, I often get these
weird "error reading connection" and "invalid BLOB handle" error messages.
The database is fine as I can create a new one from scratch and it still
happens. I also tried restarting. This does seem to be a thread related
problem as I've never had this problem with standard Delphi apps. It's also
quite intermittent and happens perhaps once in every 10 startups. When it
started successfully though it it never gets any problems.
I'm kind of out of clues and I'm hoping someone might have a vague idea of
what might be happening. I don't know the internals of IBO so I'm not sure
if there are any stuff in there which might not be thread happy. However, I
doubt that is the case since in my view if only one thread access the
components then one shouldn't have a problem.
Any ideas from the clever people hanging around here will be greatly
appreciated!
Regards,
Don Schoeman
PS:
- Delphi 7 Professional
- IBO 4.3.Aa
- Firebird 1.5.1.4481