I'm using the TUniQuery component from UniDAC. I'd like to show how many records I have, so
I've put the following code to show in a Status Bar:
procedure TForm1.unyQuery1AfterFetch(DataSet: TCustomDADataSet);
begin
StatusBar1.Panels[1].Text := 'Número de registros: ' + inttostr(unyQuery1.RecordCount);
end;
UnyQuery1.RecordCount always returns zero. But if I run this code from a button click event it works.
What I'm doing wrong?