You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Often I find myself needing to dump some content quickly into sql server, and map the columns sequentially. While I can create a DataRow[], or populate a DataTable, those remove the ability for me to stream data. Requiring me to buffer the entire dataset before sending it to the server.
The only solution that works that retains streaming is to create a DbDataReader and I often end up writing a simple adapter to do just that.
This would save writing the adapter into my code base and get the desired result.
Ultimately, SqlBulkCopy only currently calls the following methods on a non SqlDataReader
There are obviously tools like SSIS and Import/Export wizard, but if I need to do this programatically (e.g. calling a webapi and dump the content), there's no easier way than sql bulk copy.
The text was updated successfully, but these errors were encountered:
Another alternative: our team uses IEnumerable<SqlDataRecord> all the time for our TVPs. Perhaps SqlBulkCopy could take in one of those instead of IEnumerable<object[]>?
Is your feature request related to a problem? Please describe.
Often I find myself needing to dump some content quickly into sql server, and map the columns sequentially. While I can create a
DataRow[]
, or populate aDataTable
, those remove the ability for me to stream data. Requiring me to buffer the entire dataset before sending it to the server.The only solution that works that retains streaming is to create a
DbDataReader
and I often end up writing a simple adapter to do just that.Which means I end writing something like::
Describe the solution you'd like
I think adding the following methods would be ideal.
This would save writing the adapter into my code base and get the desired result.
Ultimately, SqlBulkCopy only currently calls the following methods on a non
SqlDataReader
Describe alternatives you've considered
There are obviously tools like SSIS and Import/Export wizard, but if I need to do this programatically (e.g. calling a webapi and dump the content), there's no easier way than sql bulk copy.
The text was updated successfully, but these errors were encountered: