Usually, someone adds a database file (e.g. .mdb, .mdf, .sdf) as Data Source to a project, and creates a data access application. After inserting or updating data, if an application is restarted, the database does not seem to update.
Cause:
When you add Data Source, Visual Studio .NET maintains two copies of the database, one in the Project folder, and the other in the bin folder. Each time the application restarts, the former is copied to the latter. Therefore, you get a clean copy.
Solution:
Right click on the database file in Solution Explorer -> Select Properties -> Set the "Copy to output directory" property value as "copy if newer".
Related thread:
http://social.msdn.microsoft.com/forums/en-US/vbgeneral/thread/f06363ee-0949-4204-b927-9684d1cfec6e
For more FAQ about Visual Basic .NET General, please see Visual Basic .NET General FAQ
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.