Hi !
I have a problem with the following query: (the fileld date is type of date, Firebird 3.0.3 server dialect 3)
Query.Close;
Query.SQL.Clear;
Query.SQL.Add ('SELECT datum, some_fields FROM some_table WHERE datum BETWEEN :fromdate AND :todate ORDER BY datum');
Query.ParamByName('fromdate').AsDate := DateTimPicker_From.Date;
Query.ParamByName('todate').AsDate := DateTimPicker_To.Date;
Query.Open;
Query.Eof is always True, but there are certain entries in the SQL table for that period.
when I replaced the SQL parameters to "2018-01-01" and "2018-03-01", I got the correct result.
I would like to use the Parameterized Query as the date range varies, depending on how the user chooses.
Previously I used ZeosDBO, I have never had problems with the DateTime parameters. I'm doing something wrong or the ParamByName ('dat_param').AsDate (or AsDateTime) works differently ?
XUbuntu 17.10 i386, Lazarus 1.8.3 i386 gtk, Firebird 3.0.3, IBX 2.2 (applicatin also cross compiled to Win32)