Try APPEND FROM ..... SDF
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Try APPEND FROM ..... SDF
Or,
append from ... delimited with chr(32)
Or
you can still use my function and have more control
I use it with years
Regards,
#include "fivewin.ch"
#include "xbrowse.ch"
#include "hbcompat.ch"
REQUEST DBFCDX
function Main()
csvfile:=".\2013.txt"
Create_Db()
USE WIN4LI.DBF NEW ALIAS DST
APPEND FROM ".\2013.txt" SDF
REturn Nil
Function Create_Db()
//-------------------------------------//
DBCREATE('LI.DBF',{{'CONCORSO','N',004,000},;
{'DATA','D',008,000},;
{'TIME','C',005,000},;
{'ESTRA1','N',002,000},;
{'ESTRA2','N',002,000},;
{'ESTRA3','N',002,000},;
{'ESTRA4','N',002,000},;
{'ESTRA5','N',002,000},;
{'ESTRA6','N',002,000},;
{'ESTRA7','N',002,000},;
{'ESTRA8','N',002,000},;
{'ESTRA9','N',002,000},;
{'ESTRA10','N',002,000},;
{'NUMERONE','N',002,000}}, 'DBFCDX')
close all
use &('LI') new
select LI
if FILE('wIN4LI.DBF')
delete file &('wIN4LI.cdx')
append from &('WIN4LI')
dbcommitall()
close all
delete file &('WIN4LI.dbf')
endif
close all
rename &('LI.dbf') to &('WIN4LI.dbf')
//-------------------------------------//
Return nil
Silvio
APPEND FROM .... converts dates ONLY of the source data is in YYYYMMDD format.
In your case you have to create the field as character field with length 10.
After importing you have to copy to other file converting date with CTOD()
Or you can adopt my earlier logic with needed changes. Change the field delimiter from ";" to " "
I tried with your logic func but it not run
Thank you, I thought it was easy to convert these types of files