Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I check for and error when i read from the regisr
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00758995
Message ID:
00759001
Vues:
22
>I'm using the following syntax to read and write from the registry
>
>IF VARTYPE(goRegMgr) # "O"
> RELEASE goRegMgr
> PUBLIC goRegMgr
> goRegMgr = CREATEOBJECT('WScript.Shell')
>ENDIF
>
>a = "some registry key"
>
>lcval = goRegMgr.regread(a)
>
>lcval = goRegMgr.regwrite(a)
>
>lcval = goRegMgr.regdelete(a)
>
>How do I trap an error if the key I am reading or deleting does not exist?
>When I read a key that does not exist i get some ole error, but i do not know how to evaluate it or trap of it.
>
>Would appreciate some help with this.
>
>Regards,
>
Stuart,

This sort of error trapping is better handled with the registry class from the FFC. In scripting the err object is available. It isn't in VFP.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform