Question Locked

How to migrate ms access table to sql server using vb.net

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hi,
I am using vb.net 2005
I am looking for code to select data from ms access table to a datagrid(already achieved this) and be able to transfer the selected data to a new sql server table.
any help pls?

3 replies

by tony hopkinson

A few things to think about. What's to stop you migrating again. Does the table have an Identity property, if so are you regenerating it, or do you want to saet identity insert on and off again.
If you go for regenrate don't forget to move any linked records as well.

Getting the selected data in there is simply a matter of going from selected in the grid, to the underlying dataset, establishing a connection to your sql server and then executing an insert query with parameters filled from the data. Assumes this is a one for one convert with compatible datatypes of course.

It would be easier tio just migrate everything in to SQL server and then delete waht you don't want.

This discussion is closed to new replies.