I am interested in this question: how to handle a FireBird error about not filling fields with the property
not null ? The essence of the problem lies in the fact that I have a form on which there is a button that makes commit transactions, and
dbedit , which in turn is associated with a field that has the property
not null . Clicking the commit button, while leaving dbedit empty, I get a FireBird error. Is it possible to somehow intercept this error and write your own text in it?
Thank you in advance for your response.
it is better to check the blankness of the fields not in the subd, but before the commit.
procedure MyProc; begin ... if dbedit.text <> '' then // делаем коммит ... else // не делаем коммит ... end;
Even if not such, but a preliminary check of the required fields must be filled.
Explain, please, what button do you mean: button DBNavigator nbPost or normal Button? In the first case, there is a variable in the Navigator's OnClick handler that corresponds to the Navigator buttons. And in the second - also OnClick. Check the field for emptiness in these handlers, and that's it.