MySqlBulkLoader Explanation

Can you tell me what MySqlBulkLoader , where and how to use it?

Some examples will also be appreciated, please.

+4
c # mysql
source share
2 answers

MySqlBulkLoader is a class provided by MySql.net Connector .

It provides an interface for MySql, which in theory is similar to the SqlBulkCopy class / BCP for Sql Server. Basically, it allows you to load data into MySql in bulk. A nice example can be found at dragthor.wordpress.com , as well as an example in the MySql Documentation .

+3
source share

MySQLBulkLoader is a class in the MySQL Connector / Net class that wraps the MySQL LOAD DATA INFILE statement. This gives the MySQL Connector / Net the ability to upload a data file from a local or remote host to the server. [ MySQLBulkLoader ]

An example of using MySQLBulkLoader also presented here.

To be clear: MySQLBulkLoader not like SQLBulkCopy . SQLBulkCopy , also called Bulk insert , reads data from a DataTable and MySQLBulkLoader , also called LOAD DATA INFILE , reads from a file. If you have a list of data to insert into your database, you can prepare and paste the data inside your database directly using SQLBulkCopy ; where with MySQLBulkoader you will need to generate a file from your data before running the command.

MySQL Connector / Net does not have an instance of SQLBulkCopy at the time of writing; however, support for MySQL DB Bulk insert , so you can run the corresponding command in MySQLCommand , as shown here .

+2
source share

All Articles