批量插入数据到数据库请使用MysqlBulkCopy.dll.zip

上传者: 42005673 | 上传时间: 2020-01-11 03:09:27 | 文件大小: 1.59MB | 文件类型: zip
最近跟客户做数据对接比较多,发现平常的添加到数据库数据太慢,所以也没少逛论坛。结合论坛上的资料封装出了一个MysqlBulkCopy。本压缩包内包含SqlBulkCopy.dll和MysqlBulkCopy.dll和其使用源码。源码批量添加到SQLServer和Mysql数据库。源码包含有不同方法的添加,第一种逐条添加,第二种批量加入,其批量加实现原理其实就是把数据存入内存表(DataTable)中使用Backcopy一次性加入数据库。添加dll引用即可调用(无脑操作,何况源码里有)添加此对应dll引用,然后使用时直接可调用方法(BulkInsert. MySqlBulkInsert(参数1是DataTable,参数二是数据库连接字符串))。插入数据库数据请使用SqlBackCopy。下载过的朋友我这个帖子行或者不行麻烦给在下评论下,希望能帮更多的人。

文件下载

资源详情

[{"title":"( 30 个子文件 1.59MB ) 批量插入数据到数据库请使用MysqlBulkCopy.dll.zip","children":[{"title":"MysqlBulkCopy.dll","children":[{"title":"ConsoleApplication1","children":[{"title":"Program.cs <span style='color:#111;'> 4.12KB </span>","children":null,"spread":false},{"title":"ConsoleApplication1.csproj <span style='color:#111;'> 4.34KB </span>","children":null,"spread":false},{"title":"packages.config <span style='color:#111;'> 364B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 8.08KB </span>","children":null,"spread":false},{"title":"ConsoleApplication1.csprojResolveAssemblyReference.cache <span style='color:#111;'> 29.05KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"ConsoleApplication1.exe <span style='color:#111;'> 7.50KB </span>","children":null,"spread":false},{"title":"ConsoleApplication1.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false},{"title":"ConsoleApplication1.pdb <span style='color:#111;'> 13.50KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"build.force <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"ConsoleApplication1.exe.config <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"MySql.Data.xml <span style='color:#111;'> 827.22KB </span>","children":null,"spread":false},{"title":"MySql.Data.dll <span style='color:#111;'> 748.50KB </span>","children":null,"spread":false},{"title":"Renci.SshNet.dll <span style='color:#111;'> 413.00KB </span>","children":null,"spread":false},{"title":"ConsoleApplication1.vshost.exe.config <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"BouncyCastle.Crypto.dll <span style='color:#111;'> 2.34MB </span>","children":null,"spread":false},{"title":"Google.Protobuf.dll <span style='color:#111;'> 291.50KB </span>","children":null,"spread":false},{"title":"ConsoleApplication1.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"ConsoleApplication1.exe <span style='color:#111;'> 7.50KB </span>","children":null,"spread":false},{"title":"ConsoleApplication1.pdb <span style='color:#111;'> 13.50KB </span>","children":null,"spread":false},{"title":"Renci.SshNet.xml <span style='color:#111;'> 1021.24KB </span>","children":null,"spread":false},{"title":"ConsoleApplication1.vshost.exe <span style='color:#111;'> 22.16KB </span>","children":null,"spread":false},{"title":"MysqlBulkCopy.dll <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false},{"title":"Google.Protobuf.xml <span style='color:#111;'> 389.05KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"App.config <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"MysqlBulkCopy.dll <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false},{"title":"SqlBulkCopy.dll <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • xiaocui2018 :
    SqlBulkCopy.dll和MysqlBulkCopy.dll,这两个文件没有代码,只有dll,有什么用!!
    2021-07-06
  • horse6508 :
    error 13 permission denied,无法使用
    2021-06-26
  • 1口梦千年 :
    error 13 permission denied
    2021-04-15
  • majun168 :
    研究中,希望好用
    2020-07-07

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明