1)
I created this function http://zeoslib.sourceforge.net/viewtopi ... 92#p102892.
It is working good, except the user changes sorting client side. (User clicks on column title and programm adds to zquery.Sortedfields:='somecolumn'). In this case the old values are from wrong records.
Do you know how can I get right oldvalues?
2)
Today I tried to work common way with TDataLink.ActiveRecord and downloded latest trunkversion ([r5348]).
Is there maybe a bug because when you change TDataset.ActiveRecord then you get right value but not right oldvalue?
Look at screenshot.
This is the code when you click on ActiveRecord-Button:
Code: Select all
procedure TForm1.BtnActiveRecordClick(Sender: TObject);
var aDataLink: TDataLink;
begin
aDataLink:= TDataLink.Create;
try
aDataLink.DataSource:=DataSource1;
aDataLink.ActiveRecord:=2;
Memo1.Lines.Add(TimeToStr(now)+' Nr:'+ZQuery1.FieldByName('nr').AsString+' old:'+VarToStr(ZQuery1.FieldByName('nr').OldValue)+' Name:'+ZQuery1.FieldByName('name').AsString+' old:'+VarToStr(ZQuery1.FieldByName('name').OldValue));
finally
aDataLink.Free;
end;
end;