Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I check for and error when i read from the regisr
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00758995
Message ID:
00759001
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform