0

When i run the code, input any data and save the data, then go check the access db file in the debug folder then the data des get saved. But if i rerun the code, all the data gets erased from the previous run.

I do want the data go get saved and stay there once i rerun the code.

Ben Rhys-Lewis
  • 3,118
  • 8
  • 34
  • 45
  • Is the database part of the project? Or is it somewhere else that you specify in the connection string? And why the Access-vba tag? Is it VB.NET or not? – Ňɏssa Pøngjǣrdenlarp Feb 23 '16 at 22:48
  • Check the property Copy To Output Directory associated with your database file listed between the project files. It should be set to Copy Never – Steve Feb 23 '16 at 22:53
  • 1
    Ok never mind, seems i havent looked properly, the answer is here http://stackoverflow.com/questions/19420999/changes-to-access-database-do-not-persist-when-running-app-in-visual-studio – Kamil Lazarowicz Feb 23 '16 at 22:59
  • http://stackoverflow.com/q/17147249/1070452 is also from @Steve and very helpful – Ňɏssa Pøngjǣrdenlarp Feb 23 '16 at 23:02

0 Answers0