Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'File in use' error
Message
From
26/04/2005 15:22:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
'File in use' error
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01008590
Message ID:
01008590
Views:
66
hello everybody.

does anyone have an idea why the following errors "File In Use" on the 2 delete comands?
the created form releases fine, exits, and the code (the delete comands) are executed, but fail.
		LOCAL ;
			SaveInPath, ;
			VcxName, ;
			ClassName

		SaveInPath	= GetPath("TEMP", .T.)
		VcxName		= SUBS(SYS(2015), 2) + ".vcx"
		ClassName	= "MSChartTempClass"
		THISFORM.Pageframe1.ReportGraph_Page.Chartarea1.SAVEASCLASS(SaveInPath + VcxName, ClassName, "")

		THISFORM.VISIBLE		= .F.
		THISFORM.WINDOWSTATE = 0

		FullSizeDisplay = NEWOBJECT("FullSizeDisplay", THIS.CLASSLIBRARY)
		set classlib to (SaveInPath + VcxName) addi
		*FullSizeDisplay.NEWOBJECT(ClassName, ClassName, (SaveInPath + VcxName))
		FullSizeDisplay.AddOBJECT(ClassName, ClassName)
		FullSizeDisplay.LOCKSCREEN				= .T.
		FullSizeDisplay.VISIBLE					= .T.
		FullSizeDisplay.oCallingForm			= ThisForm
		FullSizeDisplay.&ClassName..TOP		= 0
		FullSizeDisplay.&ClassName..LEFT		= 0
		FullSizeDisplay.&ClassName..WIDTH	= FullSizeDisplay.WIDTH
		FullSizeDisplay.&ClassName..HEIGHT	= FullSizeDisplay.HEIGHT
		FullSizeDisplay.&ClassName..VISIBLE	= .T.
		FullSizeDisplay.LOCKSCREEN				= .F.
		FullSizeDisplay.SHOW(1)

		* *** clean up
		FullSizeDisplay = .NULL.
		RELEASE CLASSLIB (SaveInPath + VcxName)
		* *** for some reason the delete command
		* *** errors "file in use"
		*clear CLASSLIB (SaveInPath + VcxName)
		DELETE FILE (SaveInPath + VcxName)
		DELETE FILE (SaveInPath + JUSTSTEM(VcxName) + ".vct")

		THISFORM.VISIBLE = .T.
thanks for all your help!
Next
Reply
Map
View

Click here to load this message in the networking platform