当前位置:Gxlcms > 数据库问题 > Mysql的批量导入类 MySqlBulkLoader

Mysql的批量导入类 MySqlBulkLoader

时间:2021-07-01 10:21:17 帮助过:4人阅读

 

 //tran = conn.BeginTransaction();  
                    MySqlBulkLoader bulk = new MySqlBulkLoader(conn)  
                    {  
                        FieldTerminator = ",",  
                        FieldQuotationCharacter = ‘"‘,  
                        EscapeCharacter = ‘"‘,  
                        LineTerminator = "\r\n",  
                        FileName = tmpPath,  
                        NumberOfLinesToSkip = 0,  
                        TableName = table.TableName,  
                    };  
                    //bulk.Columns.AddRange(table.Columns.Cast<DataColumn>().Select(colum => colum.ColumnName).ToArray());  
                    insertCount = bulk.Load();  

  

具体资料:

https://dev.mysql.com/doc/connector-net/en/connector-net-programming-bulk-loader.html

https://dev.mysql.com/doc/refman/5.7/en/load-data.html

http://blog.csdn.net/zhou2s_101216/article/details/50875211

https://dev.mysql.com/doc/refman/5.7/en/load-data.html

 

Mysql的批量导入类 MySqlBulkLoader

标签:name   car   应该   5.7   connect   sql   value   for   字符   

人气教程排行