Click here to Skip to main content
15,921,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am required to send MS-Access table to SQL Server Database, based on fields Selected in Listview.
1)Till now i am able to get Access table names and their field in List view.
2)I am able to check whether database exists and Whether table exists in SQL Server with same name from VB.Net.

Now i don't know how to insert Access Tables based in Fields Selected in ListView to SQL Server

Please Help
Posted
Comments
Kschuler 6-Jun-11 14:28pm    
Do matching tables/columns from the Access DB already exist on the SQL Server? Are you saying you just want to make a copy of the access data and add it to the SQL Server? Or do you have to create new tables if they don't already exist? What if the same data already exists in the SQL server? Generally to add datat to a db you can either manually create SQL statements and use a command object to run them, or you can use a DataAdapter. But from the info you've provided I'm not sure which to suggest. What have you got so far?

1 solution

With regards to inserting data I would start reading this Inserting Data by using SQL parameters[^].

if using dynamic SQL you are best using sql parameters to protect against SQL injection [^]
 
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