Reputation: 135
I am performing record update operation . my update operation is happening fine but database is not updating values . below is update code.
SupPartEntityVal supplypart = new SupPartEntityVal();
String sNum = sNumText.Text;
String sName = sNameText.Text;
String sStatus = sText.Text;
String sCity = cText.Text;
int rowIndex = int.Parse(rIndex.Text);
ObjectQuery<S> supply = supplypart.S;
var query =
from product in supply
select new { product.SNUM, product.SNAME, product.STATUS, product.CITY };
S sup = supplypart.S.Single(product => product.SNUM == sNum);
sup.SNAME = sName; sup.STATUS = short.Parse(sStatus); sup.CITY = sCity;
this.supplypart.SaveChanges();
am i missing something???
Upvotes: 2
Views: 262
Reputation: 479
You Can Check Your Record When Saving In Database through Select Query on Command.. And See That is record is Saving? If Yes.. Then Issue is in your Database ... Normally this occurs when we use OLEDB that is Storing Database in project,,,
Upvotes: 1