>I had tried to use the ERROR() function insted of MESSAGEBOX and RETURN .F.
>It works fine if your code call explicit the TABLEUPDATE function. But the problem that I mentioned is when you move to other record (for example, if the user click in other line in the grid) then VFP will fire the TABLEUPDATE. And in this situation, if you use ERROR(), VFP will jump the RETURN .F. line and will update the record anyway (it shouldn´t happen, because I raise a error using ERROR()).
>I try to do something in the Error event of CursorAdpter, but with no solution.
>I didn´t find any other way to stop the tableupdate that was fired by VFP instead of run a RETURN .F. in BeforeUpdate event. And it give the "bad" message that I mentioned.
>Maybe I am doing something wrong, or I didn´t undertand well your idea.
>
Hi Ricardo,
This behavior doesn't sound right. Looks like the error is handled by ON ERROR handler or by CursorAdapter.Error event and it is not propagated to CursorAdapter. Make sure your ON ERROR handler and CursorAdapter.Error event don't "eat" the error.
Thanks,
Aleksey.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement