Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Working with Text File SDF Format
Message
 
À
23/08/2005 08:07:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01042857
Message ID:
01042860
Vues:
17
What exactly not works?
Keep in mind that the FILE() function returns .t. no metter what parameter you pass if the file with same name exists in current VFP path. I'll do the following:
LPARAMETER tcfile
CLEAR
LOCAL pcdt, pctime1, pctermi, pcinout, pcnoee, pcfile
STORE '' TO pcdt, pctime1, pcnoee
IF TYPE("tcfile") # "C"
   WAIT WINDOW TIMEOUT 10  'Source ascii file was not defined! Please define source filename.'
   RETURN
ENDIF

IF  EMPTY(SYS(2000,tcfile))
    WAIT WINDOW TIMEOUT 2  'File does not exist or incorrect filename!'
    RETURN
ENDIF
>I am a bit lost on how to work with text file.
>
>Scenario: Changing a text file contents into a text file contents that I can work with
>Roadblock: Need to understand how to import a "fixed" name textfile into the program.
>
>Current program starts as below:
>PARAMETER tcfile
>CLEAR
>PRIVATE pcdt, pctime1, pctermi, pcinout, pcnoee, pcfile
>STORE '' TO pcdt, pctime1, pcnoee
>IF PCOUNT() <> 1
> WAIT WINDOW TIMEOUT 10 'Source ascii file was not defined! Please define source filename.'
> RETURN
>ENDIF
>IF .NOT. FILE(tcfile)
> WAIT WINDOW TIMEOUT 2 'File does not exist or incorrect filename!'
> RETURN
>ENDIF
>
>As you can see, I have use parameter and I have to name a text file together to get the prg to work. All that is okay, but when compiled to exe, there exist a problem when I run the exe outside of foxpro it does not work.
>
>Can someone let me know how to improve this program so that when outside the foxpro environment I can just run this program with the text file found in the same folder.
>
>Appreciate some assistance here.
>
>Regards,
>Christopher
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform