Specifies whether Visual FoxPro searches the OLE Registry when an object cannot be located.
Syntax
SET OLEOBJECT ON | OFF
Arguments
ON
(Default) Specifies that Visual FoxPro searches the OLE Registry when an object cannot be located.
OFF
Specifies that Visual FoxPro does not search the OLE Registry when an object cannot be located.
Remarks
When an object is created with CREATEOBJECT( ) or GETOBJECT( ), Visual FoxPro searches for the object in the following locations and order:
When Visual FoxPro searches for an object, the OLE Registry is searched last. Visual FoxPro loads OLE support before it searches the OLE Registry, increasing the amount of memory required by Visual FoxPro and reducing the amount of memory available to other applications.
If you are developing an application that does not require OLE support, issue SET OLEOBJECT OFF to prevent Visual FoxPro from searching the OLE Registry when an object cannot be located.
SET OLEOBJECT does not affect OLE objects in Forms or General fields. Visual FoxPro always loads OLE support when a Form containing an OLE object is opened for modification or is instantiated, or a table with a general field is opened.
Because GETOBJECT( ) activates an OLE object, Visual FoxPro generates an error when GETOBJECT( ) is issued and SET OLEOBJECT is OFF.