wrong fields
- cappelletto
- Fresh Boarder
- Posts: 18
- Joined: 17.06.2020, 10:55
- Location: Italy
wrong fields
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 CorsoDestrizioneRicevute = String(70)
Sorry, I thank you for the work you do for zeos, but I can't risk it.
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 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.
Re: wrong fields
Hello,
I personally never used calculated fields but I put together a small test application, where I could not reproduce the issue:
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?
I personally never used calculated fields but I put together a small test application, where I could not reproduce the issue:
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
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
- cappelletto
- Fresh Boarder
- Posts: 18
- Joined: 17.06.2020, 10:55
- Location: Italy
Re: wrong fields
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 The query in question is large and the database there are privacy issues. I will try again to have the error repeated.
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 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.
- cappelletto
- Fresh Boarder
- Posts: 18
- Joined: 17.06.2020, 10:55
- Location: Italy
Re: wrong fields
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.
- cappelletto
- Fresh Boarder
- Posts: 18
- Joined: 17.06.2020, 10:55
- Location: Italy
Re: wrong fields
How can I debug the components? I'll try to look up what the problem might be too
Re: wrong fields
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.
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
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
- cappelletto
- Fresh Boarder
- Posts: 18
- Joined: 17.06.2020, 10:55
- Location: Italy
Re: wrong fields
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.
- cappelletto
- Fresh Boarder
- Posts: 18
- Joined: 17.06.2020, 10:55
- Location: Italy
Re: wrong fields
I am interested in lazarus 2.3, delphi I do not use.
- cappelletto
- Fresh Boarder
- Posts: 18
- Joined: 17.06.2020, 10:55
- Location: Italy
Re: wrong fields
Last thing, with Zeos 7.2.x it works.
- cappelletto
- Fresh Boarder
- Posts: 18
- Joined: 17.06.2020, 10:55
- Location: Italy
Re: wrong fields
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
I will try to go deeper but I am having difficulty.
Now correct You. The database has only one record
You do not have the required permissions to view the files attached to this post.