DB Close
DB Close
Section titled “DB Close”Type: db-close · Package: Database Activities v1.0.0
Close the connection to the database and release the resources. It is the partner of DB Connect when you work without body (Option B of session model).
How it works
Section titled “How it works”Close the connection associated with the session. After this, the session can no longer be used. Leaving connections open consumes database server resources, so it is important to close them.
Required parameters
Section titled “Required parameters”Ninguno.
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
session | session | The session returned by DB Connect. |
Example
Section titled “Example”DB Connect provider = mysql connectionString = = credential("db").ToPlainText() → output: dbDB Query session = = db sql = "SELECT * FROM productos" → output: productosDB Close session = = dbRelated activities
Section titled “Related activities”- DB Connect — open the connection.
- Try / Catch — close on
finallyto avoid leaving open connections.