Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text file with no eof() ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00899420
Message ID:
00899433
Vues:
14
>Hi,
>I need to appe a text file to a foxPro table. I am trying to do this with
>appe memo MyField from Text1.txt type sdf.
>This begins okay but each time I get the error message "end of File encountered."
>Could this mean that the text file has no eof() marker? I can get around this
>problem by importing the text1 file into Excel and then having excel write a new text
>file text2.txt. Then FoxPro can appe this text2.txt with no problem. However, is there a way
>for FoxPro to check for the presence of an eof() marker in text1.txt and add on it not there?
>Or is there another way for FoxPro to appe in this apparently offensive text file, low level
>file reading routines?
>Thanks
>Steve Elster

Steve,

Why don't you use FileToStr as in:
local lctext
use table1 
m.lctext = FileToStr("c:\abc.txt")
*Say field1 is your memo field
replace field1 with m.lcText in table1
use in table1
Dawa
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform