Connectors (ADO.NET and HTTP)
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:
- The HttpConnector is used for connecting to Ventura's web server middle-tier running the FrameStream API.
- The AdoConnector is used for direct ADO.NET connections.
A default connector is set in VenturaConfig.DefaultConnector
The default connector is used by:
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);
Created with the Personal Edition of HelpNDoc: Easy CHM and documentation editor