0

I have created a desktop application in C# (WPF) with an Access 2010 database, I have also created setup program for it. My problem is that when I installed it on my PC it works fine, but when I install it on some other PC then it fails with an Exception like

"Operation must use an updateable query"

I have searched for it and every answer I found suggested that it was a permissions issue. I have tried to give full access to database folder but still I get the same error, I have tried to resolve it for last two days but I still haven't found a solution.

4

1 回答 1

0

例如,如果您的安装程序将数据库文件与可执行文件放在同一文件夹中,C:\Program Files\myApp\那么普通用户将只有对数据库的只读访问权限:

我的数据.png

即使您的安装程序修改了数据库文件的权限,普通用户仍然对数据库具有只读访问权限,因为他们对文件夹具有只读访问权限...

我的应用程序.png

...而且您绝对不想将该文件夹的读写访问权限打开到常规Users. (有关文件/文件夹权限对 Jet/ACE 数据库的影响的详细信息,请参阅我的答案

相反,您的安装程序应该将数据库文件放入普通用户通常具有读写访问权限的文件夹中,可能位于%PUBLIC%.

于 2013-04-13T18:39:37.603 回答