keepingbusy
Programmer
Hi all
As part of an app, DBF's are created by simply using:
Slight problem is sometimes, the tempfile gets left behind by the user who has either switched off (yes people stll do that) or worse still, a system crash, before the code gets a chance to:
As SYS(3) generates a random 8 number digit we thought of trying to resolve this using a couple of lines at the start of a PRG such as:
The only problem with this would be that if one of the sys(3) numbers is already in use by another, you cannot delete it (and obviously wouldn't want to delete it if its in use by another).
This doesn't happen too often, but as I'm sure your aware, over a period of time the 8 digit DBF's build up using valuable disc space.
This app is version 6
Any suggestions guys?
Many thanks
Lee
Visual FoxPro Versions: 6 & 9
Operating System: Windows XP
As part of an app, DBF's are created by simply using:
Code:
tempfile=SYS(3)
USE MYFILE
copy stru to tempfile+'.dbf'
Code:
dele file tempfile+'.dbf'
As SYS(3) generates a random 8 number digit we thought of trying to resolve this using a couple of lines at the start of a PRG such as:
Code:
dele file 1*.*
dele file 2*.*
etc
This doesn't happen too often, but as I'm sure your aware, over a period of time the 8 digit DBF's build up using valuable disc space.
This app is version 6
Any suggestions guys?
Many thanks
Lee
Visual FoxPro Versions: 6 & 9
Operating System: Windows XP