Tuesday, May 06, 2008

Transferring data from SQL Server database to MySql database

Hi, The other day I was facing problem while migrating my Sql Server database tables into MySql database. I tried to google it but couldn't find any great solution that can do it through code easily. Thought to share this simple code to all of you.


My problem was that I had a Sql Server database at my webserver and I had to migrate its data for any reason to my MySql database table that had the same table structure as the Sql Server had. As I didn't had enough permission on Server to use DTS or other type of services to directly transfer my data to MySql so I had one option left that is to write a code that can get all data from Sql Server and transfer into MySql database.


In order to use following function, you must have same Database table structure into both Sql Server and MySql database. If you have different structure then you may have to slightly play with the columns of the DataTable inside DataSet.

For original article, visit http://www.dotnetfunda.com/articles/article60.aspx

No comments: