I ran though the ADO.NET tutorials on www.LearnVisualStudio.Net (also
available from msdn.microsoft.com) for VB 2005 - specifically lesson 9 of
"Visual Basic 2005 Express Edition for Beginners"
To my dismay, after following the tutorial a couple of times, it ends with
the presenters app functioning correctly while mine does not. The issue is
that when we execute the following code to save changes to the database,
then close the app and restart, my changes are not saved while his
apparently are.
------------------------------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
'need to get any changes that were made to the bindings source and place in
dataset
Me.BindingSource1.EndEdit() 'propagates changes made to data on form to
dataset
Dim rowsaffected As Integer = 0
rowsaffected = CustomerTableAdapter1.Update(MyCompanyDataSet1.Cus tomer)
'updates database and returns number of rows updated
MessageBox.Show(rowsaffected.ToString)
End Sub
-------------------------------------------
The author of the tutorial was working with Beta 2 so I'm not sure if there
is something missing in the tutorial or perhaps someting I missed twice
while following along.
Any tips on what may be missing are greatly appreciated.
-m