G
Guest
Does anyone know why the DA Update() would throw an exception?
I moved the database but I updated the Conn and the DA, currently
(trying)removing/replacing DS. Is there a another direction I should be
looking in? Does it matter if I move columns in the grid (everything is a
string anyways)? Does the DS need to be udated from the DT?
***************
int rowNo = dg.CurrentRowIndex;
dt = dt .Rows[rowNo].BeginEdit();
dt = dt .Rows[rowNo][columnName] = strgCellFill;
dt = dt .Rows[rowNo].EndEdit();
string s = dt.Rows[rowNo][columnName]; // s = strgCellFill
DataRow dr = dt.Rows[rowNo];
string s1 = dr.RowState.ToString(); // s1 = "Modified"
DS dataSetChanges = getDataSetChanges();
if (dataSetChanges.HasChanges())
{
this.Conn.Open();
this.da.Update(ds); //throws an exception
this.Conn.Close();
}
I moved the database but I updated the Conn and the DA, currently
(trying)removing/replacing DS. Is there a another direction I should be
looking in? Does it matter if I move columns in the grid (everything is a
string anyways)? Does the DS need to be udated from the DT?
***************
int rowNo = dg.CurrentRowIndex;
dt = dt .Rows[rowNo].BeginEdit();
dt = dt .Rows[rowNo][columnName] = strgCellFill;
dt = dt .Rows[rowNo].EndEdit();
string s = dt.Rows[rowNo][columnName]; // s = strgCellFill
DataRow dr = dt.Rows[rowNo];
string s1 = dr.RowState.ToString(); // s1 = "Modified"
DS dataSetChanges = getDataSetChanges();
if (dataSetChanges.HasChanges())
{
this.Conn.Open();
this.da.Update(ds); //throws an exception
this.Conn.Close();
}