WebCab Probability and Statistics for .NET v3.3 Demo

ADOMediator Constructor 

Establishes and opens input and output Database connections. The UnderlyingInstance property remains unset.

public ADOMediator(
   Type inputConnectionDriver,
   string inputConnectionString,
   Type outputConnectionDriver,
   string outputConnectionString
);

Parameters

inputConnectionDriver
The run-time type of the driver used to invoke input queries.
inputConnectionString
The ConnectionString property of the input connection instance.
outputConnectionDriver
The run-time type of the driver used to invoke output queries.
outputConnectionString
The ConnectionString property of the output connection instance.

Remarks

You may not need both input and output connections. In this case, you should send in null parameters for the corresponding connection parameters. For example, if you don't require writing data back into the database, which in other words means you don't require an output connection, you will send in null values for the outputConnectionDriver and outputConnectionString parameters.

The connections remain open until a method results in an exception or the instance is disposed of.

Example

The following code creates a new ADOMediator instance with SQL input and output connections. Note that although the connections have the same initial parameters, they will be distinctly accessed.

            ADOMediator ado = new ADOMediator (
               typeof (SqlConnection),
                  "Initial Catalog=Northwind;Data Source=localhost;Integrated Security=true;",
               typeof (SqlConnection),
                  "Initial Catalog=Northwind;Data Source=localhost;Integrated Security=true;");
            

See Also

ADOMediator Class | WebCab.Libraries.Statistics.Correlation.ADO Namespace