Page 1 of 1
wrong fields
Posted: 15.04.2024, 17:09
by cappelletto
I make a premise, with zeos 7.2.x it worked correctly.
If I assign a calculated field a value, another value is assigned. Please look at the image.
On some fields it works, on others it does not.
These are calculated fields inside oncalcfield
If it works out otherwise I will go back to 7.2.x
zeos.png
CorsoDestrizioneRicevute = String(70)
Sorry, I thank you for the work you do for zeos, but I can't risk it.
Re: wrong fields
Posted: 15.04.2024, 19:10
by aehimself
Hello,
I personally never used calculated fields but I put together a small test application, where I could not reproduce the issue:
ZeosCalcField.PNG
It's easily possible that I'm doing something wrong. Can you please make a test application with an optional DB create script so we can check?
Re: wrong fields
Posted: 16.04.2024, 05:39
by cappelletto
I confirm that there is the problem.
In fact if I take a simple table and put a calculated field in it it works.
Then I took the query on my program and pasted it on a new project e new form and the problem recurs with an even different result
zeos2.png
The query in question is large and the database there are privacy issues. I will try again to have the error repeated.
Re: wrong fields
Posted: 16.04.2024, 07:44
by cappelletto
here is an example of where the problem manifests itself.
Re: wrong fields
Posted: 16.04.2024, 11:34
by cappelletto
How can I debug the components? I'll try to look up what the problem might be too
Re: wrong fields
Posted: 16.04.2024, 13:34
by aehimself
I'd do a step-into the field setter ( query.fieldbyname.assting := ) and getter ( := query.fieldbyname.asstring ) to see if writing in or reading out the data fails.
It might be a good idea to connect a DBEdit on the same field so you can verify if / when the data changes.
I'd also check if we are actually in the correct record ( query.rownum ).
In the mean time I'll try to import your example into Delphi.
Re: wrong fields
Posted: 16.04.2024, 14:14
by cappelletto
I did a test, and the strange thing is that if you move CorsoDescriptionReceipts up, it works. I move it down, it doesn't work anymore.
Re: wrong fields
Posted: 16.04.2024, 14:31
by cappelletto
I am interested in lazarus 2.3, delphi I do not use.
Re: wrong fields
Posted: 16.04.2024, 15:00
by cappelletto
Last thing, with Zeos 7.2.x it works.
Re: wrong fields
Posted: 21.04.2024, 07:47
by cappelletto
I am not an expert, however there seems to be a basic error in fact the field is a string however it looks for an integer (in fact the result is '0').
I will try to go deeper but I am having difficulty.
Now correct You. The database has only one record
zeosErr2.png
zeosErr1.png