UniDAC SetRange not working as Nexus SetRange
Posted: Fri 12 Jul 2019 19:36
Hello There,
Long back I have contacted your support and Mr. Viktor Replied the below:
"Currently, when passing a Null value to SetRange, this condition is not taken into account. We will change this behavior in the next release of UniDAC."
This communication was done on Sep 7, 2018. Yea, long back :)
When I went and saw the UniDAC change log, I found that the fix is released in v7.3.10 on 17-Sep-18 (The log says: "Now the SetRange method supports Null values"). This is great news for us so thought of installing and trying the trial version first and go for renewing the subscription with you.
Just for your information, we were using Nexus Native component before moving to UniDAC. So after testing with trial version, unfortunately we found that it does not work as desired.
The scenario is as described as below:
There is an index named as 'TempIndex'
It contains the fields: Field1, Field2, Field3, Field4, Field5
Scenario:
If SetRange was given on first 3 fields with the following values:
SetRange([null, null, 'Val1'],[null, null, 'Val1']);
Nexus component behaves like:
It will compare first 2 field values as 'null' and 3rd field value as 'Val1'. It will not consider the remaining 2 field values that exists in that Index.
UniDAC 7.4.12(Delphi 10.1) component behaves like:
It considers the null for all fields that are not specified in SetRange unlike Nexus component which ignores it.
UniDAC help also says the same that means in the above SetRange, it will consider Field1, Field2, Field4, Field5 as Null.
To avoid this problem, we need to mention all the field values or we create as many indexes as per the requirement and call it with many checks. That will not be desirable :)
Hope you understood the problem. I am not sure whether Devart is following the standard way or Nexus. But this is the problem I am facing and it would be great help if you suggest a way out of this.
Long back I have contacted your support and Mr. Viktor Replied the below:
"Currently, when passing a Null value to SetRange, this condition is not taken into account. We will change this behavior in the next release of UniDAC."
This communication was done on Sep 7, 2018. Yea, long back :)
When I went and saw the UniDAC change log, I found that the fix is released in v7.3.10 on 17-Sep-18 (The log says: "Now the SetRange method supports Null values"). This is great news for us so thought of installing and trying the trial version first and go for renewing the subscription with you.
Just for your information, we were using Nexus Native component before moving to UniDAC. So after testing with trial version, unfortunately we found that it does not work as desired.
The scenario is as described as below:
There is an index named as 'TempIndex'
It contains the fields: Field1, Field2, Field3, Field4, Field5
Scenario:
If SetRange was given on first 3 fields with the following values:
SetRange([null, null, 'Val1'],[null, null, 'Val1']);
Nexus component behaves like:
It will compare first 2 field values as 'null' and 3rd field value as 'Val1'. It will not consider the remaining 2 field values that exists in that Index.
UniDAC 7.4.12(Delphi 10.1) component behaves like:
It considers the null for all fields that are not specified in SetRange unlike Nexus component which ignores it.
UniDAC help also says the same that means in the above SetRange, it will consider Field1, Field2, Field4, Field5 as Null.
To avoid this problem, we need to mention all the field values or we create as many indexes as per the requirement and call it with many checks. That will not be desirable :)
Hope you understood the problem. I am not sure whether Devart is following the standard way or Nexus. But this is the problem I am facing and it would be great help if you suggest a way out of this.