Basically I want only two columns KitSKU and Quantity out of many columns in table Kits.
Change:
SqlDataAdapter da = new SqlDataAdapter("select * from [KitSKU] , [Quantity] from Kits", sqlCon);
To:
SqlDataAdapter da = new SqlDataAdapter("select [KitSKU] ,[Quantity] from Kits", sqlCon);
you want to select column: [KitSKU]
and [Quantity]
from table: Kits
Thanks Max.. also If I want to Update it rather than inserting, how to implement that.
Use following code, for updating KitSKU and Quantity:
SqlDataAdapter da = new SqlDataAdapter("update Kits set [KitSKU] = 'entersku' ,[Quantity] = 5 where [KutSKU] = 'what record it should update'", sqlCon);
But I wouldn't recommend that code, since it isn't parameterized and I think you should try with some basic sql lessons and using sql parameters.