I have a Delphi XE2 DataSnap server (Windows service) connected to MS SQL Server 2008 (the same server box), serving REST client requests.
Recently, everything has been working fine, I have a problem, for some reason the DataSnap service has lost connection with SQL Server.
The service was unable to reconnect, and I had to restart the DataSnap service to continue.
This made me think, because currently the service uses only one SQL connection (TADOConnection), which is used for all client requests. I did this because I do not need the overhead of creating a new SQL connection for each client request.
I am considering whether it would really be better to have a separate SQL connection for each query, and if the overhead were noticeable - could anyone comment / advise on this?
source
share