Multiple connections to a SQL Server Compact Edition database not supported on a network share

You Can Take it With You

Syndication

News

  • Don't miss the next Windows Mobile Webcast... Unit Testing for Mobile Devices: http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032382824&EventCategory=4&culture=en-US&CountryCode=US.

This issue doesn't affect Windows Mobile applications using SQL Server Compact Edition but is an important consideration for desktop/notebook computer and Ultra-Mobile PC applications using SQL Server Compact Edition.

Although SQL Server Compact Edition supports concurrent database connections from multiple threads and multiple processes, concurrent access is not supported when the database file is located on a network drive.

Remember that SQL Server Compact Edition is an in-process database and therefore doesn't have the benefit of a single process arbitrating access to the database. Providing safe multithread/multi-process concurrency using an in-process database engine presents some significant challenges when the database is located on a network share. Because there are a few cases, where SQL Server Compact Edition has difficulty guaranteeing safe concurrent access to a database file located on a network share, the SQL Server Compact Edition prevents it by automatically acquiring an exclusive lock on the database file when a connection is made to the database file via a network share.

 


Posted Feb 18 2007, 04:47 PM by jim-wilson

Comments

You Can Take it With You wrote Multiple connections to a SQL Server Compact Edition database on a network share Part 2
on 02-19-2007 6:32 AM

Add a Comment

(required)  
(optional)
(required)  
Remember Me?