BulkyCopy .Net
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的更多相关文章
随机推荐
- Mathematica(MMA)闪电入门系列 目录与说明
Mathematica(MMA)闪电入门系列 入口 本文起到目录作用,点击以下链接,可以打开各章: 一.MMA概述二.表操作三.函数与递归四.表达式的计算五.过程式编程和调试技巧六.图形七.程序包 ...
- 过滤表名 & 拼接字符串
/// <summary> /// 分析sql语句中的表名 /// </summary> /// <param name="sql">sql语句 ...
- C#网络编程一:C#网络编程常用特性
特性一:委托 委托是C#语言中特有的概念,相当于C/C++中的函数指针,与C/C++中函数指针的不同之处是:委托是面向对象的.类型安全的和保险的,是引用类型.因此,对委托的使用要 "先定义. ...
- U-boot中的FDT
1. U-boot为了支持FDT,添加了新的代码:/libfdt目录fdt.h libfdt.h fdt_support.h fdt_support.c 2. http://blog.csdn.net ...
- 循序渐进Python3(十)-- 4 -- paramiko
paramiko模块,基于SSH用于连接远程服务器并执行相关操作. 使用 (1)SSHClient 用于连接远程服务器并执行基本命令 基于用户名密码连接: , ))transport.connect( ...
- layer弹出层不居中解决方案
layer弹出层不居中解决方案 代码头中加入以下代码即可 <!doctype html>
- julia的优化?
julia> function fib1(n) if n==1 return n else return n+fib1(n-1) end end fib1 (generic function w ...
- dojo创建tree
今天介绍dojo目录树的效果,效果如下图: HTML代码如下: <body class="claro"> <div id="rootlessTree&q ...
- C#中的?和??的用法
1. 可空类型修饰符(?):引用类型可以使用空引用表示一个不存在的值,而值类型通常不能表示为空.例如:string str=null; 是正确的,int i=null; 编译器就会报错.为了使值类型也 ...
- (引用)Python 生成随机数小结
转载:http://blog.csdn.net/shuaijiasanshao/article/details/51339438