sql compact多用户 [英] sql compact multi user

查看:68
本文介绍了sql compact多用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用sql compact数据库创建程序,数据库保存共享网络。很多客户可以使用数据库吗?



thnx

I create a program with a sql compact database and the database save a shared network. its possible to use the database by many client?

thnx

推荐答案

不,这不是一件好事想法。

它被设计为单个用户系统,虽然你可以将它用于多个用户,但它需要在每次访问后关闭文件,并且当你想要时知道文件可能正在使用访问它。它太乱了,还有PITA。另外,如果数据库开始变大,你可能会因为必须通过网络读取整个文件而导致大量减速。



相反,请查看SQL Server或者MySql - 它们都是免费版本,专为多个用户设计。将C#代码转换为使用SQLCE代替SQLCE是非常非常容易的,并且只需很少的代码投资就可以获得很多优势。
No, it's not a good idea.
It's designed as a single user system, and though you can use it with multiple users it requires closing the file after every access and being aware that the file may well be in use when you want to access it. It's messy, and a PITA. Plus if the DB starts to get large, you can get a lot of slowdown as the whole file has to be read across the network.

Instead, look at SQL Server or MySql - they are both available in free versions, and are designed for multiple users. It's very, very easy to convert C# code to use either instead of SQLCE, and you gain a heck of a lot of advantages for very little investment in code.


这篇关于sql compact多用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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