简体   繁体   English

如何使用企业库DAAB批量插入很多行?

[英]How to batch insert lots of rows using Enterprise Library DAAB?

How can I execute 1000s of INSERT queries using Enterprise Library DAAB? 如何使用企业库DAAB执行数千个INSERT查询? That is to say how can I insert lots of rows into a table using DAAB all at once efficiently? 也就是说,如何使用DAAB一次高效地将很多行插入表中? And without using a for-loop. 并且不使用for循环。 Thanks. 谢谢。

Unfortunately, I'm not sure you can do that using the Enterprise Library DAAB without extending it. 不幸的是,我不确定您是否可以使用Enterprise Library DAAB来做到这一点而不扩展它。 As an alternative you can use SqlBulkCopy. 或者,您可以使用SqlBulkCopy。

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx http://msdn.microsoft.com/zh-CN/library/system.data.sqlclient.sqlbulkcopy.aspx

EDIT 编辑

The Oracle Data Provider for .NET (ODP.NET) supports this via the Array Binding feature. Oracle Data .NET数据提供程序(ODP.NET)通过数组绑定功能支持此功能。

http://www.oracle.com/technetwork/issue-archive/2009/09-sep/o59odpnet-085168.html http://www.oracle.com/technetwork/issue-archive/2009/09-sep/o59odpnet-085168.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM