Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ERASE does not work all the time in VFP 5
Message
From
23/11/1996 16:49:06
 
 
To
23/11/1996 11:33:23
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00013241
Message ID:
00013274
Views:
28
>Now, that I have converted my application to VFP 5, I have found that the ERASE command is not working all the time.
>
>Sometimes, it return "File access is denied". There is no way the file can be use by someone else. Like I said, this was working 100% in VFP 3 and now it only works about 999 times out of 1000.

Hmmm...I decided to run a test on it...and it didn't report any errors.
m_C = 1100
For i = 1 TO m_C
	fp = FCreate("C:\Junk.TXT", "W") && Local primary drive
	=FPuts(fp, "This is a test")
	=FClose(fp)
	Erase File C:\Junk.TXT
	Wait Window NoWait "Loop #" + LTrim(Str(i))
Next i

For i = 1 TO m_C
	fp = FCreate("D:\Junk.TXT", "W") && Local secondary drive
	=FPuts(fp, "This is a test")
	=FClose(fp)
	Erase File D:\Junk.TXT
	Wait Window NoWait "Loop #" + LTrim(Str(i))
Next i

For i = 1 TO m_C
	fp = FCreate("F:\Robert_D\Junk.TXT", "W") && Novell 3.11 drive
	=FPuts(fp, "This is a test")
	=FClose(fp)
	Erase File F:\Robert_D\Junk.TXT
	Wait Window NoWait "Loop #" + LTrim(Str(i))
Next i
What else could be wrong??? Beats me :)
Some things are better be left unknown...NOT!!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform