I connected to an Access Database for my C# application which went well and the database was automatically copied to my Root colder which is in Documents/VisualStudio2010/Projects. When I created a Dataset it was automatically copied to Documents/VisualStudio2010/Projects/Name of My Project/Name of My Project/bin/Debug.
Now I have two different database files in my project, the 1st which is in the project is where i can make changes and it will reflect in Visual Studio, the 2nd is where changes made in the Visual Studio reflect even though it doesnt in the dataset. Please I need help with understanding this weird situation.
Loading

Posted Aug 11, 2013, 12:04 AM
If there is no changes in the database design, then no need to use Copy Always option, useCopy if newer option in the copy to output directory.
Christian NwambaPosted Aug 11, 2013, 5:31 AM
Which code do you need exactly, Sir....... Is the code behind the form that gets the data from the database.
This situation occurs not only with access database, i tried sql server using linq to sql and it still persisted.
Posted Aug 10, 2013, 11:43 PM
Christian NwambaPosted Aug 10, 2013, 7:29 AM
Thanks for your help, Sir.
Posted Aug 6, 2013, 3:39 AM
Visual studio opens a window very similar the below one.
Select build action to None and Copy to output directory to Always.
Whenever your're compiling the application, the latest MS access file will be copied into your bin/debug directory.
During development, do not edit the ms access file which exists in bin\debug directory.
Please let me know, if you need further information.
Christian NwambaPosted Aug 6, 2013, 3:22 AM
Posted Aug 5, 2013, 10:24 AM
Right click on the access file in visual studio and click properties.
To copy content files to an output folder, you should verify Copy to output directory property of your ms access file to "Copy always"
It will copy the ms access file into the bin/debug directory.
Change this option according to your wish.