DTDataSet
DTDataSet - a set of data for the DataSource, obtained from a DataTable object. In turn, the DataTable may be populated with data from a database, text file or the application code.
Properties
| Property | Description |
|---|---|
| public DataTable DataTable | Reference to the Table |
Methods
| Method | Description |
|---|---|
| public override bool AssignedSource() | Checks for presence of the linked source (dataTable). |
| public override bool Open() | Opens the DataSet for read operation. |
Connection setup procedure to a DataTable using visual components is very simple.
Cube connection to a DataTable setup
Configuration of Visual components is similar to configuring a connection to a database, with the only difference that while configuring DataSet of DataSource component you should choose dtDataSet1. Accordingly, oleDBConnection and oleDBCommand are not required.
From your application code:
DataTable dataTable = new DataTable(); // Create a table and fill it with data
…
cube1.Close(); // Close the cube to unload data from it (if you have previously loaded)
dtDataSet1.DataTable = dataTable; //Assign the created table to the property DataTable for the dateset
dataSource1.DeleteFields(); // Clear the field in the data source (if previously loaded)
dataSource1.DataSet = dtDataSet1;
cube1.Open(); // Open the cube to load data into it