Author | Topic: dbimport | |
---|---|---|
cri | dbimport on Tue, 02 Aug 2005 18:00:16 +0200 I try to import from a txt to a dbf with these instructions but I haven't the same record in dbf that lines in txt. (it seems that doesn't calculate CR+LF) SELECT SELECT("HELM03") ZAP dbesetdefault() dbeload("SDFDBE") dbImport("\wdompan\exe\HELMAC.TXT",,,,,,,"SDFDBE") Thanks a lot! | |
Joe Carrick | Re: dbimport on Tue, 02 Aug 2005 11:52:37 -0700 cri wrote: > I try to import from a txt to a dbf with these instructions but I haven't > the same record in dbf that lines in txt. (it seems that doesn't calculate > CR+LF) > > SELECT SELECT("HELM03") > ZAP > dbesetdefault() > dbeload("SDFDBE") > dbImport("\wdompan\exe\HELMAC.TXT",,,,,,,"SDFDBE") > > Thanks a lot! > > Are there more or less fields in the text file than in the dbf? If less info in the text file then you can use the aFields parameter to tell the function which fields to fill for each line in the text file. Otherwise the data will not be assigned correctly. If this won't work then you will need to import to an intermediate database with the correct # of fields and then copy or append from that database to the final database. -Joe | |
cri | Re: dbimport on Wed, 03 Aug 2005 09:10:20 +0200 I attach .dbf file and .txt file, so you can understand much better my problem. Thanks a lot! Cri "Joe Carrick" <joe.carrick@dslextreme.com> ha scritto nel messaggio news:q1gIMI5lFHA.6160@S15147418... > cri wrote: >> I try to import from a txt to a dbf with these instructions but I haven't >> the same record in dbf that lines in txt. (it seems that doesn't >> calculate >> CR+LF) >> >> SELECT SELECT("HELM03") >> ZAP >> dbesetdefault() >> dbeload("SDFDBE") >> dbImport("\wdompan\exe\HELMAC.TXT",,,,,,,"SDFDBE") >> >> Thanks a lot! >> >> > > Are there more or less fields in the text file than in the dbf? > If less info in the text file then you can use the aFields parameter to > tell the function which fields to fill for each line in the text file. > Otherwise the data will not be assigned correctly. > > If this won't work then you will need to import to an intermediate > database with the correct # of fields and then copy or append from that > database to the final database. > > -Joe > HELMAC.TXT HELM03.DBF | |
Beling | Re: dbimport on Wed, 03 Aug 2005 10:45:28 -0300 Hi cri: I think the text file has "null" numeric field and I tink so it will not be imported and probrably the program will crash. Yours Data Base has only one field. At first time it is not correct: each field separeted by comma must have a correspondent field in the Data Base, wich struct could be something like: {{'field1', 'n', 5, 0}, {'field2', 'n', 6, 0}, ...} HTH Beling Regards cri wrote: > I attach .dbf file and .txt file, so you can understand much better my > problem. > Thanks a lot! > > Cri > > > "Joe Carrick" <joe.carrick@dslextreme.com> ha scritto nel messaggio > news:q1gIMI5lFHA.6160@S15147418... > >>cri wrote: >> >>>I try to import from a txt to a dbf with these instructions but I haven't >>>the same record in dbf that lines in txt. (it seems that doesn't >>>calculate >>>CR+LF) >>> >>>SELECT SELECT("HELM03") >>>ZAP >>>dbesetdefault() >>>dbeload("SDFDBE") >>>dbImport("\wdompan\exe\HELMAC.TXT",,,,,,,"SDFDBE") >>> >>>Thanks a lot! >>> >>> >> >>Are there more or less fields in the text file than in the dbf? >>If less info in the text file then you can use the aFields parameter to >>tell the function which fields to fill for each line in the text file. >>Otherwise the data will not be assigned correctly. >> >>If this won't work then you will need to import to an intermediate >>database with the correct # of fields and then copy or append from that >>database to the final database. >> >>-Joe >> > > > > 0000,0003,0000000437,00007650, ,03/08/05,09:03,00000000, > 0005,0009,0000002088,00000000, ,03/08/05,09:03,00000000, > 0006,0011,0000002277,00000000, ,03/08/05,09:03,00000000, > 0007,0002,0000000672,00000000, ,03/08/05,09:03,00000000, > 0008,0001,0000000310,00000000, ,03/08/05,09:03,00000000, > 0009,0002,0000007290,00006075, ,03/08/05,09:03,00000000, > 0011,0005,0000000525,00000000, ,03/08/05,09:03,00000000, > 0013,0001,0000000156,00002595, ,03/08/05,09:03,00000000, > 0015,0001,0000000065,00000000, ,03/08/05,09:03,00000000, > 0022,0007,0000000763,00000000, ,03/08/05,09:03,00000000, > 0024,0001,0000000026,00000000, ,03/08/05,09:03,00000000, > 0025,0002,0000000192,00000000, ,03/08/05,09:03,00000000, > 0026,0001,0000000012,00000000, ,03/08/05,09:03,00000000, > 0030,0004,0000000331,00004785, ,03/08/05,09:03,00000000, > 0032,0001,0000000019,00000000, ,03/08/05,09:03,00000000, > 0046,0050,0000000850,00000000, ,03/08/05,09:03,00000000, > 0052,0002,0000000038,00000000, ,03/08/05,09:03,00000000, > 0061,0001,0000002138,00001425, ,03/08/05,09:03,00000000, |