作者:littl_eyuera | 来源:互联网 | 2023-05-18 06:39
Ihaveseenthisquestionaskedpreviouslybutcannotfindaclearexplanationofwhatisisntpos
I have seen this question asked previously but can not find a clear explanation of what is/isn't possible and what workarounds migth be available.
我以前见过这个问题,但是找不到一个清楚的解释,什么是不可能的,什么是可以解决的。
I have an existing C# application that uses SQL CE to store local information. This database is only accessed by a single application and is stored in the user's appdata folder.
我有一个现有的c#应用程序,它使用SQL CE来存储本地信息。该数据库仅由一个应用程序访问,并存储在用户的appdata文件夹中。
Some environments have the appdata folder redirected to a network share which causes SQL CE to throw an exception: "Internal error: Cannot open the shared memory region."
有些环境将appdata文件夹重定向到网络共享,这会导致SQL CE抛出一个异常:“内部错误:无法打开共享内存区域。”
I have read that SQL CE 3.5 SP2 is supposed to allow connections to network shares again, and that SP1 does not, however I have not been able to get it to work. Has anybody had any success getting any version of SQL CE to work over a network share? And if so, what version/code did you use to get it to work?
我已经读到过,SQL CE 3.5 SP2应该允许连接到网络共享,而SP1不允许,但是我还没能让它工作。有没有人成功地让任何版本的SQL CE通过网络共享工作?如果是的话,你用什么版本/代码让它工作?
I have tried using mode=Exclusive in the connection string with no luck.
我尝试过在连接字符串中使用mode=Exclusive,但运气不佳。
Or alternatively, has anybody found a different workaround? The data needs to be stored in the user's profile as it is specific per user and should not be accessible by any other user on the system.
或者,有没有人找到不同的解决方法?数据需要存储在用户的配置文件中,因为每个用户的配置文件是特定的,系统上的任何其他用户都不应该访问这些数据。
4 个解决方案