Before Post,Before Insert, On error

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Before Post,Before Insert, On error

Post by sfxcc »

Inserting a record on a table the events Before Post,Before Insert ,On error arent executed if we have required fields as null on a table , this should be triggered before even the dataset do check the required fields and raise the exception.


Im trying to show my own error boxes, so i tried it on this events get the required fields and show a list instead of the default exception dialog.


Any idea to turn around this problem ?
where's the code ..
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

sfxcc,

Hum that's a good question. I don't think there is a generic way to suppress the exceptions.

Does this mean the Before Insert/Edit/OnError events do NOT work like expected? Did you try to use TZQuery.CachedUpdates := True; ? This avoids the posting to the db and commiting the changes. So you can check all Fields by your selves and exec ApplyUpdates afterwards.

Is that what you want to know?

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Locked