Keyword not supported: 'provider' with SqlBulkCopy

asp.net c# ms-access sqlbulkcopy vb.net

Question

I attempted to enter an access connection string in SqlBulkCopy but received error Provider is an unsupported keyword..

This is my code:

bulk = New SqlBulkCopy("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & mFileName & ";Jet OLEDB:Database Password=hmis;")
bulk.DestinationTableName = "Advance"
bulk.WriteToServer(dt_table)
1
0
5/19/2014 11:41:51 AM

Accepted Answer

SqlBulkCopy is limited to SQL Server. You are attempting to invoke the constructor SqlBulkCopy(string), which requires a valid connection string for SQL Server. You can only use Access with the connection string that you gave.

When it comes to bulk import procedures, various databases products offer distinct processes. A class created for one database product cannot be used to import data into another.

Microsoft Access doesn't enable bulk imports.

2
5/19/2014 11:33:29 AM

Popular Answer

It is only possible to use the Class SQLBulkCopy with a SQL Server connection string. Other varieties of connection strings are incompatible.



Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow