Click here to Skip to main content
15,886,798 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to import all or specific columns from ms access 2007 database table into sql server existing table through code in asp.net c#.
Posted
Updated 30-Aug-15 18:42pm
v3
Comments
PIEBALDconsult 31-Aug-15 0:53am    
Why would you even consider using ASP.net?
If you do it a lot, you should look into SSIS or another ETL package.
xpertzgurtej 31-Aug-15 1:00am    
actually i have to implement this functionality in asp.net because i am using asp.net and sql server in my project and want to import access data into my sql server table

1 solution

In short, why note read the data from Access to a dataset using a OleDbConnection[^] and OleDbDataAdapter[^] and the from the dataset insert the data from the dataset to the SQL Server table via SqlConnection[^] using SqlBulkCopy.WriteToServer Method (DataTable)[^]
 
Share this answer
 
Comments
xpertzgurtej 31-Aug-15 2:19am    
Thanks for your reply..But is there any direct running example as per my requirement?
Wendelius 31-Aug-15 2:44am    
I would think there are a lot of examples for each step. For example have a look at C# / VB.NET / C++ CLI: Create, read and write MS Access (mdb, accdb), MySQL, SQL Server, SQL Server Compact and SQLite databases[^]
Maciej Los 31-Aug-15 2:24am    
5ed!
Wendelius 31-Aug-15 2:44am    
Thank you Maciej!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900