K
Ken Foskey
I am getting more and more frustrated with this.
foreach (DataGridViewRow row in venuesDataGridView.Rows)
{
myDataSet.VenuesRow data = (myDataSet.VenuesRow)((DataRowView)
row.DataBoundItem).Row;
... skip some...
data.BeginEdit();
if( data.IsNull("End1") )
{
data.End1 = ScoreVenue["NorthernEnd"].ToString();
}
if (data.IsNull("End2"))
{
data.End2 = ScoreVenue["SouthernEnd"].ToString();
}
data.EndEdit();
data.AcceptChanges(); / figure this commits but it does not!!!
... more code ...
}
And what I figure 'should' commit without data.?edit commands and
data.acceptchanges.
private void EndEditOnAllBindingSources()
{
var BindingSourcesQuery =
from Component bindingSources in
this.components.Components
where bindingSources is BindingSource
select bindingSources;
foreach (BindingSource bindingSource in BindingSourcesQuery)
{
bindingSource.EndEdit();
}
}
private void UpdateDatabase()
{
Validate();
EndEditOnAllBindingSources();
myAdapterManager.UpdateAll(myDataSet); // hierarchy is set
correctly.
myDataSet.AcceptChanges(); // this should not be needed.
}
I cannot get my data that is written by program into the table back onto
disk which is an access table.
Thanks
Ken
foreach (DataGridViewRow row in venuesDataGridView.Rows)
{
myDataSet.VenuesRow data = (myDataSet.VenuesRow)((DataRowView)
row.DataBoundItem).Row;
... skip some...
data.BeginEdit();
if( data.IsNull("End1") )
{
data.End1 = ScoreVenue["NorthernEnd"].ToString();
}
if (data.IsNull("End2"))
{
data.End2 = ScoreVenue["SouthernEnd"].ToString();
}
data.EndEdit();
data.AcceptChanges(); / figure this commits but it does not!!!
... more code ...
}
And what I figure 'should' commit without data.?edit commands and
data.acceptchanges.
private void EndEditOnAllBindingSources()
{
var BindingSourcesQuery =
from Component bindingSources in
this.components.Components
where bindingSources is BindingSource
select bindingSources;
foreach (BindingSource bindingSource in BindingSourcesQuery)
{
bindingSource.EndEdit();
}
}
private void UpdateDatabase()
{
Validate();
EndEditOnAllBindingSources();
myAdapterManager.UpdateAll(myDataSet); // hierarchy is set
correctly.
myDataSet.AcceptChanges(); // this should not be needed.
}
I cannot get my data that is written by program into the table back onto
disk which is an access table.
Thanks
Ken