Updating database from datagridview vb net

I use this feature to get all tables from the selected database.

This let me allow sorting and, in case you do not want to show any columns, you can do it here.I tried to bind a temporary datatable object to Data Grid View and then update the main table, but I was not able to do so.I used the adapter's Fill() method, which takes the starting record and number of records as input parameters with dataset.Use this code to populate datagridview Sql Data Adapter da=new Sql Data Adapter("select * from product",strcon); Sql Command Builder cb=new Sql Command Builder(da); Data Set ds = new Data Set(); da. Update(ds); Thanks It is working fine if there is single table in dataset.But in my dataset there are 4 table with join (i.e.

Leave a Reply