Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delimited Text File with fields greater than 254 chars.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01312930
Message ID:
01312972
Vues:
30
>How can I import data from a delimited text file that has some fields greater than 254 characters long. I used memo fields in the database, but the APPEND FROM command does not seem to load data into them when reading the text file. Is there a way to load them into the memo fields?

Something like this:
lcfile=fullpath(your_TXT_file)

sqlsetprop(0,'DispLogin',3)
store SQLSTRINGCONNECT(;
	'DefaultDir='+ADDBS(JUSTPATH(FULLPATH(lcfile)))+'\;'+;
	'Driver={Microsoft Text Driver (*.txt; *.csv)}');
	TO gnConnHandle
	
?SQLEXEC(gnConnHandle, 'SELECT * from '+justfname(lcfile), "tempcrs")
=SQLDISCONNECT(0)

sele 0
use your_table
APPEND from (DBF("tempcrs"))
Good Luck
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform