wrong fields

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
User avatar
cappelletto
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 17.06.2020, 10:55
Location: Italy

wrong fields

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 797
Joined: 18.11.2018, 17:37
Location: Hungary

Re: wrong fields

Post 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?
You do not have the required permissions to view the files attached to this post.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
User avatar
cappelletto
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 17.06.2020, 10:55
Location: Italy

Re: wrong fields

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
cappelletto
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 17.06.2020, 10:55
Location: Italy

Re: wrong fields

Post by cappelletto »

here is an example of where the problem manifests itself.
You do not have the required permissions to view the files attached to this post.
User avatar
cappelletto
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 17.06.2020, 10:55
Location: Italy

Re: wrong fields

Post by cappelletto »

How can I debug the components? I'll try to look up what the problem might be too
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 797
Joined: 18.11.2018, 17:37
Location: Hungary

Re: wrong fields

Post 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.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
User avatar
cappelletto
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 17.06.2020, 10:55
Location: Italy

Re: wrong fields

Post 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.
Last edited by cappelletto on 18.04.2024, 16:46, edited 1 time in total.
User avatar
cappelletto
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 17.06.2020, 10:55
Location: Italy

Re: wrong fields

Post by cappelletto »

I am interested in lazarus 2.3, delphi I do not use.
User avatar
cappelletto
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 17.06.2020, 10:55
Location: Italy

Re: wrong fields

Post by cappelletto »

Last thing, with Zeos 7.2.x it works.
User avatar
cappelletto
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 17.06.2020, 10:55
Location: Italy

Re: wrong fields

Post 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
You do not have the required permissions to view the files attached to this post.
Post Reply