Updating Access Database
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Updating Access Database

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    2

    Updating Access Database

    I'm having problems updating my existing access database in vb. Whenever I exit my program, the changes made won't save. How can I correct this? This is the code I have so far...


    Code:
        Private Sub Customer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'TODO: This line of code loads data into the 'AutioEssentialsDataSet3.Customer' table. You can move, or remove it, as needed.
            Me.CustomerTableAdapter2.Fill(Me.AutioEssentialsDataSet3.Customer)
    
    
        End Sub
    
        Private Sub SaveToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripButton.Click
            Me.Validate()
            Me.CustomerBindingSource2.EndEdit()
            Me.CustomerTableAdapter2.Update(Me.AutioEssentialsDataSet3.Customer)
    
        End Sub
    Last edited by HanneSThEGreaT; April 7th, 2010 at 03:01 AM.

  2. #2
    Join Date
    Dec 2009
    Posts
    596

    Re: Updating Access Database

    Did you try dropping the 'me' part and or the table like this "Me.CustomerTableAdapter2.Update(AutioEssentialsDataSet3)"??

  3. #3
    Join Date
    Apr 2010
    Posts
    2

    Re: Updating Access Database

    Yes, dropped the Me......still didn't work.

  4. #4
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,948

    Re: Updating Access Database

    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,090

    Re: Updating Access Database

    djyungstylez, please make use of [CODE] tags when posting code, as explained here :

    http://www.codeguru.com/forum/showthread.php?t=403073

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center