Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Line is too long' when importing from file of type SDF
Message
 
To
16/07/1999 10:40:12
Jeroen Naus
Harte-Hanks Europe
Hasselt, Belgium
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00241824
Message ID:
00243567
Views:
27
Thanks both of you for your answer, I found the problem, for a reason that
I don't know, the file was really a long line. It did not have a single
character return!!, I downloaded it again and life is beautifull once more.

Thanks again for your help.

>You can append the entire file into a memo field of a temporary cursor. Do some strtran()'s on the weird characters. Save it back out and try to import it.
>Following prg changes a text file from one codepage to another. You can do something similar but instead of using cpconvert do a strtran.
>
>parameter p_filename,p_origcp,p_newcp
>
>*
>* Program to cpconvert a file
>*
>IF PARAMETERS() = 1
> p_origcp = 437
> p_newcp = 1252
>ENDIF
>m.tmparea = select()
>CREATE cursor pg_temp (final M(10))
>SELE pg_temp
>APPEND blank
>APPEND memo final from alltr(p_filename)
>replace final with cpconvert(p_origcp,p_newcp,pg_temp.final)
>m.tmpsafe = set("safety")
>SET SAFETY OFF
>copy memo final to (p_filename)
>IF ALLTR(UPPER(m.tmpsafe)) = "ON"
> SET SAFETY ON
>ELSE
> SET SAFETY OFF
>ENDIF
>use in pg_temp
>SELECT(m.tmparea)
>return .t.
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Previous
Reply
Map
View

Click here to load this message in the networking platform