question on how C# updates microsoft access database

davetough
davetough used Ask the Experts™
on
Hello,
I have added a small access database to my project following through this tutorial.
I choose data source and file.I make connection and save the connection string.I choose my database objects. I add a datagridview control and drag bindingnavigator to form.I add dataset component and select configure- then enter sql statement. end by adding code to update button on bindings navigator control.
not sure can follow this:
but here is question?- it tells me then when i run program- I should not see changes I made in visual studio. that I will have to go into project folder- run the exe file and make changes there-
BUT- it does make changes when I run program in visual studio and I don't have to go into exe file to make changes- so I wonder what is happening and is there ever a time when you cannot see changes make in visual studio like it says?
thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
"it tells me then when i run program- I should not see changes I made in visual studio"

Where did you read this? I don't know what it means. Changes to what? The database? Writing to a DB while running interactively, or via the final compiled binary are the same.

Author

Commented:
it says database is added to project files and debug directory.
when I run my app- it recopies database from project to debug- thus erasing any changes.

I take it this is wrong - or I explained it wrong?
Oh. Now I see what you mean. To be honest, I haven't used Access in a really (REALLY) long time. I'll try to help you, but maybe someone with more experience in this area can chime in.

Do you really need to add the access DB to the project? Can you just put it somewhere and repoint your connection string?

Author

Commented:
actually I am just starting to know how to deploy an executable and starting to see how to connect database to form- - but I mainly use access databases and want to understand this

Author

Commented:
todd thanks for help- It made me redo program- now it is working like it said- I think I have to use exe file to update database- which means I can't update database inside visual studio- or at least way I am doing it- thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial