Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a cursor at run-time
Message
From
12/05/2015 15:31:27
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01619659
Message ID:
01619689
Views:
38
In my startup program, I have code to delete every file in the VFP specific temp folder which are older than two days.

>This is exactly what I thought. And the customer IT said that there are 42,000 items in the TEMP folder of the PC. I don't know if this is too many. I was just trying to figure if there is possible a problem with my code. Of course, I can ask the IT person to clean up the TEMP folder. But I thought also that maybe I can set the application always overwrite the existing file, when the program tries to create a DBF/CDX files. From Sergey's answer it appears that there is nothing wrong with my code. Then, must be just rare case of the same file already created.
>Thank you.
>
>>Some people don't realize that over time orphaned temp files accumulate and need to be periodically deleted. I've seen cases where this hasn't been done for several years, and thousands of temp files have accumulated. In those cases it's rare, but not impossible that VFP might want to create a temp file based on the system time, and end up with a collision with a file that already exists.
>>
>>The few times I've seen this happen, I ask the client to check their temp files folder, there have always been tons of files there.
>>
>>>Thank you. Therefore I understand the I don't need to change my code of creating this cursor, in order to make the file name unique.
>>>
>>>>VFP may not create a physcal dbf at all but when it does, it's in VFP temporary folder with some temp name which suppose to be unique
>>>>
>>>>>
>>>>>If I am creating a temporary cursor as follows:
>>>>>
>>>>>
>>>>>CREATE CURSOR CUR_TBLNAME (.. list of columns in the cursor )
>>>>>
>>>>>
>>>>>does VFP create this cursor in a TEMP folder as a random name (physical dbf file) or it always going to be the same name?
>>>>>
>>>>>The reason I am asking is one customer a few days ago ran into a problem where when creating an index tag for this temp cursor they were getting the message that the .cdx file already existed. Non other customers ever got this problem. I am thinking that it could be because of a glitch with the customer that had a problem. Or maybe I am not creating the cursor with a truly random .dbf file name.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform