Page 1 of 1

TvirtualQuery + TTable - two important errors

Posted: Sun 26 May 2019 18:02
by Creator
Hi
My environment: Windows 10, Delphi 10.3 Update 1, UniDac 7.4.12

Object TTable open with table Dbase 7 "Example.dbf" (important level 7) created by BDE.
Table "Example" has 2 fields: "ID" - AutoIncrement and "Name" - String

TTable (named "T1") is connected with TVirtualQuery (named "VQ").
VQ.SQL.Text := SELECT * FROM T1
VQ.KeyFields := ID

Error 1:
We open whole and across Grid we change content of field "Name".
We receive error (translation from Polish): "Field ID cannot be modified".
Error is result of property "ReadOnly" of field T1.ID However field T1.ID is not modified.
( viewing with DBmonitor: UPDATE main.T1 SET NAME = ? WHERE ID = ? )
This error can be avoided through use of following sequence of code:
T1.Active := TRUE;
T1.FieldByName('ID').ReadOnly := FALSE;
VQ.Active := TRUE;

However such solution is only prosthesis.


Error 2 (FATAL !):
We open whole and across Grid we clean content of field "Name" and we close whole.
Again we open whole and receive error (translation from Polish):
"Cannot make conversion variant of type (NULL) on type "(OleStr)"
I suppose that error can result from way of filling of empty StringField in Dbase 7 (bytes zero).


Regards

Re: TvirtualQuery + TTable - two important errors

Posted: Mon 27 May 2019 14:08
by MaximG
Thank you for the information. We will investigate the described issue and let you know the results shortly.

Re: TvirtualQuery + TTable - two important errors

Posted: Wed 29 May 2019 11:37
by MaximG
We reproduced the issue and fixed this error. The fix will be included in the next UniDAC build. As a workaround, we can send you a night UniDAC build including the required changes. For this, using e-support form (https://www.devart.com/company/contactform.html) provide us with your license number and IDE version you are interested in

Re: TvirtualQuery + TTable - two important errors

Posted: Wed 29 May 2019 12:35
by Creator
Thank you too quick reaction.
Greetings for entire group Devart.

Regards

Re: TvirtualQuery + TTable - two important errors

Posted: Wed 29 May 2019 21:56
by Creator
Hi,

After testing of received the nightly build "unidac74d26pro_28_05_2019.exe":

Error 2 - was eliminated.
Error 1 - still exists. It is less essential, but confuses.

Regards

Re: TvirtualQuery + TTable - two important errors

Posted: Fri 07 Jun 2019 13:16
by MaximG
Can you please specify if the "Field ID cannot be modified" error can be reproduced after the latest night build we sent you is installed? In our test environment, we cannot reproduce the error while using this specific build.

Re: TvirtualQuery + TTable - two important errors

Posted: Mon 10 Jun 2019 12:08
by Creator
Hi,

I did not receive link to latest night build. My test concerns "unidac74d26pro_28_05_2019.exe" In this version error still appears

Regards

Re: TvirtualQuery + TTable - two important errors

Posted: Tue 11 Jun 2019 15:12
by MaximG
We emailed you the link which allows you to download the latest UniDAC night build. Please use it to check how your application works and let us know the results.

Re: TvirtualQuery + TTable - two important errors

Posted: Wed 12 Jun 2019 10:45
by Creator
Hi,
I tested night build 11_06_2019 for 5 different Dbase VII tables. Unfortunately error still appears.

Regards

Re: TvirtualQuery + TTable - two important errors

Posted: Wed 12 Jun 2019 14:05
by MaximG
For further issue investigation, please send the full source code of your test project (with Example.dbf file), execution of which causes the issue. It is convenient to do it using the e-support form (https://www.devart.com/company/contactform.html)

Re: TvirtualQuery + TTable - two important errors

Posted: Thu 13 Jun 2019 01:51
by Creator
Hi,
Simple test project was sent by contact form.

Regards

Re: TvirtualQuery + TTable - two important errors

Posted: Thu 13 Jun 2019 11:58
by MaximG
Thank you for the information. We have reproduced the issue and will investigate its origin. We will inform you about the results shortly.