Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>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
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