update database from tableAdapter RRS feed

  • Question

  • hi

    i  have a data table which is bound to a datagridview. i built my database with microsoft access 2003 . when i update the table,

     i call  the update method of my adapter and then make the dataset to accept changes but it doesn't work. i have done it several time and sought help from the but it still doesn't work.


    the code looks like this





    yet the changes are not found in the database but are found in the dataset.

    Saturday, August 4, 2007 5:22 PM


  • Hi,

    are you sure you're updating the correct database? The chances are, that if your Access database file is part of your project/solution, the "runtime version" gets overwritten with the "designtime version" of the file. Check that your database file's "Copy to Output Directory" property is set to "Copy if newer".

    Also, you usually don't need to call AcceptChanges() on your dataset, since Update() method (by default) does this for you.



    Saturday, August 4, 2007 9:58 PM