I am having a problem with the SubmitChanges function provided by the linq implementation for DB in C #. When I run the command, nothing gives an error, but the record is never updated. I raised a question, almost everyone says that the problem is that there is nothing primary key in the table. However, my table has a primary key assigned to it, but SubmitChanges does not happen. To give you an overview of what I'm doing, here is an example:
public void setApproval(string approvalCode, int ID) { using (DatabaseDataContext context = new DatabaseDataContext(DBConnection().getConnectionString())) { myRecord con = getRecord(ID);
As noted above, the record is successfully obtained with all the data in the measure, including the PK field used to identify it. A user with a database connection is given the right to update the table, although here I expect that he will break and complain.
Any ideas? Please let me know if I have not provided sufficient information. Any help is much appreciated!
source share