I try to work with
DADynamicWhereClause.init(predicate: NSPredicate(format: " RequiredDate is null "))
but it said null is not support ,
how should I write to filter that the “RequiredDate is null” on my sql database ? I am making the client to access the Delphi custom server …
Thanks…
Jason,
it’s been a while thats I worked in depth with NSPredicate, but it’s possible that it doesn’t use the “is” syntax that SQL commonly uses. have you tried "RequiredDate == null"
? Also, try nil
instead of null
– since that’s what Objective-C uses, it stands to reason the same was adopted for NSPredicate.
I tried both ways
Not work
But finally I will use sql sever to make a view with isnull to create another field that set to 1950-1-1 if it’s null . And on an nspredicate use new field for condition . it worked but if there are other way , I will try .
Google seems to indicate x == nil
or x != nil
out to work. What happens for when you do this? an error? Wrong results? What’s the generated DA SQL/Dynamic Where?
Hmm, let me see…
I have. potential fix; if I send you an updated source file for DA, can you rebuild libDataAbstract locally to test if the fix works for you , or would you need a full new RO/DA build?
yes please send me the source, I will try to rebuild , not sure if I can do it …
Sent via PM.