| Issue 148: | Requst for information: Using SQLBulkOperations | |
| 3 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? N/A What is the expected output? What do you see instead? N/A What version of the product are you using? On what operating system? 2.1.7, Solaris+Linux Please provide any additional information below. Is there any support for using SQLBulkOperations with SQL Server to do faster inserts of large quantities of data? We're interested in looking at a cleaner solution then using the "BULK INSERT" statement, or calling the bcp command somehow. Thanks!
Feb 6, 2011
Project Member
#1
mkleehammer
Status:
Investigating
Feb 7, 2011
The SqlBulkCopy object described in http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx is the most frequently used interface for bulk inserts to SQL Server and is part of .Net. Unfortunately the implementation details behind this object are not documented, and another part of MSDN states that ODBC does not directly support bulk copy operations provided by this object (http://msdn.microsoft.com/en-us/library/ms130792.aspx). One "work around" I'm aware of involved building C code to assemble rows into a structure that could be sent to a service running under Windows and that could be easily assembled into a DataTable and sent through SqlBulkCopy.
Feb 18, 2011
http://msdn.microsoft.com/en-us/library/ms712471%28v=vs.85%29.aspx I think we're looking for something similar to an insert statement that calls this interface and allows for >1 row per round-trip. |