Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I have a REST web service where clients are asking for resources every time. For each resource , I have several connections to an azure database. I would like to know which is the best way to handle the connections (create, commit and close).
For example, this is my job:
Should I create a SQL connection with tMSSqlConnection, use it for all the components of the same resource and close it with tMSSqlCommit at the end ? If I had to do this, this means that I should create a tMSSqlConnection for each resource.
This is probably not the best option.
Should I create a tMSSqlConnection, us it for all the components and select the option AutoCommit?
This is what I had but I realized that I had some problems with the connections.
Or I create a tMSSqlConnection, use it for all components without the "AutoCommit" function and I close it manually with tMSSqlCommit at the end of each resource.
This is what I wanted to try now but I prefer asking here because to change everything I need a lot of time and I want to be sure.
Thanks!
Hello,
--
Or I create a tMSSqlConnection, use it for all components without the "AutoCommit" function and I close it manually with tMSSqlCommit at the end of each resource.
Reffering to the third solution, for me the best is to use a shared connexion, and commit the transaction at the end of your subjob or job (depending on the requirements).
I am still lost on the solution but ... I think that I will use the first option. Creating a database conection for each resource and close it at the end with tMSSqlCommit.
If someone have a better idea, I would appreciate the help. I have to develop this with TOS.