|
-
Sep 26th, 2007, 11:31 AM
#1
Thread Starter
New Member
Problems saving data to database
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:
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
Thanks all!
Last edited by Hack; Sep 26th, 2007 at 12:06 PM.
Reason: Added Highlight Tags
-
Sep 26th, 2007, 12:07 PM
#2
Re: Problems saving data to database
Welcome to the forums. 
Are you getting any errors, or just no data, or both?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|