Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Importing/exporting to/from fixed text files
Message
From
28/08/2003 12:37:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
28/08/2003 12:07:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00824249
Message ID:
00824261
Views:
18
>Hello,
>
>I'm using TEXT...ENDTEXT command for exporting the content of a table into a fixed txt file, which must have each row, delimited by a line feed and a carriage return or a record separator. The problem is that the first line will come each time empty. What shell I do in order to avoid this and is there a better way to this beside TEXT command? Another problem is that when at the end of the row I insert the record separator <> this one will add one character to the row so there would be a problem if the last field in the row should use the maximum length admitted. Either I will have the last field one character less that is supposed to be or I would exceed the maximum length of the row with one character so that will give me an invalid file.
>
>Any ideas for importing from a fixed txt file, should I use FGETS().
>
>I want to add that each fixed file contains a Header and a Trailer.
>
>Thanks for your help!
>Alex

Alex,
If it's a fixed length file why not simply use :
copy to myTextFile.txt type SDF

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform