0

I realize that LOAD DATA INFILE can be used to load text/csv data. However, this seems to be limited to inserts. However, is there a way to get MYSQL to bulk import SQL files using c#.

My hope is to build up the SQL in a text file and then send it to my connection. Since this process is daily, I need it automated so that I do not have to have any user intervention once the program is started. It just takes too long inserting and updating when it can be done in bulk.

Michael Hartmann
  • 574
  • 7
  • 24
  • YSK: Even bulk imports do an insert for every row in the bulk import. It just dispenses with safeguards like being friendly to other system users to speed up the process. – JohnFx May 03 '13 at 02:25

1 Answers1

0

Have you tried MySqlBulkLoader, it's just a C# class that wraps LOAD DATA INFILE.

http://dev.mysql.com/doc/refman/5.1/en/connector-net-programming-bulk-loader.html

joshgo
  • 1,164
  • 1
  • 9
  • 14