Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > replace data in MS Access table with datagridview data
 

replace data in MS Access table with datagridview data

I manually create a datatable and bind it to a datagridview. At runtime people can change the values of one or more rows in the datagridview. There is a button called "Save DataGridView Data". When this button is clicked I want to insert everything in the datagridview control into a table called "Stock" in my MS Access database. The Stock table has same structure as the datatable. I have figured out how to insert a single row into MS Access database by opening and closing the connection and executing the insert command, but in my case there are thousands of rows to be inserted, thus inserting them one by one won't be practical. Is there a way that I can insert the entire datatable at one go?

thanks in advance

Achievement provides the ultimate pleasure in life
ssfftt  Monday, October 05, 2009 3:46 PM
  • Proposed As Answer byTamer OzMVPTuesday, October 06, 2009 8:18 AM
  •  
Tamer Oz  Monday, October 05, 2009 5:24 PM

You can use google to search for other answers

Custom Search

More Threads

• unbound gridview and combo box
• UpdateCommand in GridView
• Connection String
• How to make columnheader readonly?
• Datagrid
• Not showing the first record
• Format text in data grid view
• DataRepeater Control ((Power Packs 3.0))
• Parent - Child forms (DataView applied only to Child Records)
• Cannot bind dataconnector to empty collection