Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting from Paradox to MySQL

Status
Not open for further replies.
Mar 17, 2005
44
US
I have a database in Paradox that I'd really like to convert to MySQL. I'm wondering if anyone has done it before and if there's some nifty tools that might be available.

For starters, I'd like to be able to examine the table structure and create a "CREATE TABLE" and "CREATE INDEX" statements - is that doable? I seem to recall seeing something once where you could interrogate your table structure and report on it, shouldn't be too hard to build a create statement from that.

Second, I need to be able to transport the data, probably by creating insert statements. Is there an easy wasy to do that?

Finally, at least one of the columns is a "Formatted text" type and supports bolding and italics. Does MySQL support such a beast and how would I convert it?

Anyone done a project like this in the past who might have insight on where to proceed from here?

Thanks,
Steve
 
Yes, you can do all that.

Drop a TTable on your form. Set database name and table name to the required database and table.

Set the Active property to true. You can then write some code to look at all the fields in the table by using the Fields property of TTable. Use the Delphi Help to find out how to get hold of Field Name, Field Type and so on.

From there you should be able to easily construct SQL CREATE statements.

When copying data from the BDE dataset to MySQL, I suggest that you create a tab separated variable file and use the MySQL LOAD INFILE statement to import the data into your MySQL tables. This is much quicker than using INSERT statements - especially for large files. And you can also check your data prior to LOADing it into MySQL.

Check out the excellent help on for MySQL capabilities for your query on formatted text.

Andrew
Hampshire, UK
 
I'm not entirely sure about MySQL, but one of the issues that I ran into several years ago when converting a app from Paradox to Oracle was that most server-based databases (SQL Server, Oracle, etc.) don't have a Boolean field type. So, I had to determine how I was going to store boolean fields in the new database (Y/N vs. 1/0 vs. YES/NO vs. true/false...), convert the data from Paradox, and update my code to handle the new field type.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Would Borland's DataPump handle it? I have never used it on MySql but I suspect that it will work.

Steven
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top