问题
We've got an SQL Ce database on a remote machine and we're trying to get a reporting system (using custom LINQ queries) via c# to connect to the database in shared read mode. At this point we're getting an exception "There is a file sharing violation", even when the database has no other conections. Our sql connection string appears thus:
using (SqlCeConnection conn = new SqlCeConnection( "Data Source=\\\\telemetry\\C$\\users\\usermetrics.sdf; File Mode=shared read;))
{
conn.Open( ); // => exception here
...
Is this even possible?
来源:https://stackoverflow.com/questions/7249510/can-i-connect-to-a-remote-sqlce-database