can i connect to a remote SQLCe database?

北城以北 提交于 2019-12-04 06:37:39

问题


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

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