TOracleDataSet Filter

AndreyB

Member²
It seems that TOracleDataSet filtering includes values with NULL as well. So if I set Filter := 'Some_Integer_Field = 0' NULL values will be returned as well. This is very unconsistent, if you look at the help for TDataSet.Filter property it states the next:
"When a filter is set, Blank records do not appear unless explicitly included in the filter. For example:
State 'CA' or State = NULL"
So why DOA does it different way? And how can I ignore those blank fields in filtering?
 
I checked this, and the filtering behavior for null values in a TOracleDataSet is indeed not correct. We will fix this for the next release (although it will have impact for applications that rely on this behavior), and as a workaround in the current release you can extend the filter expression. For example, if you want to see all records where code = 0 (and not the records where code = null) use an expression like this:

(code = 0) and (code null)

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