UniTable / UniConnection best practice

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
testpresta
Posts: 32
Joined: Sat 07 Jun 2014 19:41

UniTable / UniConnection best practice

Post by testpresta » Sat 07 Jun 2014 19:57

Hello

I have a project with about 20 Delphi forms.
- 10 Forms that contains « lists »
Each form contains one TDBGrid and one or more TUniTable.
- 10 Forms that contains detailed view with fields.
Each form contains one or more TuniTable

I am wondering if i should put a TUniConnection on each form ?
Or should i put a global TUniConnection on the project ?
Or one TUniConnection on each list forms and share them for detailed forms ?

Thanks for your answer

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: UniTable / UniConnection best practice

Post by AlexP » Tue 10 Jun 2014 08:29

Hello,

If your forms are created and opened in the same thread as the main form, it's enough to use one TUniConnection for the whole application. If you work with threads, then some databases require one connection, and some require a connection for each thread.

Post Reply