Hi All,
I'm wandering this odd behaviour of VFP on how to solve this problem of mine. When the code below runs on the VFP IDE environment it works fine and generates an output of csv file. When the app was an exe file already, it hangs on the code of FiletoSr and StrToFile, it doesn't continue to next line of code which is the wait window message and the cleanup code. Is there anything I've missed in the code?
StrHeader1 = "DN,Device ID,EMS Device ID,Device Alias,Device IP,EMS ID,Vendor ID,NE Type,Model,Hardware Description,Functional Description,Parent DeviceID,ParentDN,SiteID,Device State,Software Version,"
StrHeader2 = "Integration Date,End of Support,TSA Scope,Product ID,Serial Number,FREQ (TX/RX),Hardware Capacity,Domain,NE Owner,TX Clustering,TX Type,NATSPCODE,Admin State,SUBDOMAIN,FUNCTION,IUBCE DL LIC,"
StrHeader3 = "IUBCE UL LIC,S1CU LIC,Cluster Region,Cluster Sub Region,Cluster Province,Cluster City,Address,Site Type"
USE C:\AddIns\Master_DeviceData_File IN 0 ALIAS MDF
SELECT MDF
INDEX on SubDomain + "," + EmsID + "," + DN TAG DnOrder UNIQUE
SET ORDER TO TAG DnOrder
&&Creating Output file for Report generation
COPY TO "C:\AddIns\Device_Data_Report\FxDeviceDataInv_" + DtOS(DATE()) + ".Csv" DELIMITED WITH CHARACTER ','
FinalHeader = StrHeader1+StrHeader2+StrHeader3+CHR(13)+FILETOSTR("C:\AddIns\Device_Data_Report\FxDeviceDataInv_" + DToS(DATE()) + ".Csv")
STRTOFILE(FinalHeader+CHR(13),"C:\AddIns\Device_Data_Report\FxDeviceDataInv_" + DtOs(DATE()) + ".Csv")
WAIT WINDOW "End of Device Data Report.Output File at C:\AddIns\Device_Data_Report Folder." AT 20,60 TIMEOUT 3
CLEAR ALL
RELEASE ALL
CLOSE ALL
QUIT
Please help me on this.
Vic
I'm wandering this odd behaviour of VFP on how to solve this problem of mine. When the code below runs on the VFP IDE environment it works fine and generates an output of csv file. When the app was an exe file already, it hangs on the code of FiletoSr and StrToFile, it doesn't continue to next line of code which is the wait window message and the cleanup code. Is there anything I've missed in the code?
StrHeader1 = "DN,Device ID,EMS Device ID,Device Alias,Device IP,EMS ID,Vendor ID,NE Type,Model,Hardware Description,Functional Description,Parent DeviceID,ParentDN,SiteID,Device State,Software Version,"
StrHeader2 = "Integration Date,End of Support,TSA Scope,Product ID,Serial Number,FREQ (TX/RX),Hardware Capacity,Domain,NE Owner,TX Clustering,TX Type,NATSPCODE,Admin State,SUBDOMAIN,FUNCTION,IUBCE DL LIC,"
StrHeader3 = "IUBCE UL LIC,S1CU LIC,Cluster Region,Cluster Sub Region,Cluster Province,Cluster City,Address,Site Type"
USE C:\AddIns\Master_DeviceData_File IN 0 ALIAS MDF
SELECT MDF
INDEX on SubDomain + "," + EmsID + "," + DN TAG DnOrder UNIQUE
SET ORDER TO TAG DnOrder
&&Creating Output file for Report generation
COPY TO "C:\AddIns\Device_Data_Report\FxDeviceDataInv_" + DtOS(DATE()) + ".Csv" DELIMITED WITH CHARACTER ','
FinalHeader = StrHeader1+StrHeader2+StrHeader3+CHR(13)+FILETOSTR("C:\AddIns\Device_Data_Report\FxDeviceDataInv_" + DToS(DATE()) + ".Csv")
STRTOFILE(FinalHeader+CHR(13),"C:\AddIns\Device_Data_Report\FxDeviceDataInv_" + DtOs(DATE()) + ".Csv")
WAIT WINDOW "End of Device Data Report.Output File at C:\AddIns\Device_Data_Report Folder." AT 20,60 TIMEOUT 3
CLEAR ALL
RELEASE ALL
CLOSE ALL
QUIT
Please help me on this.
Vic