Closing Data Base Connections manually

Closing Data Base Connections manually

  

Hey there.


Well, my company has some clients, we obviously use different databases. But we have a project that will use information about all of them. So, we create an Action that need an Organization Identifier to differentiate organizations and we use to "For each" to replicate the logic for all clients. But after the first organization, the data base connection is not closing. For exemple, the first organization has 30 registers, when the flows over, the second organization must be processed, but we receive the same 30 registers from the preouvisly org.


We are using the "DatabaseConnection_setConnectionStringForSession" to open the connection. But now we need a way to close it manually.



Thks.


Solution

Hi Henrique, in the first place where is this action from ?DatabaseConnection_setConnectionStringForSession.


In second place, the connection between outsystems and database only close when your action finish.
Unless you are using another connection that not be platform main connection. 

Solution

Ok, I found that action in "PlataformRuntime_API". Like I said above, the outsystems control when should close the connection. It happen when finish the screen action.