DisconnectDB

Estimated reading: 2 minutes 1774 views

This activity assists the user in terminating the connection with the specified database.

Properties

INPUT

SqlConnection*: This parameter indicates the existing SqlConnection to be provided for disconnection.

Here, mentions the output variable declared in the “ConnectDB” activity.
It accepts values in the “SqlConnection” data type.

MISC

DisplayName: Displays the name of the activity. The activity name can be customized, which aids in troubleshooting.

SkipOnError: Specify the “Boolean” value as “True” or “False.”

True: Continue executing the workflow regardless of any errors thrown.
False: Halt the workflow if it encounters any errors.
None: If the option is left blank, the activity will, by default, behave as if “False” were chosen.

Version: It indicates the version of the feature being used.

OUTPUT

Result: It provides the ability to view the execution status of the activity. It returns values in “Boolean.”

True: Indicates that the activity has been executed successfully without any errors.
False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown.

Represents mandatory fields to execute the workflow.

Here’s an example of how the activity is used in the workflow –

In the following example, I am going to continue from the “ConnectDB” activity and utilizing the Disconnect DB activity I am terminating the connection with the provided database.

Steps to build the bot:

1. Create a solution.
2. Drag and drop the “DisconnectDB” activity and place it below the “ConnectDB” activity in the workflow.
3. Navigate to the “SqlConnection” in the properties to provide the input values.
a. Here I am utilizing the variable “DB_OUTPUT” declared as output in the “ConnectDB” activity.
4. Now, you can declare a variable in the “Result” property to view the state of the activity.
a. There are two ways to declare a variable –
b. Method 1: Double-click on the variable parameter in the Output section and enter a name that helps you easily identify the flow. Here, I’m using the name “Result” and using the shortcut key “Ctrl+Q” to create the variable.
c. Method 2: Click on the variable pane, enter your preferred name. (here, I’m using “DB_OUTPUT”), and choose the data type as “Boolean”.
5. You can view the output using the “Writelog” activity.
6. Save and execute the workflow.

Share this Doc

DisconnectDB

Or copy link

CONTENTS