Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter and 'The BeforeUpdate event has failed' me
Message
De
30/05/2003 13:26:20
 
 
À
30/05/2003 11:58:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00794091
Message ID:
00794628
Vues:
18
>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
Fil
Voir

Click here to load this message in the networking platform