change
this.modStockTxt
to
this.modStockTxt.Text
other than that you better use parameters instead of concatenating strings to build sql statement, your application is widely open for sql attacks now.
sample sql statement with parameters:
UPDATE toolsmanagement.itemlist SET
`Item Description` = @ItemDescription,
`Stock` = @Stock,
`Unit` = @Unit,
`Item Type`= @ItemType,
`Item Status` = @ItemStatus
WHERE
`Item Code` = @ItemCode
Note that when you have space in column names, use
``
since you have update statement you don't need
MySqlDataReader
, create
MySqlCommand
using parameterized sql statement as above and then you can set each parameter values as below
cmd.Parameters.AddWithValue("@ItemDescription", this.modItemTxt.Text);
finally execute the command
cmd.ExecuteNonQuery();