Best way to use Execute Query Activity

In my process, i need to get record from the SQL db in multiple places. So what is the best practice to get records from same DB multiple times? Either i need to use Connect activity in every place and pass the output of connect activity to the Execute Query activity?
Or shall i connect to DB in initSettings itself, and pass the Database connection to all the places i need? Which one is best practice?

If i follow the approach, connect to Bot DB in init Settings and pass the Database connection to ProcessTransaction, how long the Database connection should persist? Any possible to throw timeout issue??

@Sunil_Prabakar You can Use Connect at Init Settings and Disconnect at End Process, The Connection variable needs to be passed wherever you need to use Execute Query or Non Query. This way You don’t need to use Connect Everywhere when you want to use. This Should be the best practice to follow.


Thanks for your comments :slight_smile:

1 Like

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