Updating database from datagrid
To fix it, you have to sort it back then save them.
A table can be displayed from a database in a Data Grid View, using the Data Adapter class and data logic.to write back the changes, just use the update method in the adapter. It populates the Data Grid View as it is intended to so that part of the program works. Ole Db Public Class frm Database Dim con As New Ole Db Connection Dim ds As New Data Set Dim dt As New Data Table Dim da As New Ole Db Data Adapter Private Sub frm Database_Load(sender As Object, e As Event Args) Handles My Base. i m retrieving values from database using datagrid and i want to update the database using that similar datagrid but somehow i m having trouble, can anyone guide me how to do that.....i mean when the query is executed and selected data is retrieved if the user wants to update something he/she can do it at the datagrid in which value is being displayed.... there are really many ways to work with data and in a lot of times it is a developer preference to work one way or another.