通过网络共享嵌入式数据库 [英] Sharing an embedded database over network

查看:75
本文介绍了通过网络共享嵌入式数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对DBMS没有那么多经验。我用C#编写了一个程序,它使用SQL-CE作为数据库,它工作得很完美,但我想和朋友一起使用共享数据库。当我在插入或更新行时将数据库sdf文件移动到共享文件夹时,它会给出异常;



存在文件共享冲突。一个不同的过程可能正在使用该文件。



这是我的连接字符串:



I don't have so much experience on DBMS. I made a program with C# that uses SQL-CE as database, it works perfect, but I want to use shared database with my friend. When I moved to database sdf file to shared folders when I insert or update a row it gives an exception;

There is a file sharing violation. A different proccess might be using the file.

Here's my connection string:

System.Data.SqlServerCe.SqlCeConnection vcon = new System.Data.SqlServerCe.SqlCeConnection("Data Source=" + DBPath);





你能建议我一个共享数据库的方法吗?(嵌入或不嵌入)教程可能很棒,因为我是初学者。



谢谢。



Can you suggest me a way to share a database?(embedded or not) A tutorial could be awesome cuz I'm beginner.

Thank you.

推荐答案

不要使用SQL-CE。这不适合这样的事情。你需要一个数据库服务器作为网络上的数据源:)用数据库服务器搜索谷歌
don't use SQL-CE. this is not for such things. you need a database server which serves as data source over a network :) search google with "database server"


SQL-CE运行进程中并且< b> NOT 用于共享数据库应用程序。 (更多适用于自助服务终端或独立应用程序。)

SQL Server Express是SQL Server的免费版本:

下载带有SP1的SQL Server 2012 Express [ ^ ]
SQL-CE runs in-process and is NOT for shared DB applications. (More for kiosk or stand-alone applications.)
SQL Server Express is the free edition of SQL Server:
Download SQL Server 2012 Express with SP1[^]


这篇关于通过网络共享嵌入式数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆