Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tip o' the Day: ALTER TABLE on a Cursor
Message
De
17/02/2001 20:55:43
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
16/02/2001 16:13:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00476591
Message ID:
00477070
Vues:
36
>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform