Search found 19 matches

by atendimentobed
17.05.2023, 16:48
Forum: ZeosLib 7.3/8.0 Forum
Topic: Access violation in ZQuery.Refresh
Replies: 10
Views: 683

Re: Access violation in ZQuery.Refresh

So - you insert a record but provide no value for the ID field. Zeos assumes that the value is null. Also you don't have a valid RefreshSQL in TZUpdateSQL. So Zeos tries to fetch a record but since the key value (id) is nil, it will not get a record from MySQL. Hi my friend... I was looking at your...
by atendimentobed
17.05.2023, 16:31
Forum: ZeosLib 7.3/8.0 Forum
Topic: Data clear after canceling ZQuery
Replies: 8
Views: 542

Re: Data clear after canceling ZQuery

Hi marsupilami,

How are you?

Any news about this bug?
by atendimentobed
15.05.2023, 13:57
Forum: ZeosLib 7.3/8.0 Forum
Topic: Access violation in ZQuery.Refresh
Replies: 10
Views: 683

Re: Access violation in ZQuery.Refresh

Hi marsupilami,

Nice, I didn't know... I always used ZUpdateSQL without needing. Thx for explanation.

Do you have any examples of using RefreshSQL in ZUpdateSQL so I can better understand when and how to use it?
by atendimentobed
11.05.2023, 13:51
Forum: ZeosLib 7.3/8.0 Forum
Topic: Access violation in ZQuery.Refresh
Replies: 10
Views: 683

Re: Access violation in ZQuery.Refresh

Hi marsupilami,

Thx for explanation...

I always used ZUpdateSQL filling InsertSQL, ModifySQL and DeleteSQL because I thought it was necessary for ZQuery1.Append, ZQuery1.Edit, ZQuery1.Delete, ZQuery1.Post to work. It is not necessary?
by atendimentobed
10.05.2023, 13:59
Forum: ZeosLib 7.3/8.0 Forum
Topic: Access violation in ZQuery.Refresh
Replies: 10
Views: 683

Re: Access violation in ZQuery.Refresh

Hi marsupilami, My project already has more than 100 ZUpdateSQL, I can't stop using it. My question is about the purpose of ZUpdateSQL's RefreshSQL property, I didn't quite understand the purpose. The InsertSQL and ModifySQL commands, for example, occur at the time of ZQuery1.Post, depending on whet...
by atendimentobed
09.05.2023, 16:25
Forum: ZeosLib 7.3/8.0 Forum
Topic: Access violation in ZQuery.Refresh
Replies: 10
Views: 683

Re: Access violation in ZQuery.Refresh

Hi marsupilami, Thx for your explanation. In fact, I didn't even know about this RefreshSQL property in ZUpdateSQL, because in the previous version I never used it and it never gave an error (Delphi 2010 + Zeos 7.1.4 stable). I just filled in DeleteSQL, InsertSQL and ModifySQL and automatically foll...
by atendimentobed
05.05.2023, 14:39
Forum: ZeosLib 7.3/8.0 Forum
Topic: Access violation in ZQuery.Refresh
Replies: 10
Views: 683

Access violation in ZQuery.Refresh

Hi, After migrating a project to Delphi 11.2 + MySQL 5.0 + Zeos 8.0 I noticed other strange behavior that did not occur previously in the 7.1.4-stable version of Zeos used in Delphi 2010. To make it easier, I reproduced the problem in a simple scenario. Project Delphi: https://mega.nz/file/PBM3XYJb#...
by atendimentobed
05.05.2023, 13:31
Forum: ZeosLib 7.3/8.0 Forum
Topic: Capture moment of reconnection - does not work
Replies: 13
Views: 753

Re: Capture moment of reconnection - does not work

If I understand your issue correctly, it is not going to happen. The client side is not getting notified that a connection was dropped, it always realizes it the next time some action is ran against the server; e.g. opening a new dataset, refreshing contents, etc. The closest you can get is to have...
by atendimentobed
05.05.2023, 13:13
Forum: ZeosLib 7.3/8.0 Forum
Topic: Capture moment of reconnection - does not work
Replies: 13
Views: 753

Re: Capture moment of reconnection - does not work

The first behavior with the EZDatabaseConnectionLostError is the expected behavior. Maybe you want to upgrade your client and see what happens. You could test the Mariadb Connector/C. Hi, Yes, the first behavior is really what I expected too, but when I enabled the option ZConnection1.Properties.Ad...
by atendimentobed
04.05.2023, 14:36
Forum: ZeosLib 7.3/8.0 Forum
Topic: Capture moment of reconnection - does not work
Replies: 13
Views: 753

Re: Capture moment of reconnection - does not work

I discovered an "interesting" behavior: Whith ZConnection1.Properties.Add('MYSQL_OPT_RECONNECT=0'), if I kill the MySQL process with the program open and try to open a screen with a grid, an exception is generated before opening the screen, but then the reconnection occurs and the items ar...
by atendimentobed
04.05.2023, 14:17
Forum: ZeosLib 7.3/8.0 Forum
Topic: Capture moment of reconnection - does not work
Replies: 13
Views: 753

Re: Capture moment of reconnection - does not work

I forgot to mention that also test the value "MYSQL_OPT_RECONNECT=0"
by atendimentobed
04.05.2023, 14:16
Forum: ZeosLib 7.3/8.0 Forum
Topic: Capture moment of reconnection - does not work
Replies: 13
Views: 753

Re: Capture moment of reconnection - does not work

marsupilami wrote: 04.05.2023, 06:15 Something like this could work:

Code: Select all

  ZConnection.Properties.Add('MYSQL_OPT_RECONNECT=false')
Hi marsupilami,

Good idea, but it didn't work.

If the DLL is handling the reconnection, it simply ignored the property passed to the ZConnection.
by atendimentobed
04.05.2023, 13:23
Forum: ZeosLib 7.3/8.0 Forum
Topic: Data clear after canceling ZQuery
Replies: 8
Views: 542

Re: Data clear after canceling ZQuery

I can confirm the bug. What's even more confusing: It doesn't happen when a DBGrid is connected to the Query. I have no clue yet what the problem is. Hi, This is a pretty common scenario, a basic CRUD screen. But I couldn't find anyone else who reported this issue, that's why I opened this topic.
by atendimentobed
03.05.2023, 17:53
Forum: ZeosLib 7.3/8.0 Forum
Topic: Capture moment of reconnection - does not work
Replies: 13
Views: 753

Re: Capture moment of reconnection - does not work

No - as far as I know, you cannot. libmysql doesn't tell us whan that happens. You could try to explicitly set MYSQL_OPT_RECONNECT to false / 0. Then you should get an error and can do the reconnect yourself using Zeos. Hi marsupilami, thx... Where can I explicitly set MYSQL_OPT_RECONNECT to false/...
by atendimentobed
03.05.2023, 17:03
Forum: ZeosLib 7.3/8.0 Forum
Topic: Data clear after canceling ZQuery
Replies: 8
Views: 542

Re: Data clear after canceling ZQuery

miab3 wrote: 03.05.2023, 10:44 And where is ZQuery1.Post?

Michal
Hi,

To simplify the explanation, I didn't put ZQuery1.Post in the example, because the problem happens only in ZQuery1.Cancel.