Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Line is too long' when importing from file of type SDF
Message
From
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:
00242304
Views:
21
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform