Page 1 of 1

Delphi 2007 zeos 6.6.6 Mariadb 5.7 sql update problem

Posted: 15.09.2023, 16:53
by Daniele70
Hello! An update SQL executed successfully in the same work session sometimes does not update the corresponding data. I noticed that this happens especially if the table contains a certain amount of data (1000 or more records). I tried to simulate this in another test program with a table containing several tens of thousands of records but I was unable to replicate the problem. I'm afraid finding the cause is very difficult so I ask: what is the correct method to verify that the update sql executed through TZQuery.ExecSQL has been completed?
I already tried with RowAffected but it didn't solve it.
Maybe using a transaction would fix it? Or are there other methods?
I recognize that both the Zeoslib and MariaDB versions are a bit outdated but we cannot update at the moment.
Delphi 2007, Zeoslib 6.6.6 Mariadb 5.7 Windows 10 pro.

Re: Delphi 2007 zeos 6.6.6 Mariadb 5.7 sql update problem

Posted: 20.09.2023, 08:27
by marsupilami
Hello Daniele,

You could hook a TZSqlMonitor to your connextion and see if the statement gets executed. If it is in the log, it gets executed and you will have to take a look at the database side.

Also it makes ense to look at the transaction management: Maybe the statement gets executed but the transaction gets rolled back for some reason.

With best regards,

Jan

Re: Delphi 2007 zeos 6.6.6 Mariadb 5.7 sql update problem

Posted: 01.10.2023, 08:44
by Daniele70
Thank you very much, I will follow your suggestions.