UniDAC SetRange not working as Nexus SetRange

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ajay.s
Posts: 2
Joined: Fri 12 Jul 2019 19:30

UniDAC SetRange not working as Nexus SetRange

Post by ajay.s » 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.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: UniDAC SetRange not working as Nexus SetRange

Post by ViktorV » Mon 15 Jul 2019 06:28

In the latest UniDAC version 7.5.13, we've made the following modifications: if either StartValues or EndValues has fewer elements than the number of fields in the current index, then the remaining entries are ignored when performing a search.
You can download UniDAC Trial Edition 7.5.13 to check whether the issue persists.
We have alrady described the changes in our DAC documentation.

ajay.s
Posts: 2
Joined: Fri 12 Jul 2019 19:30

Re: UniDAC SetRange not working as Nexus SetRange

Post by ajay.s » Mon 15 Jul 2019 14:22

Thank you Victor.
The latest UniDAC version 7.5.13 seems to be working as you explained. Thanks.

Just skeptical, will there be any new issues like performance or something else that will effect after I upgrade?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: UniDAC SetRange not working as Nexus SetRange

Post by ViktorV » Tue 16 Jul 2019 10:40

We didn't make any changes to your code which could affect the performance.
If you'll encounter any issues while working with our components, and these issues are caused by our product's code, we'll try to fix this as soon as possible.

Post Reply