Page 1 of 1

Using Zeos in Multi-threaded app

Posted: 28.07.2006, 10:05
by sandeep_c24
What is the best way to use Zeos controls in a multi-threaded app?

I would also like to know if I should create a new connection for each thread or can I use one connection for multiple threads? If it is possible to use one connection for mutiple threads then how do I use it? An example would be great.

Regards

Sandeep

Posted: 30.07.2006, 12:27
by btrewern
I've used zeos in an intraweb application using multiple threads. Currently I create one connection per thread and everything works ok. I don't think you can use one connection for multiple threads without using critical sections.

BTW Previously I've had problems using the TSQLMonitor. Have given up using them so can't help you any more than this.

Regards,

Ben

Posted: 30.07.2006, 12:56
by sandeep_c24
Thanks Ben.

What database did you use and did you use some sort of Connection pooling?

Regards

Sandeep

Posted: 31.07.2006, 13:35
by btrewern
I use PostgreSQL and haven't looked at connection pooling yet. The server seems to be coping quite well. If you need to look at pooling then there are some delphi components at http://www.arcanatech.com which I'm going to look at in the near future.

Regards,

Ben