I have an XML string in memory, which I want to write to my database. Everything works fine up to that point, and all the values are correct when I debug. //pare down xml to contain locations only //using LINQ XElement result Data = XElement.
To give you an overview of what I am executing, I here is a sample: As commented above, the record is successfully obtained with all the data in tact, including the PK field used to identify it.
The database connection user is given the rights to update the table, though here I would expect it to break and complain. Please let me know if I have not provided enough information. Where does get Record(ID) get its context to return a record?
This is invaluable in debugging why L2S stuff isn't working as expected.
You should Add updated Customer to list of updating customers.
Obviously such behaviour is required for proper concurrency checking (i.e.
two threads updating the same row); so be aware of that. Once I added a new column and made a primary key than everything worked fine. This was my test table to i didnt have primary key.I am using linq to sql to get the data from my sql i am trying to update a value to the table i dont see any changes to the table.Here is my code when i click on the save button: I can see that i am able to query the record based on the customername selected but the value is not updating. My guess is that the update statement is generating a where clause that's far too tight, or just plain wrong.You can use your own custom logic to override these actions, but the order of submission is orchestrated by a service of the Data Context known as the At this point, any errors detected by the database cause the submission process to stop, and an exception is raised.