TObjectDataset Range Check Error

Issue #186 resolved
Pavel Novak created an issue

I tryed create simple

List:=IList<TMyModel>;
ObjectDataset.DataList:=List as ObjectList;
JvUltimDBGrid.Datasource.Dataset:=ObjectDataset;

If MyModel have only one field,is OK. But when MyModel have more then one field in DBGrid show only First Col and First Row Value and next Col raised Range Check Error;

Problem is in:

function TAbstractObjectDataset.GetFieldData(Field: TField;
  {$IFDEF DELPHIXE4_UP}var{$ENDIF} Buffer: TValueBuffer;
  NativeFormat: Boolean): Boolean;
...
...
...
Data := PVariantList(LRecBuf + SizeOf(TArrayRecInfo))[Field.Index]; <--Field Index is out of range

PVariantList have allways only one member.

How to correct this please?

Comments (5)

  1. Log in to comment