Updating multiple values to sql table using Datagridview in C# -


i having sql table cost(sno,comp_name,sellingprice). need develop interface entering values of sellingprice, sno , comp_name static values. set default value sellingprice 1.

for purpose used datagridview choosing datasource , cost table contents displayed in datagridview.

finally if user enters/updates values in sellingprice column, changes need reflected in database.

can please me in achieving this.. in advance..!

there many ways achieve you're asking for. easiest way using sqldataadapter class.

there @ least 2 known me ways create update/insert/.. commands:

  • automatic (adapater generates sql itself)
  • manual (you in way it)

for concrete , complete example of different patterns object on

how update sql server database using sqldataadapter object in visual c# .net


Comments