Using Zeos in Multi-threaded app

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Using Zeos in Multi-threaded app

Post 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
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post 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
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Post by sandeep_c24 »

Thanks Ben.

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

Regards

Sandeep
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post 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
Post Reply