Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
In VFP can i use On error goto Errorhandler like VB
Message
De
20/05/2003 10:20:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
In VFP can i use On error goto Errorhandler like VB
Divers
Thread ID:
00790450
Message ID:
00790450
Vues:
60
Can i use like VB on error goto mapierror in VFP
The following Please:
********************Start******************
On Error GoTo mapiError

WAIT WINDOW NOWAIT "Please wait ... Logging Into Mail" NOCLEAR

WITH thisformset.basicform1
PUBLIC array ErrorArray(1)
&&PUBLIC mapierror
local lcCRLF
* Define constant
*#DEFINE CRLF CHR(13) + CHR(10)
*or define variable
lcCRLF = CHR(13) + CHR(10)

IF NOT .oleSession.SessionID > 0
.oleSession.Signon
ENDIF

* If the session ID is not valid, do not allow the form to load
IF .oleSession.SessionID > 0
WAIT clear
.oleMessage.SessionID = .oleSession.SessionID
* Start a new message
mRev_Com = sub_revw.comment
.oleMessage.Compose
.oleMessage.RecipIndex = 0
.oleMessage.AddressResolveUI = .T.
.oleMessage.RecipDisplayName = ALLTRIM(sub_revw.reviewer)
.oleMessage.ResolveName
ELSE
WAIT WINDOW "Form Cannot Load: Login Failed"
ENDIF
mapiError:
aError(ErrorArray)
IF ErrorArray(1,1) = 1429 && mapi error
MapiError = ErrorArray(1,6)
ELSE
MESSAGEBOX("ERROR HAS OCCURED "+ MESSAGE())
ENDIF
RETURN

*************************END****************************
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform