General information
Category:
Coding, syntax & commands
I took your suggestion(s) and tried putting an ON ERROR DO texterr statement in the control's (a textbox) gotfocus event. That didn't call my error routine so instead I used the control's error event, tested for error number 1582 and then used dbGetProp() to retrieve the error message text from the DBC. That works fine and for now satisfies my curiosity. Thanks for the help.
>>>In my opinion, this is the way to do it...a global error handler should be set-up and this is one of the errors it could handle....
>>>
>>>Joe
>>>
>>>
>>>>Try using an error handler
>>>>
>>>>on error do errhandler()
>>>>
>>>>errhandler()
>>>>
>>>>if error() = 1582
>>>>
>>>>
>>>>endif
>>>>
>>>>
>>>>1582 I think is the error number for a field validation error. You can check in the help contents of Visual Foxpro under the Technical Reference.
>>
>>Excuse me on this, but is this not a non-oop way of handling it?? I would think the form or whatever is doingthe update to the table/column should handle the error as apposed to GLOBAL error handler..
>>
>>Am I wrong here??
>
>
>You're correct. The error should be handled by the object.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only