Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fcreate worked before, but not now?
Message
 
 
À
15/03/2013 18:05:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01568525
Message ID:
01568590
Vues:
72
A tip of the hat to Rick and John for their technical assistance.

>Yup, y'all were right - it DID already exist and I DID go looking for it, both in Explorer and DOS, but apparently I've been testing too much and had too many similar file names out there. Had to get someone else to look at the listings in that whole 'I'm trying to fcreate it and I KNOW it doesn't already exist' ' Yes it does, it's right there' 'What?? Well....crap!'
>
>Obviously time for me to call it a day.
>
>>I'm with Rick, the file is most likely already there but the name might not be valid.
>>Try this test. Change the file name only that you're trying to create, so that it goes to the same place, and see if the program will then run. If it does then could be it already is there. Also try creating the file name outside of the function then do a wait window with the name before the fcreate.
>>
>>myvar = 'c:\temp\' + m.TestSection + m.TestCycle + '.cna'
>>wait window myvar
>>
>>
>> Could be one of your vars got stepped on.
>>
>>One more thing. Drop to DOS, go to that folder and type: DIR (the file name) /AS /AH This will show it if it is hidden.
>>
>>John.
>>
>>
>>
>>>Hi and happy Friday
>>>
>>>I need to create several text files and most of them are being created from existing 'master' files with some minor changes.
>>>
>>>
>>>  mfh = Fopen('c:\temp\' + m.TestSection + m.TestCycle + '.cna')		&& Source file
>>>  mfo = Fcreate('c:\temp\' + m.TestSection + m.TestCycle + '.anc')		&& Target file
>>>
>>>
>>>m.TestSection and m.TestCycle are defined as either 'R' or 'L' and '022013' respectively.
>>>
>>>The above two commands worked perfectly in the section above this one, and yes, I did issue an fclose() on each. The fopen works but the fcreate returns a -1 with no error.
>>>
>>>Can anyone see anything wrong with this?
>>>
>>>Thanks
>>>
>>>Dorris
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform