Updating a row like this possible?

pachjo

Well-known member
Joined
Dec 12, 2006
Messages
370
Programming Experience
10+
If I call a tableadapter.fill to populate a dataset table and then amend the data in that table should this way be posible?

Me.myDataSet.System.Rows(0).item(0) = value

When I call the .update followiung this I get the error:

'Update requires a valid UpdateCommand when passed DataRow collection with modified rows.'

But when I look in dataset designer the configuration creates the insert, update delete etc commands?

Thanks

PS the table does have a primary key and the dataset designer tichs the created update command entyr?
 
Last edited:
'Update requires a valid UpdateCommand when passed DataRow collection with modified rows.'

As soon as that happened, I would inspect the tableadapter, to see whether it actually had an update command.. Open the locals window on the debug/other windows menu nad have a look inside your tableadapter..

That error (contra to your second post) will really only appear when there is no update command associated with the tableadapter in use. I can think of no circumstance where editing the dat ain one way vs another way will cause that error to appear..
 
Back
Top