Recordsets can connect to a database directly, or retrieve and update data through a middle-tier web server. The connection type is selected by setting a connector.


A connector is either an AdoConnector or a HttpConnector class instance:


A default connector is set in VenturaConfig.DefaultConnector


The default connector is used by:

Recordset.ExecSql()

Recordset.SaveChanges()

Transactional.ExecSql()

Transactional.SaveChanges()


Direct ADO.NET connection:


string connection_string = @"Server=.\SQLEXPRESS;Initial Catalog=PlayGround;Connection Timeout=30;Integrated Security=True;MultipleActiveResultSets=True";


VenturaConfig.DefaultConnector = new AdoConnector(SqlClientFactory.Instance, connection_string);

var customers = new CustomersRecordset();

customers.ExecSql(100);


Connect to middle tier web server:


VenturaConfig.DefaultConnector = new HttpConnector("DefaultConnector", "https://venturatools.com:51437/Ventura.FSPRO");

var customers = new CustomersRecordset();

customers.ExecSql(100);