MySQL Forums
Forum List  »  Other Migration

Re: Conversion between FoxPro .DBF and MySql Database
Posted by: Laurentiu Stancalie
Date: November 13, 2005 08:35AM

Hello,

The surest way to convert the .dbf tables to mysql tables is to write your own program in FoxPro to convert each table into a text file like:

CREATE TABLE <tb_name> (<field_list>);

INSERT INTO <tb_name> (<field_list) VALUES (<field_values1>);
INSERT INTO <tb_name> (<field_list) VALUES (<field_values2>);
...
INSERT INTO <tb_name> (<field_list) VALUES (<field_valuesN>);

It is not very hard to do, just take care of the field types (string types must be surrounde by ""). Then you can execute the resulting file as batch job in mysql.

Success !
Laurentiu

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Conversion between FoxPro .DBF and MySql Database
10089
November 13, 2005 08:35AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.