Skip to main content

Disconnect

AutomatR.MySQLDataBase.Database.Disconnect

The "Disconnect" activity in AutomatR is designed to gracefully disconnect from a MySQL database, ensuring proper closure of the database connection established by the "Connect" activity. This is a crucial step in database operations to release resources and manage connections efficiently.

Properties

NameDescription
Input
ConnectionProvide a MySqlConnection variable that was used to establish the database connection. Variables of type MySqlConnection.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Disconnect" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.

How to use:

  1. Drag and drop the "Disconnect" activity onto the workflow.
  2. Configure the properties by specifying the MySqlConnection variable obtained from the "Connect" activity.
  3. Optionally, configure the delay for synchronization purposes.
  4. Execute the workflow to gracefully disconnect from the MySQL database.

Example: Consider an example where the "Disconnect" activity is used to disconnect from a MySQL database:

Disconnect:
Connection: MySqlConnectionVariable
Delay: 2

In this example, the activity disconnects from the MySQL database using the MySqlConnection variable "MySqlConnectionVariable." A delay of 2 seconds is introduced before the disconnect operation to handle synchronization issues. The activity logs a trace message indicating successful disconnection.