TOracleDataSet.Filter Error

AndreyB

Member²
OracleDataSet filter treats incorrectly NULL value for DateTime fields.
For instance if filter expression is 'Some_Date_Field NULL' we'll have an error 'NULL field is not found' the prioblem is in that function

function TColumnExpression.GetAsDate: TDateTime;
begin
Result := fDataSet.FieldByName(fField).AsDateTime;
end;

I guess that patched version should look like this:

function TColumnExpression.GetAsDate: TDateTime;
begin
if fField = 'NULL' then
Result := 0
else
Result := fDataSet.FieldByName(fField).AsDateTime;
end;

At least it works right.
 
We'll take a look at this and fix it for the next release.

------------------
Marco Kalter
Allround Automations
 
Back
Top