So I have a very simple Update method
Public Sub SaveReferralFormSettings(ByVal p_clsReferralFormSettings As ReferralFormSetup)
c_dbmlRefernet.Refresh(Linq.RefreshMode.OverwriteCurrentValues, p_clsReferralFormSettings)
c_dbmlRefernet.SubmitChanges()
End Sub
I have set primary key on the ReferralFormSettings table. I can see the object is fully populated.
but i still get error when trying to update the row in the db. Why??
I have tried removing the table from the dbml file then re-adding as suggested here How did I wrong my DataContext? also tried the replies in LINQ to SQL does not update when data has changed in database but I can not see why I am getting the error or how to resolve? any help greatly appreciated ty.
Also tried adding line
c_dbmlRefernet.ReferralFormSetups.Attach(p_clsReferralFormSettings)
still no joy