Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append from - not working as I expect.
Message
 
To
27/08/1998 08:55:54
Andrew Logie
Institute of Food Research
Reading, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00130457
Message ID:
00130557
Views:
21
>I have a small upload routine (VFP EXE) that takes delimited text files and loads the data into a VFP 5 database. This routine has worked for quite a while, but recently I noticed a "funny" in a couple of the rows, the fields were offset by one. When I looked at the import file I could see the reason as being caused by quotes around a string e.g. " data ". 99.99% of imported rows work, but the row below gives me a problem.
>
>3820000X^3820000X2501^04^INVOICE ^"CREATING KILLER WEB SITES" - BY ^ 1.00^
>
>I am using the ^ character as my delimiter, mainly because I have found that "," does not appear to work because users often encapsulate literal text (giving "",) in quotes and they do not appear to have found a valid use for ^ yet - sad.
>
>A snippet of my Append routine goes like this...
>
>APPEND FROM import.txt TYPE DELIMITED WITH char ^
>
>This STILL throws an extra column. There must be a neat way of doing this in more robust fashion.
>
>Any help or advise would be much appreciated. One appraoch would be to searh and replace the offending charactrs first before the APPEND, but the data can be large in terms of number of rows.
>
>
>Any idas would b greatly appreciated.
>
>Andrew Logie
>Institute of Food Research

Andrew,

Can you dump the delimiters ansd separators all together and make the ASCII file a fixed field length file (SDF)? The the problem is solved by APPEND FROM ... TYPE SDF
Previous
Reply
Map
View

Click here to load this message in the networking platform