WebCab Probability and Statistics for .NET v3.3 Demo

ADOMediator.Select Method 

Performs calculations upon a data set and returns the results by using a SELECT input query. The method is invoked by passing values returned by the SELECT statement on every row and added to the returning array of results.

public object[] Select(
   string methodName,
   string inputQuery
);

Parameters

methodName
The name of the method used in evaluating the input data returned by inputQuery. If the underlying component contains several methods named meethodName, the one that fits best the number columns returned is chosen.
inputQuery
A SELECT SQL query that returns enough columns to invoke methodName. Every column will be passed on to the method in the order they were queried.

Return Value

This method returns the results calculated by method methodName on every row of the input query data set.

Exceptions

Exception TypeCondition
ADOMediatorExceptionThrown to indicate run-time errors.

Example

The following piece of code invokes method MyMethod by using the SHARES and VALUE columns as parameters and lists the results as computed for every row returned.

            Object[] results = ado.Select ("MyMethod", "SELECT C_ID, SHARES, VALUE FROM TRADES");
            foreach (Object o in results)
                Console.WriteLine (o);
            

See Also

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