Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tip o' the Day: ALTER TABLE on a Cursor
Message
From
17/02/2001 20:55:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00476591
Message ID:
00477070
Views:
37
>>Another apparent caveat - using ALTER TABLE this way seems to "leak" temp files:
CREATE CURSOR Temp (cChar C(1))
>>ALTER TABLE Temp ADD COLUMN mMemo M
>>CLOSE DATABASES ALL
>>QUIT
Checking your temp directory, you will see a .TMP and a .FPT still hanging around. Again, this is VFP5, is it still the same in 6/7?
>
>Still that way in 6. We ran into similar behavior with indexes on USE..AGAIN cursors. The .CDX file wouldn't go away if you created more than one tag. You can probably get around this by saving the name of the .TMP file before the ALTER TABLE, and deleting those files afterwards.

Just in case we don't cover every corner, I usually have some code in oApp.release that checks the temp directory for any .tmp, .dbf, .cdx, .fpt files older than two days, and then deletes them, after a fopen() test, just in case there's some process still there after two days which uses them - which probably happened at least once. I think it was a demo run on the library machine, which was eventually exited few weeks later. But no, it used its own local temp - it only made problems on backup, because it kept tables open.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform