Thanks,Edward. That's a simple solution I can put in place right away. I'm always reluctant to open my TRO-based error handler until I know _exactly_ what I'm going to do. You've bought me the time to get smarter.
-Porter
>>I've a multi-user app on which one user occasionally needs exclusive use of one table. If another user has that table open, the exclusive open fails with a 1977 error. So how can user A tell whether user B has that table open--without shouting across the room?
>>
>>If the above circumstance cannot be detected, could anyone offer a production-quality routine to trap the resulting error? To date, I've received only error 1977, but the message for 110 also sounds possible.
>>
>>An FPW26-based solution would also be of interest.
>>
>>TIA
>>Porter Hart
>
>The primitive trap is simple enough:
>lErrorflag=.f.
>cError=on('error')
>on error lErrorflag=.t.
>*** run your command here
>on error &cError.
>If lErrorflag=.t.
>=messagebox('You got an error!')
>*** do something here, you may use ERROR() function to show/analyze error number
>Endif
>
>The more sophisticated way is to put some code (e.g. to check error number) to object.error event (this event will be triggered when error happens within this object's event/methods).
Précédent
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