小智 5
MySQLBulkLoader
is a class in the MySQL Connector/Net class that wraps the MySQL statement LOAD DATA INFILE
. This gives MySQL Connector/Net the ability to load a data file from a local or remote host to the server. [MySQLBulkLoader]
The example how to use the MySQLBulkLoader
is also presented Here
To be clear:
The MySQLBulkLoader
is not similar to SQLBulkCopy
. SQLBulkCopy
also called Bulk insert
reads data from DataTable
and MySQLBulkLoader
also called LOAD DATA INFILE
reads from a file. If you have a list of data to insert in you database, it is possible to prepare and insert data inside you database directly with SQLBulkCopy
; where with the MySQLBulkoader
you will need to genereate a file from your data before running the command.
SQLBulkCopy
撰写本文时,MySQL Connector / Net内部没有对应的内容。但是,由于该MySQL DB
支持Bulk insert
,因此您可以按此处MySQLCommand
显示的类似方式运行相应的命令。
MySqlBulkLoader
是MySql .net Connector提供的类。
它为 MySql 提供了一个接口,其概念与 Sql Server 的类/BCP 类似SqlBulkCopy
。基本上,它允许您将数据批量加载到 MySql 中。可以在Dragthor.wordpress.com找到一个看起来不错的示例,并且MySql 文档中也有一个示例。
归档时间: |
|
查看次数: |
8045 次 |
最近记录: |