Reputation: 729
I want to insert data into sqlserver from access .mdb file, which is the fastest way to perform the data inserts SQL BulkCopy or OPENDATASOURCE using OLEDB.
Data would be like 100,000s of records for about 20 tables.
Thanks.
I am doing this from c# code,where i need which one performs better,I am not able to compare because OPENDATASOURCE is asking for admin permissions.
Upvotes: 2
Views: 579
Reputation: 2019
In my Opinion the very best insert performance for inserting large volumes of data can be attained by using SQL Bulk Copy as this method bypasses the SQL query language entirely and streams data directly to SQL.
Further Performance Improvements
You may read more on Whitepaper: performance of SqlBulkCopy http://www.sqlbi.com/wp-content/uploads/SqlBulkCopy-Performance-1.0.pdf
Upvotes: 1
Reputation: 32681
have you tried importing data to sql database from access file? Database->Tasks->Import, Microsoft Access as data source, mdb file as parameter
If you want to do this via C# then you should consider using User Defined Table Types with stored procedures.
Upvotes: 0