Search code examples
sql-server-cemulti-user

Is SQL CE multi user?


I read several documents with conflicting view: This post says that you cannot use it in a multi user environment: http://www.pluralsight-training.net/community/blogs/jimw/archive/2007/02/18/46141.aspx

Wikipedia says: SQL CE runtime mediates concurrent multi-user access to the .sdf file.

Which one is correct?

My scenario is as follow: I want to write a database application in WPF and I like to use LINQ to SQL. I already have a MS Access Database with some data in it which should be imported into SQL CE database.

I don't mind to use Access database (MDB) as its database engine, but as far as I know LINQ to SQL doesn't work with Access database (Am I right?) so I decided to use SQL CE

It is possible that two or more user opens the application over network and work with it. So I need a way to make sure that if two or more user opens the database and write to it (different records) it doesn't crashes. What is the best option for this scenario?


Solution

  • SQL Server Compact supports multiple connections, but only from the same OS session, so not over the network. So a service and a desktop app and a web app running on the same machine can all access the database at the same time.