Page 1 of 1

A/V in TVirtualDataSet.Edit

Posted: Wed 20 Dec 2017 09:21
by Jank
Hi,

I've updated to 6.1.4 (from 5.7.27) and execute the code below. It is important that a ftWideMemo is included.

DataSetGetRecordCount delivers the value 1.
DataSetGetFieldValue delivers a fix value for each field.

Code: Select all

  lDataSet := TVirtualDataSet.Create(nil);

  try
    lDataSet.OnGetRecordCount := DataSetGetRecordCount;
    lDataSet.OnGetFieldValue  := DataSetGetFieldValue;
    lDataSet.FieldDefs.Add('id', ftInteger);
    lDataSet.FieldDefs.Add('name', ftWideString, 50);
    lDataSet.FieldDefs.Add('info', ftWideMemo);
    lDataSet.Active := True;
    lDataSet.Edit; // A/V in MemData.TBlob.SetAsWideString
  finally
    FreeAndNil(lDataSet);
  end;
When I call lDataSet.Edit I recive an Access Violation in MemData.TBlob.SetAsWideString.
I thought it was fixed with 6.0.1 (Bug with reading Memo as WideMemo is fixed).

Regards, Jan

Re: A/V in TVirtualDataSet.Edit

Posted: Mon 25 Dec 2017 16:59
by MaximG
Thank you for the information. We have reproduced the issue and investigation is in progress. We will inform you when we have any results.