Export DataSet to Mysql

  • Thread starter Thread starter Ricardo Luceac
  • Start date Start date
R

Ricardo Luceac

Hi all..


Is there a way to create a table in mysql with the result of a
dataset???

Thx...
 
Ricardo,

You will have to probably issue the command to create the table
yourself, but this should be easy. The DataSet exposes the schema
information on a table through the Columns on the DataTable, so you can
create a statement to create the table easily.

Once you have that, you should be able to easily create a command object
(I don't know if it is MySqlCommand, but there is a native provider for
MySql) and then pass the dataset to an adapter to have it insert the
records. Of course, make sure that all the records have a state of "added".

Hope this helps.
 
Yape ...Use sqlcommand to create a table and dataset to insert data will be
easier.

chanmm
 
Back
Top