Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: sharing a TADConnection?
sharing a TADConnection?
Posted: 2007/10/03 07:53
 
Yes I have been running some test with multiple threads sharing a dropped TADConnection on my form and, as far as I can tell, there seem to no problems using this method (using 2.x)

Perhaps I am just getting lucky? Can you explain why my this would be working, and why it should *not* be working?

Thanks.
- mark
Re:sharing a TADConnection?
Posted: 2007/10/03 08:18
 
VCL - one theard system

So... maby you describe problem, how work, how not work, atach you source
Re:sharing a TADConnection?
Posted: 2007/10/03 09:53
 
Hello

1) Yes, you are lucky. Although AnyDAC code has the code protecting ADConnection against it usage from multiple threads. This code is not finished, and cannot be finished, due to VCL nature (as MMM_Copr sayd).
2) Most (all ?) DBMS's cannot handle mutiple requests in one connection in parallel. At first, because each user session is using on thread. One thread cannot do many things in parallel.

So, use one ADConnection per one thread. That will be always safe and not blocking other threads.

Regards,
Dmitry
Re:sharing a TADConnection?
Posted: 2007/10/03 13:38
 
Yes thxs for the explaination.

- mark