Hey,
Having a little issue with some LINQ/Lambdas code here. Now this project is about 25,000 lines and I've written plenty of different LiNQ/Lambdas statements which all work correctly - but this one bit of code refuses to work and throws no exceptions! I think I must of missed something really small, but its driving me mad so im hoping someone else may be able to see something I cant.
Now I have stepped through this small amount of code more times than I like to remember, everything appears to work as it should - the query returns the data I want, the new data is written to the pickup_point object (pickupData) and the SubmitChanges appears to be successful, yet no data is changed in the database!
Thanks for the help guys.
Regards, Daniel.
Having a little issue with some LINQ/Lambdas code here. Now this project is about 25,000 lines and I've written plenty of different LiNQ/Lambdas statements which all work correctly - but this one bit of code refuses to work and throws no exceptions! I think I must of missed something really small, but its driving me mad so im hoping someone else may be able to see something I cant.
Code:
try
{
Pickup_point pickupData = feederData.Pickup_points.Single(p => p.Interchange == cbInterchange.Text && p.Pickup_point1 == cbPickup.Text);
pickupData.Mileage = Convert.ToDecimal(txtMileage.Text);
pickupData.Notes = txtNotes.Text;
feederData.SubmitChanges();
}
catch (Exception exc)
{
MessageBox.Show("Debug3: " + exc.Message);
}
Now I have stepped through this small amount of code more times than I like to remember, everything appears to work as it should - the query returns the data I want, the new data is written to the pickup_point object (pickupData) and the SubmitChanges appears to be successful, yet no data is changed in the database!
Thanks for the help guys.
Regards, Daniel.