Automatically Update Values in Database from DataGridView Automatically Update Values in Database from DataGridView mysql mysql

Automatically Update Values in Database from DataGridView


Please try this update query it works.

UPDATE mushrooms SET comment = @commentWHERE l_id=(select id from l where lot=@lot)


Your update statement is incorrect. It should be:

"UPDATE m FROM mushrooms m JOIN lots l ON m.lot_id = l.id SET m.comment = @comment WHERE l.lot = @lot"


Did you forget to execute the warenlagerMySqlDataAdapter.UpdateCommand?You are just setting the command and the parameters but not executing it.

What I see is that you are calling the update when the info is updated, but your update command is not loaded.You just call updateWarenlagerView when you update the row, but where are you calling initialzeFields?

Or am I missing code?