Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sharing violation error.
Message
From
01/06/2001 12:32:38
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Sharing violation error.
Miscellaneous
Thread ID:
00513902
Message ID:
00513902
Views:
394
Hi,

I have been plagued by the following intermitent error when trying to append data from Excel work sheets into foxpro tables.

"OLE error code 0x80030020: A share violation has occurred."

It doesn't seem to occur with any pattern, just regularily! However, it seems that it doesn't occur when the program is being debugged. The line of code used is this;

APPEND FROM "&lcNewAppend" XL5 SHEET &lcSheet

lcNewAppend being the name of the excel file and lcSheet being the name of the individual sheet.

Previous to command being issued the program creates a copy of the excel file, opens it via creatobject(), removes spaces from the names of each worksheet within that workbook and saves it as XL5 file format. The object reference is then quit and released. There is no possibility of the file being in use by another source as the program uses the copy of the original file. Could it be that foxpro retains something in memory refering to individual sheets or the workbook even after the instance of excel has been released???? How come it seems to work ok when stepping through using the debugger?? Would cusing a pause in the program help???

Cheers for any assistance,

Lee.
Next
Reply
Map
View

Click here to load this message in the networking platform