Sunday 15 May 2011

mysql - dbf2mysql not inserting records -



mysql - dbf2mysql not inserting records -

i using dbf2mysql library http://manpages.ubuntu.com/manpages/natty/man1/dbf2mysql.1.html port info mysql, when seek view inserted records nil inserted.

here command running:

$ dbf2mysql -vvv -q -h localhost -p password -u root smb/c_clist.dbf -d opera_dbf -t pricelists -c opening dbf-file smb/c_clist.dbf dbf-file: smb/c_clist.dbf - visual foxpro w. dbc, mysql-dbase: opera_dbf, mysql-table: pricelists number of records: 12 name length display type ------------------------------------- cl_code 8 0 c cl_desc 30 0 c cl_curr 3 0 c cl_fcdec 1 0 n making connection mysql-server dropping original table (if 1 exists) building create-clause sending create-clause create table pricelists (cl_code varchar(8) not null, cl_desc varchar(30) not null, cl_curr varchar(3) not null, cl_fcdec int not null) fields in dbh 4, allocated mem query 279, query size 139 inserting records inserting record 0 load info local infile '/tmp/d2mygo04tm' replace table pricelists fields terminated ',' enclosed '''' closing up....

then in mysql, tables created right fields types, no data:

mysql> utilize opera_dbf; reading table info completion of table , column names can turn off feature quicker startup -a database changed mysql> describe pricelists; +----------+-------------+------+-----+---------+-------+ | field | type | null | key | default | | +----------+-------------+------+-----+---------+-------+ | cl_code | varchar(8) | no | | null | | | cl_desc | varchar(30) | no | | null | | | cl_curr | varchar(3) | no | | null | | | cl_fcdec | int(11) | no | | null | | +----------+-------------+------+-----+---------+-------+ 4 rows in set (0.13 sec) mysql> select * pricelists; empty set (0.00 sec) mysql>

what missing?

i removed -q alternative , works

-q dbf2mysql: "quick" mode. inserts info via temporary file using 'load info infile' mysql statement. increased insertion speed on pc 2-2.5 times. note during whole 'load data' affected table locked.

mysql ubuntu dbf

No comments:

Post a Comment