Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RecordManager class
Message
De
07/08/2012 15:26:02
 
 
À
07/08/2012 15:04:38
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01550048
Message ID:
01550081
Vues:
71
>>>Borislav,
>>>
>>>>TABLEUPDATE and TABLEREVER will never raise an error.
>>>>They will return .t./.f. you must use AERROR() instead of TRY and CATCH block.
>>>
>>>There is at least a problem with raising an error in a CursorAdapter while saving. If not having a TRY CATCH in place around the TABLEUPDATE(), it will make the calling method/function dead. So for safety reasons, I wrapped it in a TRY CATCH. If it returns .F. you still can examine AERROR().
>>
>>for better granulartiy check the hook methods called on each record - there is a flag if update was successful.
>>Much easier to zoom in on the !"§$%& record....
>
>Sorry thomas, but you lost me here... which hook method?

The .AfterUpdate is called for each record written back to the datastore - and in the lResult
you see if the record saved correctly. So finding the offending record gets easy -
or you log of each record in .beforeUpdate and finsih the log line in AfterUpdate depending on lResult.

So more info is already available if tableupdate fails.
Other errorhandling is tried at the cursoradapter level.

regards

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform