在這些更新之前,我有一個插入語句: 在db.sql變量上顯示錯誤。字符串或二進制數據將被截斷。該語句已被終止
Topic top = (from t in db.Topics
where t.id == id
select t).SingleOrDefault();
top.lastpost = username + maxdate;
Category ca = (from c in db.Categories
where c.categoryid == cat
select c).SingleOrDefault();
ca.totaltopics = ca.totaltopics + 1;
ca.posts = ca.posts + 1;
ca.lastpost = username + maxdate;
db.SubmitChanges();