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的更多相关文章
随机推荐
- 5.openssl dgst
该伪命令用于生成文件的信息摘要,也可以进行数字签名,验证数字签名. 首先要明白,要进行数字签名,需要计算出特征码即数字摘要,然后使用私钥对数字摘要进行签名.特征码使用md5,sha等计算出. 对象只能 ...
- CLASSIC VS INTERGRATED IN IIS 7.0
Classic mode (the only mode in IIS6 and below) is a mode where IIS only works with ISAPI extensions ...
- Android_Fragment(碎片)知识点讲解
今天我们来了解下Android 中的fragment(碎片)这个东西. Fragment 从英文翻译而言是碎片,片段的意思.那么这个东西是什么,在Android 中有什么用呢? 一.概念 Fragme ...
- 循序渐进Python3(八) -- 0 -- 初识socket
socket通常也称作"套接字",用于描述IP地址和端口,是一个通信链的句柄,应用程序通常通过"套接字"向网络发出请求或者应答网络请求. socket起源于Un ...
- 转载:centos7下使用yum安装mysql
转自:http://www.cnblogs.com/hwd-cnblogs/p/5213337.html CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql ...
- Sql 触发器禁用和启用
--启用or禁用指定表所有外键约束 alter table tbname NOCHECK constraint all alter table tbname CHECK constraint all ...
- MyEclipse/Eclipse新建项目并且部署到服务器(tomcat)下
1新建项目:file/new/web project/项目名/ok 2部署到tomcat下:tomcat右单机>>add/remove/选择项目/添加/完成(tomcat下有新建的项目) ...
- mongodb sharding 简单部署记录
创建目录 mkdir {mongos,config,shard1,shard2} mkdir -p mongos/{data,log} mkdir -p config/{data,log} mkdir ...
- delphi安装 Tclientsocket, Tserversocket控件
菜单component->Install Packets按Add按钮,选择delphi目录里的bin目录下的dclsockets70.bpl(delphi2010是 dclsockets140. ...
- JSP计算器
<%@ page language= "java" contentType="text/html;charset=UTF-8" %><html ...