Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I Do OLEDB BulkCopy to insert bulkrecords?

Tags:

c#

I have used SqlBulkCopy to insert bulkrecords into database. Now i want to change it as Oledb Connections. So i need to Change my bulkcopy..

How can i do same in the oledb?

SqlBulkcopy obj = new SqlBulkcopy("TableName");
like image 618
sankar Avatar asked Oct 20 '25 21:10

sankar


2 Answers

SqlBulkCopy uses a specific database feature, that has no generic OLEDB counterpart. Individual providers may have something similar, but you would have to use to provider-specific variant (or find a library that already wraps this, if one).

In short: as far as I know, you can't.

like image 190
Marc Gravell Avatar answered Oct 23 '25 11:10

Marc Gravell


SqlBulkCopy class is only designed to work with SQL Server database and works with SQlClient.

There is no counterpart in Oledb

like image 34
TalentTuner Avatar answered Oct 23 '25 10:10

TalentTuner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!