开发者

can i connect to a remote SQLCe database?

开发者 https://www.devze.com 2023-03-31 16:40 出处:网络
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 ge

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 conecti开发者_如何学编程ons. 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?

0

精彩评论

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

关注公众号