开发者

Database Usage from Network Server

I am running desktop app that uses mdf file on local path.What if I want to do is that this mdf file should be placed over a network shared folder but network is using Domains and we need password to connect to that folder.Server is running windows Server and dont know if it has installed SQL Express or开发者_开发百科 not.

Q 1-> do server needs to have SQL server Express. 2-> If I publish that project then use on multiple clients that may not have Visual Studio and sql server express but will have Dot Net framework. Will that Database Using application will work


1 - You don't have to use SQL Server Express, but its better than sharing a folder and use a mdf file over network using file sharing, and more trustable.

If your application will be used by one user at time only, you can share a folder on remote server, put the mdf file in there and give read/write access permission on share to the user running your desktop app.

If several users will run the app at the same time and access the database, it won't work because windows will probably lock the mdf file (and if not, your database will get corrupt). Then, you will have to use SQL Server Express and no folder sharing at all.

2 - It will work as long as your clients have SQL Compact Edition, that is installed with the .net framework by default, so you won't have any problems. By the way, if you are planning to all your customers using the same database, all the concerns I answered in question 1 applies here. If multiple users have to connect to the same db file at the same file, you'll have to: 1 - setup a SQL Server Express on client or 2 - publish your sql server express so it can be accessible from outside your network and configure your custumers desktop app to access this server.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜