Recent

Author Topic: Release of Zeos 8.0.0  (Read 8935 times)

marsupilami79

  • New Member
  • *
  • Posts: 38
Re: Release of Zeos 8.0.0
« Reply #15 on: April 12, 2024, 03:01:37 pm »
I use a lot of persistent fields to control the grid layout, but only one as a float field it seems, which symbolises hours spent on a project.
I had this problem at one of the previous Zeos upgrades (6.6->7.0 or 7.1->7.2 or ...). I decided to not have persistent fields and instead do the modifications in the AfterOpen event of the datasets. That saves me a lot of trouble, I think (hope?).

Hi @all.
I wonder if this release support DEFACTO the encryption on SQLITE database.
I mean the use of https://github.com/utelle/SQLite3MultipleCiphers.
Duh - I seem to remember that discussion. But I also seem to remember that this modification never oficially made it into Zeos 7.2?
Zeos developer

BSaidus

  • Hero Member
  • *****
  • Posts: 560
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Release of Zeos 8.0.0
« Reply #16 on: April 12, 2024, 09:24:35 pm »
Hi @all.
I wonder if this release support DEFACTO the encryption on SQLITE database.
I mean the use of https://github.com/utelle/SQLite3MultipleCiphers.
Duh - I seem to remember that discussion. But I also seem to remember that this modification never oficially made it into Zeos 7.2?

It is me that made some modification on the Sqlite driver ( not in 7.2.17 official ) on my working copy.

Thank you anyway.
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

ginoo

  • Jr. Member
  • **
  • Posts: 64
Re: Release of Zeos 8.0.0
« Reply #17 on: April 13, 2024, 11:44:36 am »
After upgrading to zeos 8 it worked but now when I launch the program it tells me class "TZDoubleField" not found in LResources.
How do I solve it?

I am doing some testing, in new projects it works.

UPDATE
The problem occurs on a project ported from zeos 7.2.x. The strange thing is that it worked first but then it started giving this error. What could it be? At design time it works correctly, the problem appears when the zeos components are created at runtime
« Last Edit: April 13, 2024, 07:40:11 pm by ginoo »

ginoo

  • Jr. Member
  • **
  • Posts: 64
Re: Release of Zeos 8.0.0
« Reply #18 on: April 14, 2024, 11:09:16 am »
By regenerating the persistent fields, the problem disappeared. This is strange, I'll see if I can figure out the cause

UPDATE
Works.
« Last Edit: April 15, 2024, 07:10:28 am by ginoo »

kkuba

  • New Member
  • *
  • Posts: 48
Re: Release of Zeos 8.0.0
« Reply #19 on: May 06, 2024, 09:34:03 pm »
I did migrating of a large project to ZeosLib 8 from version 7. It is faster, there are new possibilities. However, I will focus on the faults. In version 8 there are fundamental problems in the interval type support, which can make your hair grey.  Here are some of my observations and my few tips on how to get out of this until it will be patched
I am using Postgres 14. ZeosLib 7.x interpreted the interval fields correctly and returned a string, which is what the Postgres Development Group recommended.
In version 8 everything is broken and unfortunately random data are returned, which can even cause your application to crash. Try entering a value like 170:44:12 into the database and see what happens. I recommend the try except block, as you may raise a critical exception (in version 7.x the same code works fine). However, if you already successfully execute ZQuery (the errors are in addition random) you will see…. additional milliseconds in DBGrid, no matter what you have set in formatting. 
Massacre...  >:D
Ok but how do you get out of this? You should do following steps:
1. You have to start by eliminating those nasty milliseconds. This is actually easy because there are undocumented properties of ZConnection. So in properties you need to set:
TimeReadFormat=HH:NN:SS
TimeWriteFormat=HH:NN:SS
This is not a mistake but another bug in ZEosLib 8.x - the correct formatting syntax [HH] does not work. Happily, the HH formatting also works with times exceeding 24h. Hurray milliseconds are gone!
2. Now it will be more difficult. Suppose you have a "timeiv" variable of type interval in table t.
In version 8, both normal references and function results are bad handled. In the second case it is worse because Zeos will additionally create faulty field definitions instead of RawStrings. Therefore the code should be corrected before ZeosLib automatically creates the fields in the source code. Even setting the properties DisableZFields will not help!
To get out of this you have to improve the SQL by adding CAST:
t.timeiv does not work correctly with ZeosLib 8.x
CAST(t.timeiv) AS character varying(255)) works fine
SUM(t.timeiv) causes a crash test of our application
CAST(SUM(t.timeiv) AS character varying(255)) works great.
3. For the reasons described above, only now (after steps 1 and 2) you can automatically create the fields definitions. In ZeosLib, as I mentioned before, it doesn't matter if you create fields of new or old type. Without the above fixes you can expect your application to work randomly with interval fields.
4. What about the ZQuery that have to write to the database? CAST obviously doesn't work here (because the fields will be read-only). Therefore, after automatic generation by Zeos, we need to change the definition of each field storing the interval value by setting the size to 255.

But if you do these fixes you should have a working application, resistant to changes in ZeosLIb :D
By the way, these particular bugs in ZeosLib are surprising and can give you a hard time. They gave me... They blew up my entire billing application, and it took an infinite amount of time to discover the problem. I only hope that my comments will be of useful to someone.
« Last Edit: May 07, 2024, 08:11:48 am by kkuba »

 

TinyPortal © 2005-2018