none
Visual Basic Database not saving new data RRS feed

  • Question

  • Hi, 

    I have  a data source inside Visual Studio.

    Ive dragged over all the relevent data source fields that i require and all of the data tools have come over with them.

    Within the application i can change all of the data within the tables delete and add, but once i close the application the database hasn't updated and nothing has changed.

    Any help would be appreciated!

    Thanks

    Monday, August 13, 2012 2:17 PM

Answers

All replies

  • Set "Copy to Output Directory" to "Do not Copy" in your Data file property.

    http://msdn.microsoft.com/en-us/library/ms246989.aspx


    Gaurav Khanna | Microsoft VB.NET MVP

    Monday, August 13, 2012 6:20 PM
  • Hi DecT91,

    Did you save the change to the database in the application? If you didn't, you should.

    If you build/rebuild the application after the application, the data may gone.

    After restart the application, does the data changed? If it does, then I think you check the wrong database? Open the output folder(bin\debug or bin\release by default) and a database had been copied, you can find the data changed in this database.

    For more details, see http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/ad837d14-31ea-445f-b830-1a8682b69e68

    Best Regards,


    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, August 15, 2012 3:09 AM
    Moderator
  • Hi, 

    I have  a data source inside Visual Studio.

    Ive dragged over all the relevent data source fields that i require and all of the data tools have come over with them.

    Within the application i can change all of the data within the tables delete and add, but once i close the application the database hasn't updated and nothing has changed.

    Any help would be appreciated!

    Thanks

    Hi DecT91,

    Did you ever get this sorted? I am having the exact same problem and cannot seem to fix it!

    cheers

    Sunday, December 14, 2014 12:47 PM