MySqlConnection connection = new MySqlConnection(mysqlConnString); connection.Open(); MySqlCommand command = connection.CreateCommand(); command.CommandText = "SELECT * FROM ` orders`;"; MySqlDataAdapter myda = new MySqlDataAdapter(command.CommandText, connection); myda.Fill(ds, sTableName);
using (SqlBulkCopy bulkcopy = new SqlBulkCopy(trans.Connection, SqlBulkCopyOptions.Default, trans)) { bulkcopy.DestinationTableName = "["+sTableName+"]"; bulkcopy.WriteToServer(ds.Tables[0]); cConvertor.AddTextOutputtoFile(ds.Tables[0].Rows.Count.ToString() + " row(s) have been added to " + sTableName + "."); }
null
SqlBulkCopy
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)