I am using a DBGrid to display data on a form. I use a Filter to get the records for the given foreign table record (1 to many).

I am using a DBGrid to display data on a form. I use a Filter to get the records for the given foreign table record (1 to many).
The problem is that when I change the Master table's record, the grid continues to displsy the previos record.'

How can I get it to display the correct daa?

procedure TdmVideos.SetEpisodesFilter(const Id: integer);
begin
qryEpisodes.Active := False;
qryEpisodes.Filtered := False;
qryEpisodes.Filter := 'VIDEO_ID = ' + IntToStr(Id);
qryEpisodes.Filtered := True;
qryEpisodes.Active := true
end;

Comments

  1. Thanks for all the help guys especially +Walter Prins. Did it right and got it working right.

    ReplyDelete

Post a Comment