4
I know that SQL CE 3.5 allows multiple concurrent connections from multiple processes (as opposed to earlier versions that allowed, but did not recommend, multiples from only one process). My guess is that it's resource limited, but I'm not certain. I actually have a call in to the SQLCE team directly to find out if there is a count limit on this (I'll post back when I get a reply, likely later today, though with PDC ongoing, it might be longer).
我知道SQL CE 3.5允许来自多个进程的多个并发连接(与允许但不建议仅来自一个进程的多个早期版本相反)。我的猜测是资源有限,但我不确定。我实际上直接打电话给SQLCE团队,以确定是否有计数限制(当我得到回复时我会回复,可能会在今天晚些时候回复,尽管PDC正在进行,可能会更长)。
That said, I question why you would need to know this. How many connections are you trying to make? You should have at least 2 - it's recommended to always maintain 1 connection, even if it's a dummy that's never used, to keep the connection cached for performance reasons - but I've never done any implementation that had more than maybe 4 or 5 at any given time. If you have more than that, you might need to rethink your architecture, or the app is more likely a candidate for a full-blown server product.
那就是说,我怀疑为什么你需要知道这一点。你想要建立多少个连接?您应该至少有2个 - 建议始终保持1个连接,即使它是一个从未使用的虚拟连接,以保持连接因性能原因而缓存 - 但我从未做过任何超过4或5的实现任何给定的时间。如果您有更多,您可能需要重新考虑您的架构,或者该应用程序更有可能成为完整服务器产品的候选者。
Update
I finally heard back from the team and they confirmed from the source code that the number is 256. This is what they said:
我终于从团队中回复了,他们从源代码中确认数字为256.这就是他们所说的:
"...since we are implementing it in C/C++, the counter starts from 0 and ends in 255. These are the number of parallel connections and not total connections. For every open, the counter goes up by 1 and for every close it goes down by 1. If you have not closed, but just unreferenced close happens on Dispose."
“...因为我们在C / C ++中实现它,计数器从0开始并以255结束。这是并行连接的数量而不是总连接。对于每次打开,计数器上升1并且每次关闭它下降了1.如果你还没有关闭,只是在Dispose上发生了未引用的关闭。“