J
Jason Huang
Hi,
In my .Net 1.1 C# winodows form project,
I use the following code trying to update data via a DataGrid.
private void UpdateDataSet(DataSet myDataSet){
if(!myDataSet.HasChanges(DataRowState.Modified)) return;
DataSet xDataSet;
xDataSet = myDataSet.GetChanges(DataRowState.Modified);
if(xDataSet.HasErrors){ }
mySqlDataAdapter.Update(xDataSet);
}
private void btnSave_Click(object sender, System.EventArgs e)
{
this.UpdateDataSet(myGridDS);
}
However, it comes out with an error message saying something wrong with the
modified DataRow and UpdateCommand.
Would someone tell me how to fix it?
Thanks for help.
Jason
In my .Net 1.1 C# winodows form project,
I use the following code trying to update data via a DataGrid.
private void UpdateDataSet(DataSet myDataSet){
if(!myDataSet.HasChanges(DataRowState.Modified)) return;
DataSet xDataSet;
xDataSet = myDataSet.GetChanges(DataRowState.Modified);
if(xDataSet.HasErrors){ }
mySqlDataAdapter.Update(xDataSet);
}
private void btnSave_Click(object sender, System.EventArgs e)
{
this.UpdateDataSet(myGridDS);
}
However, it comes out with an error message saying something wrong with the
modified DataRow and UpdateCommand.
Would someone tell me how to fix it?
Thanks for help.
Jason