# MySQL\_Close

## `MySQL_Close` (FB)

FUNCTION\_BLOCK MySQL\_Close

**Short description:**

> This function block terminates the MySQL connection.

**Detailed description:**\
The close operation starts on a rising edge of "xStart". The variable "xStart" is reset at the end of the operation.\
If an error occurs during the close operation, an ERROR code and the current execution state are displayed, which helps identify the problem.

InOut:

| Scope  | Name               | Type                    | Comment                                                                        |
| ------ | ------------------ | ----------------------- | ------------------------------------------------------------------------------ |
| Inout  | `xStart`           | `BOOL`                  | Start execution on a rising edge                                               |
| Inout  | `MySQL_Connection` | MySQL\_ConnectionString | <p>MySQL connection string which holds the server and login<br>information</p> |
| Output | `eError`           | ERROR                   | Error type                                                                     |
| Output | `sExeute_State`    | `STRING(200)`           | Current execute state                                                          |
