Check SQL Server CE database after INSERTION for application evaluation

匆匆过客 提交于 2019-11-29 17:26:44

Here's your problem:

... file copy property moves DB file to Debug/Bin/Release Folder and when i check my database file in my project folder it is empty

The database file in your project folder is the original, unchanged source data. When you build your app Visual Studio copies (not moves) the original project file to your output folder (Bin/Release or whatever). Your code inserts the data into the copy, not the original unchanged data.

To "check your DB file for evaluation" you have to check the copy, not the original, unchanged, source file. You can do that either from the same app that inserts the data, from a test app that also uses the DataDirectory property if it is in the same output folder, or you can open the file in the output directory (Bin/release in your case).

... Bin/Release file is visible outside the Solution explorer ...

Yes, because it is not part of your project. It is output data as if you called Stream.Write or Console.Writeline. The original, unchanged source data is part of your source, like your .cs files. It is not delivered to the user or changed by running your app. You have to test the copy in Bin/Release or whatever.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!