G
Guest
I've gone through a few demos and walkthroughs trying to become familiar with
the new binding in vs2005. I'm having some success, but not every time.
I've create a dataset with the datasource configuration wizard. I have 3
tables in this dataset (expense, category, and type). I drag each table onto
a separate form. Visual studio creates a datagridview and binding navigator
on each form. When executed, the grids on each form populate correctly. The
problem is that one of the tables doesn't get updated when I press save, the
other two save correctly. I'm not writing any code, just using the
autogenerated code that VS writes:
Private Sub ExpenseBindingNavigatorSaveItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ExpenseBindingNavigatorSaveItem.Click
Me.Validate()
Me.ExpenseBindingSource.EndEdit()
Me.ExpenseTableAdapter.Update(Me.ExpenseDataSet.expense)
End Sub
I can't figure out what is different about the expense table/grid that is
causing it to not update. There are no errors generated. If I inspect the
dataset in the debugger after I make changes in the grid, the dataset appears
to get updated. I therefore believe it has something to do with the
BindingSource or TableAdapter. The changes never make it from the dataset to
the database (an access db).
Joel
the new binding in vs2005. I'm having some success, but not every time.
I've create a dataset with the datasource configuration wizard. I have 3
tables in this dataset (expense, category, and type). I drag each table onto
a separate form. Visual studio creates a datagridview and binding navigator
on each form. When executed, the grids on each form populate correctly. The
problem is that one of the tables doesn't get updated when I press save, the
other two save correctly. I'm not writing any code, just using the
autogenerated code that VS writes:
Private Sub ExpenseBindingNavigatorSaveItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ExpenseBindingNavigatorSaveItem.Click
Me.Validate()
Me.ExpenseBindingSource.EndEdit()
Me.ExpenseTableAdapter.Update(Me.ExpenseDataSet.expense)
End Sub
I can't figure out what is different about the expense table/grid that is
causing it to not update. There are no errors generated. If I inspect the
dataset in the debugger after I make changes in the grid, the dataset appears
to get updated. I therefore believe it has something to do with the
BindingSource or TableAdapter. The changes never make it from the dataset to
the database (an access db).
Joel