Updating a bound form using ADO

Posted on 2005-04-05
Last Modified: 2010-04-23
I have what I hope is a simple problem.

On the backend I have an Access 2003 database.  My connection seems to be working, since the fill command populates my text boxes.  My textboxes are bound to the dataset.

I want to be able to change the data in the text boxes and update my datasource.  Below is what I have been trying, I get no errors; however, my access database is not being updated.

        Catch ex As Exception
        End Try

Please advise!

Question by:rugby148
    LVL 25

    Accepted Solution

    before you update, do something like


    Author Comment

    I just gave that a try.  It did not result in an error; however, no change in the results.

    Any other thoughts?
    LVL 41

    Assisted Solution

    Let's check out some obvious things before we dig too deep...

    Are you using an OleDbCommandBuilder or manually creating the INSERT, UPDATE, and DELETE statements?   The DataAdapter's Update method needs those statements

    Does your underlying database table have a primary key?

    Just as a check to make sure the databinding is working... add a DataTable.GetChanges() method and see if it returns a valid collection of rows.
    LVL 25

    Assisted Solution

    Try to end the edit on the actual table that is bound to the textboxes instead of the dataset, like


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now