Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello
I want to import data from access database to sql server 2008 using c#.
With some validation means,
In Access we have varchar(10) and sql we have varchar(11) then not allow to import data. like vise if name is not match of the column than also not allow to import.



Thanks
Posted
Updated 30-Dec-12 22:04pm
v2
Comments
Gordon Beeming 31-Dec-12 4:48am    
You'd need to do a scheam compare and then setup the data sync only for tables/colums that match.

Hi,

Using SQL Server DTS you can do the above.

Execute SQL Server 2005 Integration Services package from C#[^]
 
Share this answer
 
There is a tool provided by Microsoft for the same.
below are instructions i put-up for someone else.

1. Download link for the tool -
http://www.microsoft.com/en-us/download/details.aspx?id=28763[^]


2. Download the license key to enable the tool.
http://www.microsoft.com/download/en/details.aspx?id=18589[^]

3. Launch the downloaded tool and specify the location of the license key downloaded in step 2

4. follow the wizard to transfer the objects from Access to SQL Server#


I tried with a small MDB at my end and it was straight forward.
Hope this helps.


Cheers
 
Share this answer
 

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