It has being ages to get back to cnblogs, Career path had been changed back to .Net development in 4 years ago....Things i just leart from my current project I would like to share with you guys is to use sqBulkCopy to save big volume data in a datatable.

As you might have known, SQL Server provides a function called BCP (Bulky Copy Process), it largely helps us with inserting large amount data into sql tables. Microsoft has created a very similar Ado.net method SqlBulkCopy to perform same way for us, and the performance is pretty good, 18 seconds to save 400,000 rows in the table, Below screen snap illustrate how we can use this functionality in our project framework.

what we need to do is to tell bulkCopy the physcial table name in DB. bulkCopy.ColumnMapping.Add(count, dc.ColumnName) is Mandatory to call. it is like you should tell bulkCopy how is the columName mapping to the DB table column Name.

BulkyCopy .Net的更多相关文章

随机推荐

  1. highCharts的多图导出

    已实现HighChart的多图导出,不能上传文件,所以需要call我735734485.

  2. android 术语

    Context : 是android 应用程序的 中央控制中心.所有应用程序特有的功能通过context 进行访问. Activity: 一个 Android 应用有若干个 task 任务组成,每个人 ...

  3. DEV提示控件ToolTipControl

    1.设置边框的颜色和显示箭头图标:在构造函数里面设置 public frmLogin()        {            InitializeComponent(); //设置边框颜色     ...

  4. C# POST请求

    public string PostWebRequest(string postUrl, string paramData, Encoding dataEncode) { string ret = s ...

  5. 力软信息化系统快速开发框架 web端+winform端

    力软信息化系统快速开发框架是一套集权限管理+快速开发+动态接口+通用组件+动态UI于一体的全新.net信息化快速开发框架.力软信息化系统快速开发框架的使用,大大地缩短了开发周期,提高了软件质量,同时也 ...

  6. asp.net LINQ连接数据库SQL执行数据的增加、修改、删除、查询操作

    查询数据库中的数据 using System; using System.Collections.Generic; using System.Linq; using System.Web; using ...

  7. error-2016-4-20

    问题: Compilation ErrorDescription: An error occurred during the compilation of a resource required to ...

  8. 设置centos7语言显示环境

    1.查看可选语言显示包 locale -a ............(省略好多) zh_CNzh_CN.gb18030zh_CN.gb2312zh_CN.gbkzh_CN.utf8zh_HKzh_HK ...

  9. 未能正确加载“RoslynPackage”包

    一打开新建程序或者打开项目就报错,原因是安装的组件或者模板丢失或者有问题,在这一过程加载组件必定会产生错误,以下为解决方法: 1.重命名以下文件夹C:\Users\moonlight\Local Se ...

  10. CoordinatorLayout+TabLayout+ViewPager

    <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.C ...