Author | Topic: DBEXPORT() | |
---|---|---|
Alain Rousseau | DBEXPORT() on Mon, 07 Nov 2016 11:00:47 +0100 Hello eveybody I would like convert a dbf to a file txt The structure of txt must be : "4005086141896";"14189";"CHIMPANZE MALE";"1";"5.50"; "4005086144064";"14406";"SOURIS BLANCHE";"4";"3.99"; "4005086144071";"14407";"GRENOUILLE";"7";"4.50"; The description of DBF select b fichnom := drive + ":\bdce\fela.dbf" aStructure := { { "EAN" , "C", 13, 0 }, ; { "REFERENCE" , "C", 20, 0 }, ; { "LIBELLE" , "C", 50, 0 }, ; { "QUANTITE" , "C", 4, 0 }, ; { "PRIXTTC" , "C", 6, 0 } } DbCreate( FICHNOM, aStructure ) I use this command : reseau(drive + ":\bdce\fela",.t.,0) cFileCsv := drive + ":\bdce\stock_csv\ExtractArt_" + constr_date + ".csv" *********** Be careful I have put this command DbeInfo in pgm dbesys.prg *********** DbeInfo(COMPONENT_DATA, DELDBE_FIELD_TOKEN,";" ) DbExport(cFileCsv,; {"EAN","Reference","libelle","quantite","prixttc"},; ,,,,,"DELCDX") The result of the runing in the txt is that : "4005086141896";"14189";"CHIMPANZE MALE";"1";"5.50" "4005086144064";"14406";"SOURIS BLANCHE";"4";"3.99" "4005086144071";"14407";"GRENOUILLE";"7";"4.50" Missing the end character ";" Have some idea ? Thanks a lot |