Re: Weird error accessing to ADO components
- From: "Guillem" <guillemvicens-nospam@xxxxxxxxxxxxxxxxxx>
- Date: 7 Feb 2006 05:49:14 -0700
Arnau Font wrote:
Hi, I'm executing some TADOQueries in a multithread environment, and
I get the error:
'La operacisn no se puede realizar mientras se ejecuta
asincrsnicamente'
I'll try to translate it to English:
'The operation cannot be executed while it is running asychronously'
Why do I get this error? Should I lock the TAdoConnection with a
TCriticalSection?
Thanks!
Yes, you should make your ADO objects thread-safe
critical sections are not the best option since they are good for very
fast executing code, but not for database ops, which are relatively
slow.
I would suggest one of 3 approaches:
- use messages
- create a TThread descendant which has its own TADOConnection (or
whatever objects you need)
- data connection pooling (about this i do not know much)
Good luck
--
Best regards :)
Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam
.
- Follow-Ups:
- Re: Weird error accessing to ADO components
- From: Arnau Font
- Re: Weird error accessing to ADO components
- References:
- Weird error accessing to ADO components
- From: Arnau Font
- Weird error accessing to ADO components
- Prev by Date: Re: Unsufficient key column info - on view
- Next by Date: Re: ADO & Firebird
- Previous by thread: Weird error accessing to ADO components
- Next by thread: Re: Weird error accessing to ADO components
- Index(es):