Skip to content

DB Connect

Type: db-connect  ·  Package: Database Activities v1.0.0  ·  Output: ZoanDbSession

Opens a connection to a database and returns a session (ZoanDbSession) that is shared by other database activities. It is the starting point of any work with SQL.

Connect to the motor indicated in provider using the connectionString. You have two modes (see the session model):

  • With body: Activities inside inherit the connection automatically (you don’t configure session), and the connection closes itself upon completion.
  • No body: save the session to an output variable; pass it as session to the other activities and close it with DB Close.
ParameterEditorDescription
providerlistMotor: sqlserver · postgres · mysql · odbc.
connectionStringexpressionADO.NET connection string. Supports expressions.

Ninguno.

Activities to execute with this connection. If omitted, returns the session as output (and you must close it with DB Close).

Returns a ZoanDbSession. Pass it as session to the other database activities.

DB Connect provider = sqlserver connectionString = = credential("db-erp").ToPlainText()
└─ body:
DB Query sql = "SELECT TOP 10 * FROM Clientes" → output: clientes