Database events with ZIBEventAlerter

In this forum you may discuss all issues concerning the Lazarus IDE and Freepascal (both running on Windows or Linux).

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
MRN
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 31.12.2022, 01:08

Database events with ZIBEventAlerter

Post by MRN »

Hello guys.
How was Christmas?
I already wish happy new year -> 2023 :D
-------------------------------------------------- --
I'm migrating from IBO to ZEos because of Charset and upgrade to Lazarus.
I was only able to use IBO with Lazarus version 2.0.8, but in Win1252 the blob texts are displayed normally but the dbedits and DBgrids with character problems. :(
-------------------------------------------------- --------------------
IBO's IB_Events is perfect in Lazarus 2.0.8

Zeos ZIBEventAlerter with me didn't work for me. Violation error only. Tested Zeos: 7.2.8, 7.2.14 and 8 Beta
Lazarus: 2. 08, 20, 22 and 24 and no hits. :cry:

Could you show me a demo working with FB 3? :?:

I don't want to use timer
---------------------------------------------------------------------------------------------------
In the DataModule of the IB_Event

With IBO --> In the DataModule of the IB_Event

Begin
Try
IB_Events1.RegisterEvents;
Except
IB_Events1.UnRegisterEvents;
Application.MessageBox(pchar('Error'),
'Message', MB_OK + MB_ICONINFORMATION);
End;
End;

With IBO --> In IB_Events1EventAlert

If Not (IBOquery1.State in [dsEdit, dsInsert]) Then
Begin
IBO>> If (AEventName = 'event') Then
Zeos>> If (EventName = 'event') Then
Begin
IBOquery1.Refresh;
End;


Thanks
You do not have the required permissions to view the files attached to this post.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1916
Joined: 17.01.2011, 14:17

Re: Database events with ZIBEventAlerter

Post by marsupilami »

Hello MRN,

could you please try to create a small sample program and a small sample database that demonstrate the problem? This really helpswhen debugging.

I seem to remember that there was an issue with this in 64 bits applilcations that didn't happen on 32 bits applications. Could you lpease try what happens if you generate a 32 bits application?

Best regards,

Jan
MRN
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 31.12.2022, 01:08

Re: Database events with ZIBEventAlerter

Post by MRN »

Sorry I duplicated this post.

I will create the example and post. Thanks!

Here windows 10 pro 64 bit
FB 3 32 Bit
Tested on Lazarus 208 ---> 224 32-bit
Also tested on Lazarus 224 64 bits
MRN
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 31.12.2022, 01:08

Re: Database events with ZIBEventAlerter

Post by MRN »

Hi!

Actually creating a demo to post was pretty daunting. :shock:

- I created a database with 1 table and 1 trigger
- I put the components and the errors appeared.
- I put the commands in their places
Even the 224 with Zeos 8.0 Beta and the error did not appear.

I'll look in my App if there's anything different from my Demo.

I will return to inform. :wink:

Thanks.
MRN
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 31.12.2022, 01:08

Re: Database events with ZIBEventAlerter

Post by MRN »

Come on.

Not sure but:

1) I may have mixed fblient on my server. I have 2 FB.

2) Handling the UnRegisterEvents before the connection is closed or otherwise.

I will close the topic and review everything;

I hope the mistake is 100% mine.

Thanks. :)
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1916
Joined: 17.01.2011, 14:17

Re: Database events with ZIBEventAlerter

Post by marsupilami »

Ok, no problem :)
Post Reply