How to update separate Columns of Table using DataBindings?

witecloner

Well-known member
Joined
Feb 12, 2009
Messages
45
Programming Experience
Beginner
Dear again all, Could anybody tell me how to update binding source? I mean just update some columns, not for all columns. Example :
I have table which there have five columns :
CustID, CustName, CustAddr, CustCiy, and CustFlag.
If i used bindingsource1.endedit, then i update dataset and accept changes the sqldataadapter, it will update row for all of columns. In my case, i just want to update the CustFlag Column. But i don't know how to do it ...

Thank's
 
Okay all i have find how to resolve it. em...i just use

VB.NET:
BindingSource1.Current(indexcolumn) = new_value
BindingSource1.EndEdit
SqlDataAdapter1.update(dataset1.Tables("table_name"))
Dataset1.AcceptChanges()

Thank's
 
of course, updating a column to the same value it was before is no update at all, so just change the columns you want to change and leave the others as the same value they were when they were downloaded
 

Latest posts

Back
Top