Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending from a csv file
Message
De
21/09/2015 06:20:38
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01624860
Message ID:
01624869
Vues:
52
Hi Colin,

because you should do
Append From j:\global\awbshayes.csv DELIMITED
Example:
TEXT TO lcx NOSHOW
"muh",1
"mih",2
ENDTEXT &&lcx
STRTOFILE(lcx,'test.txt')

CREATE CURSOR xyz (c1 c(5),i1 i)

APPEND FROM test.txt DELIMITED

BROWSE NOWAIT
DELETE FILE test.txt
start from that.

It is also a bad idea to hard code a path
lcFile = getfile()
if !empty(lcFile) then
 APPEND FROM (lcFile) DELIMITED
endif
is absolute minimum.

Lutz
>Hi Lutz
>
>I have recreated my dbf and have manually imported the data into it
>
>I am now trying to import again by program
>
>use j:\global\awbshayes in 0 shared
>select awbshayes
>Append From j:\global\awbshayes.csv DELIMITED WITH "" WITH CHAR ,
>
>Nothing gets added and there are no errors
>
>What am I doing wrong
>
>Colin
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform