procedure ReadDataset(ReadAsComplex: boolean);
Reads the contents of underlying field and stores it's contents in vector.
Result: stored in self (calling object)
Reads the contents of underlying field and stores it's contents in the <See cref="Vector"/> vector. Depending on <See cref="TMtxDataset.ReadWriteMode"/> the following operation is performed: wmRecord => read all <See cref="Vector"/> properties from current record position. The underlying dataset field must be BLOB field, otherwise an exception is raised. wmColumn => read all values from the underlying field and store them to <See cref="Vector"/> Values. 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 Vector Length and Complex properties are adjusted automatically. <example> <code> procedure TForm1.FormCreate(Sender: TObject); begin MtxDataSet.Dataset := Table1; MtxDataSet.VecColumns.Clear; with MtxDataset.VecColumns.Add do begin FieldName := 'TimeAnalysis'; ReadWriteMode := wmRecord; end; with MtxDataset.VecColumns.Add do begin FieldName := 'FFTAnalysis'; ReadWriteMode := wmRecord; end; // read only first field MtxDataset.VecColumns[0].ReadDataset; ViewValues(MtxDataset.VecColumns[0].Vector); end; </code> <code lang="C++"> void __fastcall TForm1::FormCreate(TObject *Sender) { MtxDataSet->Dataset = Table1; MtxDataSet->VecColumns->Clear(); TVecColumn *col; col = MtxDataSet->VecColumns->Add(); col->FieldName = "TimeAnalysis"; col->ReadWriteMode = wmRecord; col = MtxDataSet->VecColumns->Add(); col->FieldName = "FFTAnalysis"; col->ReadWriteMode = wmRecord; // read only first field MtxDataset->VecColumns->Items[0].ReadDataset(false); ViewValues(MtxDataset->VecColumns-Items[0]->Vector,"",true,false,false); } </code> </example> <seealso cref="WriteDataset"/> <seealso cref="TMtxDataset.ReadWriteMode"/>
procedure TForm1.FormCreate(Sender: TObject);
begin
MtxDataSet.Dataset := Table1;
MtxDataSet.VecColumns.Clear;
with MtxDataset.VecColumns.Add do
begin
FieldName := 'TimeAnalysis';
ReadWriteMode := wmRecord;
end;
with MtxDataset.VecColumns.Add do
begin
FieldName := 'FFTAnalysis';
ReadWriteMode := wmRecord;
end;
// read only first field
MtxDataset.VecColumns[0].ReadDataset;
ViewValues(MtxDataset.VecColumns[0].Vector);
end;