Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows 7 and C unit care..
Message
 
 
À
25/07/2010 11:54:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01473746
Message ID:
01473751
Vues:
69
In this case the problem is not with Win7 but with your code. It's not a good idea to store temporary files in the root of a drive in the first place. No need to create a temporary directory either because VFP already has one. It's a bad practice to hard code a directory as well. The correct way to handle it
* Assuming that you have global oApp object with cTemDir property
* Somewhere in oApp Init
This.cTemDir = ADDBS(SYS(2023))
...
* Elsewhere in the code
lcFileName = "AnyFile.txt"
lhFileHandle = FCREATE(oApp.cTemDir + lcFileName)
...
This way you can change a directory in one place if necessary. It's relevant not only to the temp directory but other directories used in your application as well.

>
>I installed W 7 and I looked for "command.com" but it's not anymore... I can't believe... Yesterday it was here, I talked to it!
>
>My problem is VFP.
>
>When I make an idx temporary file for a cursor I thought it was a good idea save it on C:\ drive. I made a lot so... Now W7 ignore my FCREATE('C:\ANYFILE') instruction and worst tells me "Open error. Anyone is using this file yet" (I don't know what file and I think I'm the only one is using my pc)
>
>On W Vista I solved this problem changing "Accounts configurations"
>
> Before I start to change any "index on..." instructions in my programs and try to save on "C:\TEMPSIS" carpet any of you have any suggestion about VFP Vs. Marvelous W 7?
>
>(By the moment I don't mention the error message that appears when I open VFP, I don't know what "class" doesn't exist.)
>
>Now I'm warm and confortable on W XP writing this.
>
>Thank you
>
> Héctor
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform