Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Linq unable to update sql table Expand / Collapse
Author
Message
Posted Thursday, July 4, 2013 3:29 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, April 17, 2014 8:35 AM
Points: 27, Visits: 67
Hello,
i have a big problem, try to resolve it since hours.
can't update a table with Linq, throwing no error, no exceptions when execute.
the code take the good value but does not update the db.
here's my code :

var product = (from p in db.TestMultiLogs
where p.Nb_Cnk == testNbCNK && p.ShopID == line.Substring(0, 6)
&& p.filename==filename
select p).FirstOrDefault();


string bla=line.Substring(116, 6);




product.Nb_Cnk = bla;
db.SubmitChanges();



i'd like to know why it doesn't update my table.
am i doing something wrong?

thanks in advance for your precious Help.









Post #1470362
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse