开发者

SQL Server Compact & ClickOnce & Mutliple Users

I am creating a clickonce app and planning on using SQL Compact. However, multiple users will be using the app on the same machine. Is this going to be possible for them to sha开发者_C百科re the same database. If not, should I be using Express instead?


The problem is actually about copying the database file somewhere everyone can get to it from their own account. ClickOnce apps don't run with any privileges, so I don't think they would be able to access the database if it was, say, in c:\ourdatabase.

If I were you, I would deploy the app to localhost on my machine, and copy the database to where I would want it to be. The app should point to that location. Log in as userA and run it and see if it can access the database successfully. Same for userB.

Now, if that works, you can try adding code to copy the database to that folder the very first time the application is run on that machine. Just check for the folder and the file in the folder, and if not there, copy it over there. Again, you'll have to try this out and see if it will work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜