Total newb to any and all programming...been going through some tutorials off Microsoft's learning sites for Visual Basic and so far everything's been going fine til this latest lesson on retrieving and saving data from databases
Running Visual Basic 2005 Express edition, with SQL Server 2005 Express Edition...database I'm working with is just TestDB.mdb with a single table named Customer
From what I can tell I've put in all the code correctly as shown in the video demonstration that I was provided (i'll paste further on). What happens is when I go to run or debug the program, I'll make changes to the records and click the button to trigger the event to save the changes, however they aren't showing up when I go to the database and show the table data (next time I run the program the changes are not present either).
Anything obvious that I've done wrong? Or any hints as to what I might try? Any thoughts would be appreciated! I hate moving forward in these lesson demos until I figure out why I'm stuck on the current lesson
Here's the code:Thanks all!vb.net Code:
Public Class Form1 Private Sub CustomerBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustomerBindingNavigatorSaveItem.Click Me.Validate() Me.CustomerBindingSource.EndEdit() Me.CustomerTableAdapter.Update(Me.TestDBDataSet.Customer) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'TestDBDataSet.Customer' table. You can move, or remove it, as needed. Me.CustomerTableAdapter.Fill(Me.TestDBDataSet.Customer) End Sub End Class





Reply With Quote