Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RecordManager class
Message
From
07/08/2012 15:26:02
 
 
To
07/08/2012 15:04:38
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01550048
Message ID:
01550081
Views:
73
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform