DBF to MySQL

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
bryan.ray
Posts: 11
Joined: Sun 26 Jan 2014 18:07

DBF to MySQL

Post by bryan.ray » Tue 07 Apr 2015 18:55

Hello,
I see that UniDAC supports both DBF and MySQL.
I have a fairly straight forward DBF table that I need to import into a MySQL table.

The only thing I have to modify in the data is the current Date/Time format in the DBF file is: YYYYMMDDHHMM. I'll have to make this more MySQL friendly..such as: YYYY-MM-DD HH:MM:SS.

My Question.
What is the best way to handle this data transfer knowing that I have to modify the format of the date/time?
Using standard query of the DBF table (SELECT * FROM mytable), then read each row from the query result and do an insert into the MySQL table?
or is there a better way.

Thanks for any suggestions.
Regards,
Bryan

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: DBF to MySQL

Post by ViktorV » Wed 08 Apr 2015 08:20

You can use the TCRBatchMove component, that allows to transfer data between different datasets. See more details in our documentation: http://www.devart.com/unidac/docs/devar ... chmove.htm

bryan.ray
Posts: 11
Joined: Sun 26 Jan 2014 18:07

Re: DBF to MySQL

Post by bryan.ray » Wed 08 Apr 2015 14:24

Thanks for the tip Viktor

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: DBF to MySQL

Post by ViktorV » Thu 09 Apr 2015 06:48

Feel free to contact us if you have any further questions about UniDAC.

Post Reply