TMtxDataset.ReadDataset Method

procedure ReadDataset(ReadAsComplex: boolean);

Reads the contents of underlying fields.

Result: stored in self (calling object)

Remarks:

Reads the contents of underlying fields, defined in <See cref="VecColumns"/> collection, and stores their contents in the corresponding VecColumns.Items[i].<See cref="TVecColumn.Vector"/> vectors. ReadDataset method performs a: Single record read for all VecColumns[i] with <See cref="ReadWriteMode"/> set to wmRecord. Numeric values read for all VecColumns[i] with <See cref="ReadWriteMode"/> set to wmColumn. If the <i>ReadAsComplex</i> parameter is true then two consecutive dataset records are treated as real and imaginary part of complex number. By default, ReadAsComplex is false meaning each record in dataset is treated as one real number. The ReadAsComplex parameter is the same for all <See cref="VecColumns"/>. <example> <code> procedure TForm1.FormCreate(Sender: TObject); begin MtxDataSet.Dataset := Table1; MtxDataSet.ReadDataset; end; </code> <code lang="C++"> void __fastcall TForm1::FormCreate(TObject *Sender) { MtxDataSet->Dataset = Table1; MtxDataSet->ReadDataset(false); } </code> Alternatively, you can do a ReadDaset operation on individual fields (a lot slower when you're reading from multiple fields): <code> procedure TForm1.FormCreate(Sender: TObject); var i : Integer; begin MtxDataSet.Dataset := Table1; for i := 0 to MtxDataSet.VecColumns.Count - 1 do MtxDataSet.VecColumns[i].ReadDataset; end; </code> <code lang="C++"> void __fastcall TForm1::FormCreate(TObject *Sender) { MtxDataSet->Dataset = Table1; for (int t=0; t<MtxDataset->VecColumns->Count; t++) MtxDataset->VecColumns->Items[t]->ReadDataset(false); } </code> </example> <seealso cref="TVecColumn.ReadDataSet"/>

Examples
procedure TForm1.FormCreate(Sender: TObject);
begin
    MtxDataSet.Dataset := Table1;
    MtxDataSet.ReadDataset;
end;
procedure TForm1.FormCreate(Sender: TObject);
var i : Integer;
begin
    MtxDataSet.Dataset := Table1;
    for i := 0 to MtxDataSet.VecColumns.Count - 1 do
    MtxDataSet.VecColumns[i].ReadDataset;
end;