Connection for each class instance or application?

Connection for each class instance or application?

Postby yellowfever13 » Fri 02 Aug 2013 18:15

I appreciate this forum as it's been helpful so far, thanks in advance.

This may be a dumb question, but do I need a separate connection for each instance of a class doing queries? or a global connection for the application that they can all use?

Thanks!
yellowfever13
 
Posts: 4
Joined: Wed 24 Jul 2013 16:17

Re: Connection for each class instance or application?

Postby DemetrionQ » Mon 05 Aug 2013 12:49

Hello.

If you have a single-thread application, you can use one connection. If you have a multi-thread, you should create a separate connection for each thread. It is enough to use one connection within a thread.
DemetrionQ
Devart Team
 
Posts: 271
Joined: Wed 23 Jan 2013 11:21


Return to dbExpress driver for PostgreSQL