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. delphi判断文件类型

    function getFileType(inputFile:string):string;const JPEG_FLAG_BEGIN = $D8FF; JPEG_FLAG_END = $D9FF; ...

  2. python基础知识9——模块2——常见内置模块

    内置模块 内置模块是Python自带的功能,在使用内置模块相应的功能时,需要[先导入]再[使用] 1.sys 用于提供对Python解释器相关的操作: sys.argv 命令行参数List,第一个元素 ...

  3. css书写规范及特殊样式

    1.CSS书写顺序: (1)位置:position.top.right.z-index.display.float (2)大小:width.height.padding.margin (3)文字系列: ...

  4. ES5 的 forEach, map, filter, some, every 方法

    1:  forEacharray.forEach(callback,[ thisObject]) // 遍历数组里面的所有数字// item 是值, i 是序号, array 是整个数组 [1, 2 ...

  5. ArcEngine读取数据(数据访问) (转)

    读取和访问数据是进行任何复杂的空间分析及空间可视化表达的前提,ArcGIS支持的数据格式比较丰富,下面就这些格式Shapefile.Coverage.Personal Geodatabase.Ente ...

  6. js中原型的概念

  7. ETL利器Kettle

    ETL利器Kettle实战应用解析系列一[Kettle使用介绍] 本系列文章主要索引如下: 一.ETL利器Kettle实战应用解析系列一[Kettle使用介绍] 二.ETL利器Kettle实战应用解析 ...

  8. [python] ORM 第一次注释

    不懂的东西还太多,就当是自己监督自己吧 #!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Michael Liao' impor ...

  9. 【Python全栈笔记】03 [模块二] 16-17 Oct Set 集合,三目运算

    Set 集合 set - unordered collections of unique elements 创建一个set/一个空set # create a new set set1 = {1,2, ...

  10. HDU 4831 Scenic Popularity

    Scenic Popularity Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others ...