Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Tyrone Matthews
  Where is Tyrone Matthews?
 Bristol
 United Kingdom
 Tyrone Matthews
 Tags
Subject: RE: Dodgy Text File
Thread ID: 228397 Message ID: 228410 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Other
Date: Monday, May 18, 2009 7:17:08 PM         
   


> Hi Guys,
>
> I am trying to find a way to get a file into a foxpro table should be a pipe deli format but there is a square where the carrigde return/line feed should be, does anyone have any idea of how i could make a program to change this or a way to change this i have gone back to the supplier but they cant do anything there end
>
Hi Tyrone,

You may need to post a few example lines of the import file, and perhaps the code you tried that failed.
Assumed the content looks like
field1|field2|field3


.. this example seems to work:
LOCAL lcFileContent
TEXT TO lcFileContent NOSHOW
field1|field2|field3
ENDTEXT

LOCAL lcFile
lcFile = ADDBS(GETENV("TEMP")) + 'test55.txt'
STRTOFILE(m.lcFileContent, m.lcFile)

CREATE CURSOR temp (f1 Char(20), f2 Char(20), f3 Char(20))
APPEND FROM (m.lcFile) TYPE DELIMITED WITH CHARACTER '|'
BROWSE

ERASE (m.lcFile)




hth
-Stefan

ENTIRE THREAD

Dodgy Text File Posted by Tyrone Matthews @ 5/18/2009 6:37:19 PM
RE: Dodgy Text File Posted by Stefan Wuebbe @ 5/18/2009 7:17:08 PM
RE: Dodgy Text File Posted by Koen Piller @ 5/18/2009 7:25:16 PM
RE: Dodgy Text File Posted by Ammar Hadi @ 5/18/2009 9:33:46 PM
RE: Dodgy Text File Posted by Bob Brook @ 5/20/2009 12:17:53 PM