Page 1 of 1

Before Post,Before Insert, On error

Posted: 18.08.2012, 00:17
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 ?

Posted: 18.08.2012, 16:26
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