Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Versions des environnements
Visual FoxPro:
VFP 6
Database:
MS SQL Server
Divers
Thread ID:
01043078
Message ID:
01043094
Vues:
18
Here is my code

IF FILE('C:\Swini.txt')= .F. && Does file exist?
= FCREATE('C:\Swini.txt') && If not create it
ELSE
gnFileHandle = FOPEN('C:\Swini.txt',0)
nSize = FSEEK(gnFileHandle, 0, 2) && Move pointer to EOF
IF nSize > 0
= FSEEK(gnFileHandle, 0, 0) && Move pointer to BOF
.txtbxdefault.Value = Alltrim(FREAD(gnFileHandle, nSize))
ENDIF
ENDIF
= FCLOSE(gnFileHandle)

However, next time I need to execute the same routine, fopen() returns -1, even though the file is not open. Thus, how can I open the file using fopen()
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform