Database Connection, Execute Query and Disconnect

Hi Guys,

I have a doubt with Activities DatabaseConnect, Excute Query and Disconnect.

I always use this 3 activities in this Order.

1- Connect. Where I configure my connection String and Provider name and in the Output y save the connection in a DataBaseConnection variable.

2- Execute Query. Using “Existing Connection” Propetie, where I Write the DataBaseConnection variable.

3- Disconnect. To close the connection Database.

But Today I Change the Activities order.

1- Connect
2- Disconnect
3 -Execute Query

And the Workflow works smoothly.

How can be It possible?

Thanks

1 Like

because the connect simply creates a connection that is saved in a variable, then gets further used in Execute Query.

I don’t use connect any more, the first time I want to execute query I just save the connection from there on

1 Like

because the connect simply creates a connection that is saved in a variable, then gets further used in Execute Query, because it just opens the connection again

I don’t use connect any more, the first time I want to execute query I just save the connection from there on

probably better of using Start Transaction

2 Likes

Ok. I understand.

So, when do you use Disconnect Activitie? Always after Execute a Query or at the end of the Process?

Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.