Hi
I have a strong typed dataset that has one table in it and is bound to a datagridview. I need to generate a dynamic update statement so I can update my datagridview on a cell change. So basically, when a cell is edited, I need to send the new value and the columname to the adapter an so it can update it respectively. I tried extending the adapter like this, but this seems to work only with select.. can someone help?
public int UpdateNew(ScheduleTestDataSet.AppointmentsDataTable dataTable, string whereExpression)
{
string text1 = this.CommandCollection[2].CommandText;
Debug.Print(text1);
try
{
this.CommandCollection[2].CommandText = whereExpression;
Debug.Print(whereExpression);
return this.Fill(dataTable);
}
finally { this.CommandCollection[2].CommandText = whereExpression; }
}