14.1 Automation-specific errors

Automation-specific errors

Fortunately for us, there are a limited number of VFP errors that are specific to Automation. Table 1 shows a list of all the Automation-specific errors. As you can see from their descriptions, the error messages refer to Automation s roots in OLE.

Table 1. The Automation errors you ll need to get used to seeing.

Error number

Error description

1420

OLE object is invalid or corrupted.

1421

Cannot activate the OLE server.

1423

Error creating the OLE object.

1424

Error copying the OLE object to Clipboard.

1426

OLE error code 0x "name".

1427

OLE IDispatch exception code "name".

1428

OLE IDispatch exception code "number" from "server": "name".

1429

"OLE error".

1440

OLE exception error "name". OLE object may be corrupt.

The most common errors are 1426 1429, which generally indicate that the server has a problem with the property being set or the method being executed. The other errors indicate a problem with the server application itself, such as a problem finding the server. Errors 1420, 1421, and 1423 happen when the object is instantiated, when CreateObject() or GetObject() is called. Error 1424 happens only when copying to the clipboard; if you don t copy an object to the clipboard (as in Chapter 13, "Inter-Office Communication"), you don t have to worry about this error. Error 1440 is new to VFP 6.0 and indicates that the server has caused a general protection fault, and the instance is no longer available.

 

Copyright 2000 by Tamar E. Granor and Della Martin All Rights Reserved



Microsoft Office Automation with Visual FoxPro
Microsoft Office Automation with Visual FoxPro
ISBN: 0965509303
EAN: 2147483647
Year: 2000
Pages: 128

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net