Which one is better?(DB Connection)

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pashaa
Posts: 4
Joined: Sun 30 Jul 2017 14:00

Which one is better?(DB Connection)

Post by pashaa » Sun 27 Aug 2017 05:40

my program is client server application,before i use ADO and mssql,and create one connection in global variable.in this case i dont have problem.

now used Tmyquery and Tmyconnection component and mysql and like before one connection in global variable.but now after many request from users program will hang and answer to request slowly.

is this better(one connection for all procedures in program startup)?
or create connection in every procedure?


Thanks.

pashaa
Posts: 4
Joined: Sun 30 Jul 2017 14:00

Re: Which one is better?(DB Connection)

Post by pashaa » Mon 28 Aug 2017 14:15

can any one help me???

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Which one is better?(DB Connection)

Post by ViktorV » Mon 28 Aug 2017 16:21

If you are using a multi-threaded application, then a separate connection (the TMyConnection component) per thread must be used.
You can get more information about performance improving when using our components at our website: https://www.devart.com/mydac/docs/index ... rmance.htm
In a single-threaded application, there should not be a problem when using one global connection.

Post Reply