I want to perform same functionality that is provided in Sql Server 2005's BulkCopy Class, But I couldn't found the same in MySql. Is there any Class that is do the same kind of functionality in Bulkcopy class of Microsoft SqlServer 2005.
A:
As far as i know there isn't, but there is some statements you can run that are similar to the way you would perform a bulk insert using TSQL.
SqlCommand sql
sql.CommandText = "LOAD DATA INFILE '" + path + "' INTO TABLE att_temp FIELDS TERMINATED BY '\t' ENCLOSED BY '\"' LINES TERMINATED BY '\n'";
This syntax may not be quite right as I've not needed to use it, but was contemplating how we'd perform a Bulk Insert if we decided to open the database to more instead of just SqlServer.
Paul Farry
2010-01-29 05:49:52