Common Reference > DbUtil Class

DbUtil Class

This class provides a small set of static methods for extracting array data from database tables. See the tutorial on aggregating data for some worked examples.

public class DbUtil

Example


 sp.Reset(240,160);
 sp.SetMargins(24,18,24,4);
 filler = (int)sp.MissingValue;
 
 mytable = new DataTable(); // Get some real data here!;
 myselection = mytable.Select("year>2006 AND symb='BP'");
 int[] BP = DbUtil.GetIntegers(myselection,filler,"SharePrice");
 
 sp.Heading = "BP";
 sp.HeadingStyle = HeadingStyles.Right;
 sp.DrawLineGraph(BP);

This example simply retrieves one complete column from the current selection, using SharpPlot’s missing value setting to replace any DBNull values in the data.

Requirements

Namespace: Causeway

Assembly: SharpPlot (in sharpplot.dll)


Send comments on this topic
© Dyalog Ltd 2016