I'm getting a 'The wait operation timed out' exception while making a method call to SqlDataAdapter.Update(DataTable).
Other people have suggested that I change the CommandTimeout property of the SqlCommand being performed, but since I'm simply calling the update function, I'm not aware of any commands being exposed where I can set the timeout property for. Changing the DataContext's CommandTimeout property doesn't seem to make a difference either.
I've also read that running sp_updatestats
on the db before hand will fix the problem but that doesn't seem to help in this case.
For some context I'm trying to update a table's contents by:
- loading its contents into a DataTable
- updating the DataTable's values with those from a second dataset
- calling the Update function on the set returned by DataTable.GetChanges
If there's something wrong with the way I'm approaching the problem or am I looking at the wrong things?