locked
Visual studio 2012 and Mysql RRS feed

  • Question

  • I'm using visual studio 2012 as front end of an application (Windows form) and back end My sql (local host) too save data. My requirement is to import Microsoft access (.accdb) data table too MySql from Visual studio 2012 and save data grid view data table in microsoft access(.accdb) format at any selected location of my computer.

    • Moved by lake Xiao Thursday, August 11, 2016 1:59 AM
    Wednesday, August 10, 2016 4:55 AM

Answers

  • Great! Write an application for it.

    Inside the application,you simply:
    - Read the data of the Microsoft access database to a DataTable (See Ado.Net link I provided. Reading data chapter. Access databases can be read with the OleDbDataProvider.

    - You can go through all rows and insert them to the MySQL Database. 

    Regarding import / export: You should consider to not use a DataTable or any other in memory representation if it is not required. It could be quite easy / straight forward to have 2 database connections open. On the first you read with a DbDataReader row for row and you issue insert commands on the other connection.

    With kind regards,

    Konrad

    Wednesday, August 10, 2016 6:08 AM

All replies

  • Great! Write an application for it.

    Inside the application,you simply:
    - Read the data of the Microsoft access database to a DataTable (See Ado.Net link I provided. Reading data chapter. Access databases can be read with the OleDbDataProvider.

    - You can go through all rows and insert them to the MySQL Database. 

    Regarding import / export: You should consider to not use a DataTable or any other in memory representation if it is not required. It could be quite easy / straight forward to have 2 database connections open. On the first you read with a DbDataReader row for row and you issue insert commands on the other connection.

    With kind regards,

    Konrad

    Wednesday, August 10, 2016 6:08 AM
  • Hi Nashbaw,

    Since Our forum is discussing about VS general question like how to set/configure Visual Studio and Visual Studio tools.

    And your question is more related to the ADO.NET. I moved it to our ADO.NET forum for better support.

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=adodotnetdataset

    Thanks for your understanding.

    Best Regards,

    Lake Xiao

    Thursday, August 11, 2016 1:56 AM