Posted by: Sourav | June 1, 2015

Save data in database permanently from datagrid using VB.Net


The data is being saved in the database file in the bin folder.not in the actual datbase in the project directory,but when project is reloaded the change is gone because visual studio is recreating bin.

So to solve this I have to find bin folder in solution explorer

To get the bin folder in the solution explorer

On Solution Explorer click on any folder under which bin folder is located and then Click Show All Files Icon above

then right click on the solution in solution explorer and select new solution explorer view

there you will see the bin folder

now select the database on your project root folder in solution explorer

go to properties

copy to output directory property should be copy always

change it to copy if newer

delete the database in the bin folder and build the project again and you are done

Source://https://visualstudiomagazine.com/blogs/tool-tracker/2012/05/dealing-with-local-databases-or-why-your-updates-dont-stick.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: