I’m using a table control to make change in multiple columns and want to update those changes in the database by the click event of a button. The numbers of columns to be changed are arbitrary (some time 2 columns, some time 4 columns are to be changed). The statement to update a single column :
cmd.CommandText = "update table-name set column1 = '"&txtbox1.Text&"' where column2= '"& txtbox2.Text& "';"
Then do I have to use as many textboxes as the numbers of columns I want to update? Or there is a way to update the whole table at once without using textboxes?
Please give some guideline.
Thanks and regards
cmd.CommandText = "update table-name set column1 = '"&txtbox1.Text&"' where column2= '"& txtbox2.Text& "';"
Then do I have to use as many textboxes as the numbers of columns I want to update? Or there is a way to update the whole table at once without using textboxes?
Please give some guideline.
Thanks and regards