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!
Connection for each class instance or application?
-
- Posts: 4
- Joined: Wed 24 Jul 2013 16:17
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Connection for each class instance or application?
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.
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.