Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

visual foxpro - ole ....... not registered in the library

Status
Not open for further replies.

kristover

Programmer
Jun 20, 2016
2
NG
I am running vfp6 on window 8. I typed in 'application = .f.'. when am executing my program , it brings error message 'ole 02x800......... not registered in the Library'

please whats the solution
 
Well, application is a reserved word, it is an object existing globally.

Start VFP, in the command window do
Code:
? Application

This should display (Object) on the screen.
Choose another name for your variable.

Bye, Olaf.

PS: Application mainly is the same as _VFP, if you set _vfp.caption you set the _screen caption and also Application.Caption will be that caption. So _VFP, _SCREEN and Application are somewhat interconnected objects, you can't use any of these as names for own variables and they are related to VFP being OLE automatable itself, ie o = CREATEOBJECT("VisualFoxpro.Application") works for automating VFP.
 
The message which I see if I type [tt]Application = .F.[/tt] is "Cannot redefine Application". This makes perfect sense, since Application is a pre-defined object.

I don't know where your "not registered in library" error is coming from - unless that was the standared error message for this situation in VFP 6. But, in any case, if you are trying to use [tt]Application[/tt] as a variable, the solution is to choose a different name for the variable.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Just for the record: in VFP6, the error is the same as in VFP9 ("Cannot redefine Application").
 
Just for the record: in VFP6, the error is the same as in VFP9 ("Cannot redefine Application").

That's useful to know. It indicates that he is doing something more than trying to set a variable named Application to .F. Some ActiveX control is being used perhaps.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top