the code is trying to retrieve:
1.) data for Section selected
2.) between two dates.
procedure Tfrmproject.Bbnrefreshclick(Sender: TObject);
begin
with qryProject_ do
begin
Active := False;
SQL.Clear;
SQL.Text := 'SELECT UID, DateCreated, Subject, Section, Details, DateCompleted, FileName '
+ ' FROM TODO WHERE TODO.SECTION = :sSec AND DateCreated BETWEEN :sStart AND :sEnd ' +
' ORDER BY TODO.DateCreated ';
Params.ParamByName('sSec').AsString := qrySection_Section.AsString;
Params.ParamByName('sStart').AsString := FormatDateTime('yyyy-mm-dd', dtpStart.Date);
Params.ParamByName('sEnd').AsString := FormatDateTime('yyyy-mm-dd', dtpEnd.Date);
Open;
end;
end;