Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append from (cFileName) xl8 -- Truncation
Message
 
 
To
26/01/2003 15:15:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00743344
Message ID:
00745567
Views:
30
Hi Geoff,

As you found out, APPEND FROM command ignores memo fields in the table it appens to and lenght of character field in FoxPro is limited to 254 characters. In addition to the methods you described you can use ODBC.
cExcelFile = "H:\Temp\test.xls"

TEXT TO lcConnStr TEXTMERGE NOSHOW
DRIVER=Microsoft Excel Driver (*.xls);
FIL=excel 8.0;
DefaultDir=<<JUSTPATH(lcExcelFile)>>;
DBQ=<<lcExcelFile>>;
ENDTEXT

lnConnHand = SQLSTRINGCONNECT(lcConnStr)
? SQLEXEC(lnConnHand, [SELECT * FROM "Sheet1$"])
>Hi Sergey
>
>Basically, with the "APPEND FROM ('c:\myexcel.xls') XL8.
>
>I have found that the maximum field I can define in a cursor is 254 charactors in length and that I cannot APPEND or IMPORT directly into a memo field.
>
>The only way I can think of to process the large field is to open the excel model using OLE and either process directly or alternately save to comma delimited then open and process that directly.
>
>Anyway, here is some sample code. Fields A-AD of the cursor correspond to fields in the model and the remaining are used in translation of some of the columns to correspond to feilds in my database.
>
>If there is another way around the max cursor field size when 'importing' or 'appending from' I would sure like to know it.
>
>Regards
>Geoff Scott
>
<snip>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform