ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/dbcontrolgrid/unit1.pas
(Generate patch)

Comparing ibx/trunk/examples/dbcontrolgrid/unit1.pas (file contents):
Revision 420 by tony, Thu Jun 22 13:52:39 2023 UTC vs.
Revision 421 by tony, Sat Oct 21 14:22:28 2023 UTC

# Line 341 | Line 341 | end;
341  
342   procedure TForm1.EmployeesBeforeOpen(DataSet: TDataSet);
343   begin
344 <  if BeforeDate.Date > 0 then
344 >  if BeforeDate.Date <> NullDate then
345       (DataSet as TIBParserDataSet).Parser.Add2WhereClause('HIRE_DATE < :BeforeDate');
346 <  if AfterDate.Date > 0 then
346 >  if AfterDate.Date <> NullDate then
347       (DataSet as TIBParserDataSet).Parser.Add2WhereClause('HIRE_DATE > :AfterDate');
348  
349    case SalaryRange.ItemIndex of
# Line 358 | Line 358 | begin
358  
359  
360    {Parameter value must be set after all SQL changes have been made}
361 <  if BeforeDate.Date > 0 then
361 >  if BeforeDate.Date <> NullDate then
362       (DataSet as TIBParserDataSet).ParamByName('BeforeDate').AsDateTime := BeforeDate.Date;
363 <  if AfterDate.Date > 0 then
363 >  if AfterDate.Date <> NullDate then
364     (DataSet as TIBParserDataSet).ParamByName('AfterDate').AsDateTime := AfterDate.Date;
365  
366   end;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines