Multiple Recordset.ExecSql or Recordset.SaveChanges calls can be bundled into:

  • A single HTTP round-trip (request and response);
  • A single database transaction (commit and rollback).

For this you use the Transactional class.

Transactional.ExecSql(customers, orders, invoices);

Transactional.SaveChanges(customers, orders, invoices);

When execution of any of the resulting SQL statements fails, then all database modifications are rolled back, and VenturaSQL will throw a Ventura.RemoteExeception

Setting input parameters

When using Transactional.ExecSql, the input parameters for each recordset have to be set by calling the Recordset.SetExecSqlParams method before calling Transactional.ExecSql

For example:



invoices.SetExecSqlParams(1, 10022);

Transactional.ExecSql(customers, orders, invoices);