UniQuery.Params.ValueCount

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

UniQuery.Params.ValueCount

Post by FredS » Wed 01 Jun 2016 16:53

Hi,
While attempting to lessen the performance hit reported in Bulk Inserts I ran into an issue.

Setting:

Code: Select all

UniQuery.Params.ValueCount := 2; 
after it was 1 essentially makes existing data at index 0 unavailable.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: UniQuery.Params.ValueCount

Post by MaximG » Fri 03 Jun 2016 10:16

The described behavior is correct. On modifying the UniQuery.Params.ValueCount property, you will lose access to previously created elements.

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: UniQuery.Params.ValueCount

Post by FredS » Fri 03 Jun 2016 20:04

MaximG wrote:The described behavior is correct. On modifying the UniQuery.Params.ValueCount property, you will lose access to previously created elements.
That setter method calls RedimItems which calls VarArrayRedim on any other change which preserves prior data.
So from 2..200k existing data is retained.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: UniQuery.Params.ValueCount

Post by MaximG » Mon 13 Jun 2016 10:32

We will consider the possibility to change behavior of UniDAC in the studied case. We will inform you about the results shortly.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: UniQuery.Params.ValueCount

Post by MaximG » Mon 15 Aug 2016 10:14

Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next UniDAC build.

Post Reply