I have a very simple application in c# it has a Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5) data connection / database.
What I would like to do is be able to view the contents of the database while the program is running.
If i add the dataset to the GUI i can delete / add contents however if under Sever explorer issue a NEW QUERY and ask it to list all the contents if comes back blank.
It is either connecting to the wrong database, not saving the contents or something else.
Any ideas ?
I should add that I want to make a small application with its own internal database for logging information. The application I could then send to my sister, she can install and that’s that… no more hassle
I’m not sure what version of Visual Studio you have. But this is a problem I’ve encountered a number of times.
When you build the application it copies the database file into the appropriate bin directory, so your running app will be looking at that database by default. The server explorer will be connecting to the original copy, which has no data in it.
If you want to be able to see the contents of the database used by the running app you could try explicitly setting you connection string in server explorer to look at the database in the bin folder, or copy the one from the bin folder to where your server explorer is looking.