Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append from (cFileName) xl8 -- Truncation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00743344
Message ID:
00745567
Vues:
31
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform