How do I share a SQL Server CE database file (.sdf) for multiple processes?

老子叫甜甜 提交于 2019-12-18 09:27:40

问题


I have a database in SQL Server CE. When connecting several applications of different computers to the database throw an exception.

This is the exception:

There is a file sharing violation. A different process might be using the file. type of exception is "SqlCeException".

and this is my connection string :

Data Source=\\server\ProductionDB\ProductionControl.sdf;File Mode=Read Write; Max Database Size = 4000

The version of SQL Server CE is 3.5 SP2


回答1:


I misread your question initially, but I don't believe SQL Server CE supports multiple connections from different computers.

From an MS guide:

When you require data service functionality, such as the ability to support multiple, remote users, you should start with SQL Server Express Edition and work up the data service family tree.

You can have multiple connections (up to 256) from the same machine, but connections from multiple machines requires SQL Express Edition. It's freely available and easy to deploy.

Here's the link: http://www.microsoft.com/sqlserver/en/us/editions/express.aspx



来源:https://stackoverflow.com/questions/10212217/how-do-i-share-a-sql-server-ce-database-file-sdf-for-multiple-processes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!