Question Save datagridview data to Sql?

sebasjuh

Member
Joined
Dec 6, 2007
Messages
13
Programming Experience
Beginner
Hello,

I have pasted a standard Datagridview with the Datagridview in the Toolbox in Visual Studio Basic 2005. I have added some columns and edited there names, I even have changed some columns to a combobox column.
It's all working fine and I can fill in all the columns but my question now is I have made a button with Save, and how can I make it possible that if a user clicks on the button Save that all the data he/she entered in the datagridview is saved to the sql tabel??
 
First up, please post in the forum that most applies to the topic of your post, not just the first one you come to. The VS.NET section is for IDE questions and the VS.NET General forum is for IDE questions that don't fit any other more specific category. It's not for VB language questions at. The VB.NET section is for VB language questions but this question would fit in the Windows Forms or WinForms Data Access forum so it doesn't belong in VB.NET General either. Please take the time and make the effort to keep the forums orderly for everyone's sake. You are by no means the only person to post in the VS.NET General forum without looking any further. Maybe we should put it last.

As for the question, I would suggest that you create a DataTable and bind it to the grid. Any edits you make to the grid will then be pushed to the DataTable automatically. You can then use a DataAdapter to save all the data in a single method call.
 

Latest posts

Back
Top