我正在 Visual Studio 2019 中构建 UWP 应用程序。 在这个项目中,我使用 DBBrowser 创建了一个数据库。
我可以毫无问题地从这个数据库中读取所有内容,但是当我尝试向其中写入一些数据时,它给了我错误。 (尝试写只读数据库)
谁能帮我解决这个问题,我已经研究了几个小时,但找不到解决方案... 我试过更改数据库的安全属性。我重新创建了数据库等。
答案 0 :(得分:1)
UWP 具有非常严格的文件访问权限。 我建议阅读 File access permissions 文档和以下 SO 线程:
TL;DR 你应该把你的数据库放在 ApplicationData
文件夹中。