Update Dataset with Datagridview'

I have 1 winform with datagridview, this datagridview will display data from dataset.
I want to edit some value on datagridview and when press savedata button all data will be updated to Database.
How can I do?
Mr_BachAsked:
Who is Participating?
 
anarki_jimbelConnect With a Mentor Commented:
I believe that is all you need (because you have an adapter and a dataset:

                    ' Update the database
                    da.Update(dsChanges)

                    ' Accept the changes within the DataSet
                    ds.AcceptChanges()

See links that RamanaChoudary sent you.

Honestly you can't expect anything else apart from links. Points are not generous, problem description is too vague etc.
0
 
anarki_jimbelCommented:
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
Mr_BachAuthor Commented:
I can't use those links above, It can't help me, not my idea, I didn't create any qurey on C#, I just used wizard from Visual Studio to bind data from dataset to datagridview.
0
 
anarki_jimbelCommented:
Mr Bach,

Even if you use the wizard to createa dataset and bind it to a datagridview you still have a reference to the dataset. And basicly all you need to do is to accept changes by calling  DataSet.AcceptChanges - read my first code. Think logically: even if you do not create any statements yourself but use wizards still these statements are created fort you. So still the approach I pointed to is applicable. There is no any magic here.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.