Last post May 13, 2013 05:23 PM by Illeris
May 12, 2013 06:52 PM|xbelt|LINK
I'm kind of new to this topic so forgive me if it's a trivial question.
I have the following code:
adapter.SelectCommand = new MySqlCommand(
" SELECT" +
.. a lot of columns
" FROM orders AS o " +
" JOIN "... a lot of other tables
dataGridView1.DataSource = data;
adapter.UpdateCommand = new MySqlCommand(
" UPDATE orders AS o SET o.comment = @comment"
MySqlParameter param = adapter.UpdateCommand.Parameters.Add("@comment", MySqlDbType.Text);
param.SourceColumn = "comment";
param.SourceVersion = DataRowVersion.Current;
Now when the a cell in the column comment is changed I want to propagate these changes into the database. But somehow this doesn't work...
The DataTable object is updated without any Problems and the method which calls adapter.Update(data) is also called when editing a cell.
Can someone help me with this matter?
May 13, 2013 05:23 PM|Illeris|LINK
"But somehow this doesn't work..." => do you get an error? What happens?