mjcmkrsr
Technical User
- Nov 30, 2010
- 840
Hi,
I have several PCs (W7 pro - 32 bit, W8 - 64 bit, W10 - 64bit). VFP9 with all the SPs and hotfixes is installed on the W7-PC. The run time files are installed on the other PCs. The data reside in a shared folder of a NAS, mapped as S:\. All the PCs access the date on S:\ through a GB Ethernet.
The following code is running well on all PCs, whether as PRG, APP or EXE with one exception: it throws an error (after FCLOSE) when run as EXE on the W7 machine where VFP9 is installed
ERROR
This does not seem to be a VFP9 error and what strikes me more is that the message is in french - VFP is English, my Windows are English. Clicking on "Aide" doesn't do anything
My question: are there additional files incorporated in the EXE - as opposed to the APP - where this error might come from.
Any hint is appreciated
Thanks
MarcK
I have several PCs (W7 pro - 32 bit, W8 - 64 bit, W10 - 64bit). VFP9 with all the SPs and hotfixes is installed on the W7-PC. The run time files are installed on the other PCs. The data reside in a shared folder of a NAS, mapped as S:\. All the PCs access the date on S:\ through a GB Ethernet.
The following code is running well on all PCs, whether as PRG, APP or EXE with one exception: it throws an error (after FCLOSE) when run as EXE on the W7 machine where VFP9 is installed
Code:
Local ldBoMonth, ldEoMonth, lnFileHandle
ldBoMonth = oApp.dEofMonth(ThisForm.txtDEntry.Value) + 1
ldEoMonth = oApp.dEofMonth(ldBoMonth)
Select ;
Houses.HCode AS "HouseCode", ;
Houses.Name AS "HouseName", ;
Houses.Room, ;
Stagiaires.cName AS "STName", ;
Stagiaires.cGender AS "Gender", ;
TRANSFORM(Stagiaires.dBirth) AS "dBirth", ;
TRANSFORM(Students.Rent ,"999.99") AS "Rent", ;
TRANSFORM(Students.dEntry) AS "dEntry", ;
TRANSFORM(Students.dExit) AS "dExit", ;
TRANSFORM(Students.Pfa, "999.99") as "PFA" ;
From Houses ;
Join Students On Houses.PKey = Students.FKey ;
Join Stagiaires On Stagiaires.PKey = Students.PKey ;
Where Between(Students.dEntry, ldBoMonth, ldEoMonth) AND ;
Students.PFA > 0 ;
Order by HouseCode ;
Into Cursor WfSTemp
IF _Tally > 0
lnFileHandle = FOPEN(gcDrive + gcPath + "FullContracts.CSV", 12)
= FCLOSE(lnFileHandle)
IF lnFileHandle > 0
COPY TO gcDrive + gcPath + "FullContracts" TYPE CSV
ELSE
= MESSAGEBOX("Le fichier "+ gcDrive + gcPath +"FullContracts est ouvert!", 64, "Création fichiers Word")
ENDIF
ENDIF
Select ;
Houses.HCode AS "HouseCode", ;
Houses.Name AS "HouseName", ;
Houses.Room, ;
Stagiaires.cName AS "STName", ;
Stagiaires.cGender AS "Gender", ;
TRANSFORM(Stagiaires.dBirth) AS "dBirth", ;
TRANSFORM(Students.Rent ,"999.99") AS "Rent", ;
TRANSFORM(Students.dEntry) AS "dEntry", ;
TRANSFORM(Students.dExit) AS "dExit";
From Houses ;
Join Students On Houses.PKey = Students.FKey ;
Join Stagiaires On Stagiaires.PKey = Students.PKey ;
Where Between(Students.dEntry, ldBoMonth, ldEoMonth) AND ;
Students.PFA = 0 ;
Order by HouseCode ;
Into Cursor WfSTemp
IF _Tally > 0
lnFileHandle = FOPEN(gcDrive + gcPath + "ExtendedContracts.CSV",12)
= FCLOSE(lnFileHandle)
IF lnFileHandle > 0
COPY TO gcDrive + gcPath + "ExtendedContracts" TYPE CSV
ELSE
= MESSAGEBOX("Le fichier "+ gcDrive + gcPath +"ExtendedContracts est ouvert!", 64, "Création fichiers Word")
ENDIF
ENDIF
ERROR
This does not seem to be a VFP9 error and what strikes me more is that the message is in french - VFP is English, my Windows are English. Clicking on "Aide" doesn't do anything
My question: are there additional files incorporated in the EXE - as opposed to the APP - where this error might come from.
Any hint is appreciated
Thanks
MarcK