SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Linq unable to update sql table


Linq unable to update sql table

Author
Message
l.caufriez
l.caufriez
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 88
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search